openstack-installer is a data oriented replacement of puppet-openstack. The following HOWTO runs some basic tests on vagrant virtual machines that are preserved for introspection with:
# vagrant status control_basevm running # vagrant ssh control_basevm vagrant@control-server:~$ ps -ax | grep keystone 15020 ? Ss 0:01 /usr/bin/python /usr/bin/keystone-all
The control_basevm runs the horizon dashboard:
The base operating system is Ubuntu precise.
apt-get install linux-image-3.8.0-27-generic linux-headers-3.8.0-27-generic apt-get install vagrant git clone https://github.com/CiscoSystems/openstack-installer.git cd openstack-installer
Make sure there is more than 20GB of free disk space and more than 16GB of RAM
root@bm0012:~/openstack-installer# grep MemTotal /proc/meminfo MemTotal: 32847200 kB root@bm0012:~/openstack-installer# df -h . Filesystem Size Used Avail Use% Mounted on /dev/sda2 29G 2.5G 25G 10% /
Run the tests
test_type=openstack_multi \ test_mode=basic_tests \ operatingsystem=ubuntu \ openstack_version=grizzly bash -x tests/basic_test.sh
When successful the output must end with:
... + vagrant ssh build -c 'ping -c 2 172.16.2.129;exit $?' PING 172.16.2.129 (172.16.2.129) 56(84) bytes of data. 64 bytes from 172.16.2.129: icmp_req=1 ttl=63 time=29.0 ms 64 bytes from 172.16.2.129: icmp_req=2 ttl=63 time=20.3 ms --- 172.16.2.129 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1002ms rtt min/avg/max/mdev = 20.346/24.698/29.050/4.352 ms + exit 0
print hiera values
export RUBYLIB=/etc/puppet/modules/hiera_data_mapper/lib hiera \ --debug \ --config /etc/puppet/hiera.yaml \ operatingsystem=redhat \ scenario=2_role nova::verbose
introspection and debug
Assuming the default values set in the repository have not been overriden:
root@bm0012:~/openstack-installer# vagrant ssh control_basevm vagrant@control-server:~$ keystone --os-token keystone_admin_token \ --os-endpoint=http://127.0.0.1:35357/v2.0/ \ role-list +----------------------------------+----------+ | id | name | +----------------------------------+----------+ | 602adb93e03842c5900e177562cd5312 | Member | | 9fe2ff9ee4384b1894a90878d3e92bab | _member_ | | 2d5c66442eb64ceb9cfec3859bf301c3 | admin | +----------------------------------+----------+
To get access to the horizon panel from the host, use a ssh based tunel. The ssh to control_basevm is bound to the port 2201.
# ssh -p 2201 -L 8080:localhost:80 localhost # nc localhost 8080 GET /horizon/ <!DOCTYPE html> <html lang="en" xml:lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>Login - OpenStack Dashboard</title> ....
To use nova from the command line when logged in the control_basevm:
root@control-server:~$ source <(sudo cat /root/openrc) root@control-server:~$ nova keypair-list +------------+-------------------------------------------------+ | Name | Fingerprint | +------------+-------------------------------------------------+ | key_cirros | 54:d6:57:35:63:3e:06:a5:c7:42:e7:2a:f2:12:20:e7 | +------------+-------------------------------------------------+