SDB:Cloud OpenStack Quickstart
tagline: From openSUSE
Contents |
[edit] Openstack installation from RPM packages
Packages for OpenStack are built under sub-projects of the OBS Cloud:OpenStack repository. See OpenStack and Crowbar development process for the workflow.
zypper in -t pattern openstack-controller openstack-compute-node
will install the following OpenStack components on one host:
- OpenStack Compute: Nova
- OpenStack Image Service: Glance
- OpenStack Identity Service: Keystone
- OpenStack Dashboard: Horizon
The package openstack-quickstart provides the script openstack-quickstart-demosetup which will configure a working demo setup of openstack on your host. If you intend to add more nodes to your cloud, best set the IP value in the openstack-quickstart-demosetup script to your public IP-address.
Before running openstack-quickstart-demosetup you should set the testnet variable in it to an ip range that is available in your local network.
The credentials to login to the openstack dashboard webapp are: admin:openstack
[edit] OpenStack Appliance Quickstart
If you want a usable test deployment you need one machine that supports hardware virtualization. On Linux you can test that with
grep -q -e vmx -e svm /proc/cpuinfo && echo OK || echo no sorry
You also need at least 3GB RAM and an empty / spare harddisk.
Download the 315MB Preload ISO (needs login).
Burn the iso image onto a CD using
cdrecord ~/Download/SUSE_Cloud_Powered_by_OpenStacktm.x86_64-0.0.51.preload.iso
Booting the CD on your machine with the empty HDD allows you to easily dump the cloud software onto the HDD. You can detach other HDDs to make sure that they are not accidentally overwritten.
When the installed system has booted up, first accept the SLES license with "y". Next, set the hostname to your liking, enable the checkbox "Assign Hostname to Loopback IP". On the next dialog, make sure that there is a Network Bridge entry with DHCP. If it is not there, select "Change" and "Reset to defaults". Hit "Next". Wait a minute for the "login:" promt to appear. Then you can log in with username root and password openstack. You should also be able to access the dashboard with a web-browser on the machine's IP using "admin" or "demo" as username and "openstack" as password. Under System Panel / Services, the dashboard should show 7 green entries.
To upload an image to your new cloud, you first have to have it as HDD image on the cloud host. E.g. you can grab a minimalist openSUSE-11.4 image (135MB) by doing
# in a root shell curl http://mirror.zq1.de/opensuse/images/openSUSE_11.4_JeOS.i686-0.0.1.raw.gz | gzip -d > jeos.raw # Or build and download such images from http://susestudio.com glance -A $TOKEN add name="jeos" is_public=True < jeos.raw # to import it glance -A $TOKEN index # should show the added image nova image-list # should show the added image, too # tell it about what network address range to use for VMs: nova-manage network create --fixed_range_v4=10.10.134.16/29 --label=testnet nova flavor-list # shows available VM sizes nova boot --flavor 2 --image 1 test # starts a small VM named "test" nova list # shows running VMs vncviewer $YOURHOSTIP:0 # should show the first running VM # first VM boot always takes roughly four extra minutes for the resize2fs # network access from the outside is blocked by default in the cloud-firewall, so you have to allow it with nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0 # to allow ping #nova secgroup-add-rule default tcp 22 22 0.0.0.0/0 # to allow only SSH or do nova secgroup-add-rule default tcp 1 65535 0.0.0.0/0 # to allow all TCP nova secgroup-add-rule default udp 1 65535 0.0.0.0/0 # and all UDP nova secgroup-list-rules default # lists the rules # Now you should be able to ssh root@YOURVMIP # password: linux
and have a lot of fun...
[edit] Extra Notes
If you had shutdown a VM, you can restart it with
nova reboot 1 # where 1 is the VM's ID that can be seen in 'nova list'
[edit] Getting extra compute-nodes into your cloud
The default appfault appliance is designed to be simple to setup as a single-node cloud. To be able to add more nodes to your cloud, you first need to adapt some config files on the cloud-controller. You must edit /etc/nova/nova.conf and /etc/nova/api-paste.ini to replace all occurrences of 127.0.0.1 and localhost with the actual public IP of your cloud-controller. Then restart all active openstack-nova services.
On the additional node, you only need
zypper in -t pattern openstack-compute-node edit /usr/bin/openstack-quickstart-extranodesetup # set IP to your cloud controller's openstack-quickstart-extranodesetup
If you ran your controller setup with the wrong IP, you need to
echo "delete from endpoint_templates;" | sqlite3 /var/lib/keystone/keystone.db
and rerun the demosetup's endpoint creation lines with the right IP value for "nova list" to work from other machines.