Recently, I stumbled upon a task to create an openstack setup using devstack in a cell environment.
I am assuming that reader is familiar with openstack and devstack.
The idea I started, with was to have a VM, running nova-api, nova-cell, glance and keystone services.
I created two more VMs on two different XenServer hyervisors to be children cells.
Each child runs nova-cell, nova-compute, nova-network, nova-scheduler and nova-conductor services.
Below are the steps I followed in parent and children to get this working.
Parent
1. Download Devstack
git clone https://github.com/openstack-dev/devstack
2. I had to tweak localrc a bit before stack-up to enable nova-cells. My localrc contained,
enable_service n-cell n-api-meta
disable_service n-cpu, n-net, n-sch
3. Run ./stack.sh. Once stack.sh completed, I tweaked /etc/nova/nova.conf to include
Children
1. Download devstack
git clone https://github.com/openstack-dev/devstack
2. Tweak localrc to contain below content,
enable_service n-cell
disable_service n-api, key, g-api
3. Run ./stack.sh
4. Tweak /etc/nova/nova.conf
[DEFAULT]
quota_driver=nova.quota.NoopQuotaDriver
glance_api_servers=<glance server of parent>
Notice, that I am telling child to use glance server running in parent.
On a side note, these are the essential settings in nova.conf for a compute node on XenServer,
compute_driver = xenapi.XenAPIDriver
firewall_driver = nova.virt.firewall.IptablesFirewallDriver
xenapi_connection_password = ROOT PASSWORD FOR HYPERISOR
xenapi_connection_username = root
xenapi_connection_url = http://HYPERVISOR_IP
Cell Creation
After this set-up, I had to hook up parent cell and children cells together
On parent, run this,
1. nova-manage cell create --name=cell1 --cell_type=child --username=guest --password=password --hostname=<child ip> --port=5672 --virtual_host=/ --woffset=1.0 --wscale=1.0
2. Restart n-cell
On Child, run this,
1. nova-manage cell create --name=parent --cell_type=parent --username=guest --password=password --hostname=<parent ip> --port=5672 --virtual_host=/ --woffset=1.0 --wscale=1.0
2. Restart n-cell.
After this, if you tail logs for n-cell in parents and cell, you should be able to see children trying to update the parent with their capabilities. This concludes your cell set-up.
I am assuming that reader is familiar with openstack and devstack.
The idea I started, with was to have a VM, running nova-api, nova-cell, glance and keystone services.
I created two more VMs on two different XenServer hyervisors to be children cells.
Each child runs nova-cell, nova-compute, nova-network, nova-scheduler and nova-conductor services.
Below are the steps I followed in parent and children to get this working.
Parent
1. Download Devstack
git clone https://github.com/openstack-dev/devstack
2. I had to tweak localrc a bit before stack-up to enable nova-cells. My localrc contained,
enable_service n-cell n-api-meta
disable_service n-cpu, n-net, n-sch
3. Run ./stack.sh. Once stack.sh completed, I tweaked /etc/nova/nova.conf to include
[cells]
enable=True
name=api
cell_type=api
enable=True
name=api
cell_type=api
3. nova-api has to be restarted.
Children
1. Download devstack
git clone https://github.com/openstack-dev/devstack
2. Tweak localrc to contain below content,
enable_service n-cell
disable_service n-api, key, g-api
3. Run ./stack.sh
4. Tweak /etc/nova/nova.conf
[DEFAULT]
quota_driver=nova.quota.NoopQuotaDriver
glance_api_servers=<glance server of parent>
[cells]
enable=True
name=cell1
cell_type=compute
enable=True
name=cell1
cell_type=compute
Notice, that I am telling child to use glance server running in parent.
On a side note, these are the essential settings in nova.conf for a compute node on XenServer,
compute_driver = xenapi.XenAPIDriver
firewall_driver = nova.virt.firewall.IptablesFirewallDriver
xenapi_connection_password = ROOT PASSWORD FOR HYPERISOR
xenapi_connection_username = root
xenapi_connection_url = http://HYPERVISOR_IP
Cell Creation
After this set-up, I had to hook up parent cell and children cells together
On parent, run this,
1. nova-manage cell create --name=cell1 --cell_type=child --username=guest --password=password --hostname=<child ip> --port=5672 --virtual_host=/ --woffset=1.0 --wscale=1.0
2. Restart n-cell
On Child, run this,
1. nova-manage cell create --name=parent --cell_type=parent --username=guest --password=password --hostname=<parent ip> --port=5672 --virtual_host=/ --woffset=1.0 --wscale=1.0
2. Restart n-cell.
After this, if you tail logs for n-cell in parents and cell, you should be able to see children trying to update the parent with their capabilities. This concludes your cell set-up.
I have set up Devstack on 3 servers having IPs 10.10.1.51,10.10.1.53 and 10.10.1.54 which are running Ubuntu 12.04 LTS I configured the devstack on server 53(IP 10.10.1.53) as the parent/api cell and I wasn't able to configure 51 and 54 as child cells. I enabled cells by specifying enable_service n-cell in the respective localrc files.
ReplyDeleteI followed the slideshare presentation by ThoughtWorks
http://www.slideshare.net/openstackindia/8-devstack-beyondhelloworldthe localrc of the child cell contained
MULTI_HOST=True
enable_service n-cell
disable_service n-api
Running stack.sh with this config gave 'unknown database nova_cell' error .
Any help on this will be much appreciated. Thanks in advance! :)
Hi,
ReplyDeleteThanks for the informative post. I would like to know how can I log in the newly created instance on a compute node of a cell?