SmartStack = SmartOS + OpenStack (Part 3)
February 28th, 2012 • Comments Off on SmartStack = SmartOS + OpenStack (Part 3)This is the third part os the blog post series. Previous parts can be found here: 1 2
To ensure the proper startup of nova-compute we will register it using SMF – this will also increase the dependability of the services. To start we will define a properties file for nova-compute – we will be using a glance and rabbitMQ host which run on a different host:
--connection_type=fake --glance_api_servers=192.168.56.101:9292 --rabbit_host=192.168.56.101 --rabbit_password=foobar --sql_connection=mysql://root:foobar@192.168.56.101/nova
We will store this contents in the file /data/workspace/smartos.cfg. We will also create an XML file with the manifest definition – it has some dependencies defined:
<?xml version='1.0'?> <!DOCTYPE service_bundle SYSTEM '/usr/share/lib/xml/dtd/service_bundle.dtd.1'> <service_bundle type='manifest' name='openstack'> <service name='openstack/nova/compute' type='service' version='0'> <create_default_instance enabled='true'/> <single_instance/> <dependency name='fs' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/system/filesystem/local'/> </dependency> <dependency name='net' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/network/physical:default'/> </dependency> <dependency name='zones' grouping='require_all' restart_on='none' type='service'> <service_fmri value='svc:/system/zones:default'/> </dependency> <exec_method name='start' type='method' exec='/usr/bin/nohup /data/workspace/nova/bin/nova-compute --flagfile=/data/workspace/smartos.cfg &' timeout_seconds='60'> <method_context> <method_environment> <envvar name="PATH" value="/ec/bin/:$PATH"/> </method_environment> </method_context> </exec_method> <exec_method name='stop' type='method' exec=':kill' timeout_seconds='60'> <method_context/> </exec_method> <stability value='Unstable' /> </service> </service_bundle>
This can be imported using the svccfg command. After doing so we can use al the known commands to verify all is up and running:
[root@08-00-27-e3-a9-19 /data/workspace]# svcs -p openstack/nova/compute STATE STIME FMRI online 14:04:52 svc:/openstack/nova/compute:default 14:04:51 3142 python
Now up to integrate vmadm…