<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.openstack.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nimbosa</id>
		<title>OpenStack - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.openstack.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Nimbosa"/>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/wiki/Special:Contributions/Nimbosa"/>
		<updated>2026-07-08T18:54:54Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.28.2</generator>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=SmartOS&amp;diff=48589</id>
		<title>SmartOS</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=SmartOS&amp;diff=48589"/>
				<updated>2014-04-14T14:00:17Z</updated>
		
		<summary type="html">&lt;p&gt;Nimbosa: Nimbosa moved page Smartos to SmartOS: SmartOS is the proper typography per official documents&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
= [[OpenStack]]/SmartOS Compute =&lt;br /&gt;
&lt;br /&gt;
This is a work-in-progress page about [[OpenStack]] and SmartOS.&lt;br /&gt;
&lt;br /&gt;
= Getting a Development Environment Going for SmartStack =&lt;br /&gt;
&lt;br /&gt;
'''TODO''': Put this under control of Chef/Puppet&lt;br /&gt;
&lt;br /&gt;
* dev: need a vagrant smartos box - use veewee&lt;br /&gt;
* prod: DHCP, PXE boot, foreman, razor&lt;br /&gt;
&lt;br /&gt;
Current assumption for now is that there is a controller node running with all necessary services (like keystone). This could be a devstack environment. It is also possible to get these service running in separate zones on SmartOS btw. I currently use a devstack (Grizzly) environment on the controller node. The IPs which interconnect the two VMs are 192.168.56.101 (SmartOS) and 192.168.56.102.&lt;br /&gt;
&lt;br /&gt;
I will not go into detail on how [http://www.devstack.org to run devstack] on the controller node - it's straight forward.&lt;br /&gt;
&lt;br /&gt;
== The basics ==&lt;br /&gt;
&lt;br /&gt;
=== Getting SmartOS ===&lt;br /&gt;
&lt;br /&gt;
Check out: &lt;br /&gt;
&lt;br /&gt;
* [http://wiki.smartos.org/display/DOC/SmartOS+on+VirtualBox%20 SmartOS wiki hints]&lt;br /&gt;
* [http://www.perkin.org.uk/posts/automated-virtualbox-smartos-installs.html Automatically creating a SmartOS VirtualBox VM]&lt;br /&gt;
&lt;br /&gt;
If you use the script above, modify the SmartOS VirtualBox VM to have two NICs configured, one with Internet access (NAT) the other one host-only.&lt;br /&gt;
&lt;br /&gt;
=== Onwards...===&lt;br /&gt;
&lt;br /&gt;
Then get `pkgin` running in the global zone:&lt;br /&gt;
&lt;br /&gt;
    $ cd /&lt;br /&gt;
    $ curl -k http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2013Q1-x86_64.tar.gz | gzcat | tar -xf -&lt;br /&gt;
    $ pkg_admin rebuild&lt;br /&gt;
    $ pkgin -y up&lt;br /&gt;
&lt;br /&gt;
Installed some packages which are needed or come in handy (mc, vim) during the next steps:&lt;br /&gt;
&lt;br /&gt;
    $ pkgin install mc vim scmgit python2.7 py27-pip py27-expat py27-sqlite2 py27-mysqldb gcc47 gnu-binutils libxslt&lt;br /&gt;
&lt;br /&gt;
Get the code &amp;amp; install the dependencies needed:&lt;br /&gt;
&lt;br /&gt;
    $ mkdir -p /zones/workspace&lt;br /&gt;
    $ cd /zones/workspace&lt;br /&gt;
    $ git clone git://github.com/tmetsch/nova.git -b smartos/grizzly&lt;br /&gt;
    $ cd nova/tools&lt;br /&gt;
    $ export PATH=/opt/local/gcc47/bin/:$PATH&lt;br /&gt;
    $ export CFLAGS=&amp;quot;-D_XPG6 -std=c99&amp;quot;&lt;br /&gt;
    $ pip install -r pip-requires&lt;br /&gt;
&lt;br /&gt;
== Configuring the SmartOS Compute Node ==&lt;br /&gt;
&lt;br /&gt;
Edit sample `./etc/nova/nova.conf` file:&lt;br /&gt;
&lt;br /&gt;
    [DEFAULT]&lt;br /&gt;
    rabbit_host=192.168.56.102&lt;br /&gt;
    rabbit_password=secret&lt;br /&gt;
    verbose=True&lt;br /&gt;
    fake_network=True&lt;br /&gt;
    auth_strategy=keystone&lt;br /&gt;
    # network_manager=nova.network.manager.FlatDHCPManager&lt;br /&gt;
    glance_api_servers=192.168.56.102:9292&lt;br /&gt;
    sql_connection=mysql://root:secret@192.168.56.102/nova?charset=utf8&lt;br /&gt;
    compute_driver=nova.virt.smartosapi.driver.SmartOSDriver&lt;br /&gt;
&lt;br /&gt;
Create a symlink `/opt/local/bin/python` to `/opt/local/bin/python2.7`&lt;br /&gt;
&lt;br /&gt;
    $ ln -s /opt/local/bin/python2.7 /opt/local/bin/python&lt;br /&gt;
&lt;br /&gt;
Run `nova-compute`:&lt;br /&gt;
&lt;br /&gt;
    $ export LD_LIBRARY_PATH=/opt/local/lib&lt;br /&gt;
    $ bin/nova-compute --config-file etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
Run `nova-network`:&lt;br /&gt;
&lt;br /&gt;
    $ export LD_LIBRARY_PATH=/opt/local/lib&lt;br /&gt;
    $ bin/nova-network --config-file etc/nova/nova.conf&lt;br /&gt;
&lt;br /&gt;
At this point you will have the set of services necessary to begin provisioning VMs.&lt;br /&gt;
&lt;br /&gt;
== Starting a SmartOS image ==&lt;br /&gt;
&lt;br /&gt;
Get an image (make sure it is f9e4be48-9466-11e1-bc41-9f993f5dff36 for now - smartos64 v1.6.3 - [https://github.com/dstroppa/openstack-smartos-nova-grizzly/blob/master/nova/virt/smartosapi/zone_image.py#L40 See this line]):&lt;br /&gt;
&lt;br /&gt;
    $ imgadm import f9e4be48-9466-11e1-bc41-9f993f5dff36&lt;br /&gt;
    $ zfs snapshot zones/f9e4be48-9466-11e1-bc41-9f993f5dff36@now&lt;br /&gt;
    $ zfs send zones/f9e4be48-9466-11e1-bc41-9f993f5dff36@now &amp;gt; /zones/workspace/smartos.img&lt;br /&gt;
&lt;br /&gt;
Now on the controller node - register it with glance:&lt;br /&gt;
&lt;br /&gt;
    $ cd /zones/workspace&lt;br /&gt;
    $ glance image-create --name 'smartos' --is-public 'true' --container-format 'bare' --disk-format 'raw' --property 'zone=true' &amp;lt; smartos.img&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Boot a instance:&lt;br /&gt;
&lt;br /&gt;
    $ nova boot --flavor=m1.nano --image=smartos testserver --availability-zone nova:08-00-27-ee-14-2a&lt;br /&gt;
&lt;br /&gt;
'''Note''': It might be needed to change to policies for the user you are using to start the instance - must allow for forced_hosts.&lt;br /&gt;
&lt;br /&gt;
Check instance:&lt;br /&gt;
&lt;br /&gt;
    $ zoneadm list -cv&lt;br /&gt;
    ID NAME             STATUS     PATH                           BRAND    IP&lt;br /&gt;
    0 global           running    /                              liveimg  shared&lt;br /&gt;
    1 e99947b5-3578-4f4b-b102-d6ef5706b173 running    /zones/e99947b5-3578-4f4b-b102-d6ef5706b173 joyent   excl&lt;br /&gt;
&lt;br /&gt;
== Coding against it with PyCharm's remote interpreter option ==&lt;br /&gt;
&lt;br /&gt;
PyCharm offers a nice [http://www.jetbrains.com/pycharm/webhelp/configuring-remote-interpreters-via-ssh.html remote interpreter] features. To set it up do:&lt;br /&gt;
&lt;br /&gt;
* Configure Remote Interpreter: Settings &amp;gt; Project Interpreters &amp;gt; Python Interpreters &amp;gt; Add (Remote)&lt;br /&gt;
* Configure Deployment Settings: Settings &amp;gt; Deployment &amp;gt; Add&lt;br /&gt;
** Do not forget to set proper path mappings&lt;br /&gt;
** Include .git in the deployment options tab&lt;br /&gt;
* Right click in the project tree &amp;gt; Upload to **your name here**&lt;br /&gt;
* Create a new Python run configuration with the Remote Interpreter&lt;br /&gt;
** Do not forget to set the '--config-file' script parameter&lt;br /&gt;
** Alter the Path environment and add: /smartdc/bin&lt;br /&gt;
&lt;br /&gt;
Now you can run nova-compute and nova-network from you IDE on the SmartOS node.&lt;br /&gt;
&lt;br /&gt;
= Some helpers =&lt;br /&gt;
&lt;br /&gt;
== Getting the Code ==&lt;br /&gt;
&lt;br /&gt;
The code is currently not in the mainline code base. The latest version is available at:&lt;br /&gt;
&lt;br /&gt;
* https://github.com/hvolkmer/nova/tree/smartosfolsom&lt;br /&gt;
* https://github.com/dstroppa/openstack-smartos-nova-grizzly&lt;br /&gt;
* https://github.com/tmetsch/nova/tree/smartos/grizzly&lt;br /&gt;
&lt;br /&gt;
Once the code is mature enough it should be easy to integrate the code into the main.&lt;br /&gt;
&lt;br /&gt;
== Setting up an environment ==&lt;br /&gt;
&lt;br /&gt;
There is also setup script that you can use to create an environment; similar to devstack but focussed on SmartOS: https://github.com/hvolkmer/openstack-smartos &lt;br /&gt;
&lt;br /&gt;
This is a work in progess. YMMV. Additions welcome.&lt;br /&gt;
&lt;br /&gt;
This Metsch also has a setup script. &lt;br /&gt;
&lt;br /&gt;
=== Running the metadata service ===&lt;br /&gt;
&lt;br /&gt;
1. Add these options to compute.conf: metadata_listen=169.254.169.254 and metadata_listen_port=80&lt;br /&gt;
2. Configure metadata interface like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
dladm create-vnic -l e1000g0 meta0&lt;br /&gt;
ifconfig meta0 plumb&lt;br /&gt;
ifconfig meta0 169.254.169.254/32&lt;br /&gt;
ifconfig meta0 up&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
3. Then start /openstack/nova/bin/nova-api-metadata --config-file=/openstack/cfg/compute.conf in the global (compute) zone&lt;br /&gt;
&lt;br /&gt;
4. When booting VMs I currently force the default route IP to be the IP of the compute zone, so that the metadata IP is reachable&lt;br /&gt;
&lt;br /&gt;
==  Install Newrelic == &lt;br /&gt;
&lt;br /&gt;
    $ pkgin install nrsysmond&lt;br /&gt;
    $ vi /opt/local/etc/nrsysmond.cfg&lt;br /&gt;
    $ svcadm enable nrsysmond:default&lt;br /&gt;
&lt;br /&gt;
== Install Puppet == &lt;br /&gt;
&lt;br /&gt;
    $ pkgin in ruby19-puppet&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
&lt;br /&gt;
    $ pkgin in ruby18-puppet&lt;br /&gt;
&lt;br /&gt;
== Install Chef == &lt;br /&gt;
&lt;br /&gt;
    $ pkgin in ruby19&lt;br /&gt;
    $ gem install chef&lt;br /&gt;
&lt;br /&gt;
= Next development steps =&lt;br /&gt;
&lt;br /&gt;
As Basic VM handling is working now the following dev steps should happen:&lt;br /&gt;
&lt;br /&gt;
* add unit tests to fixate the current VM start/stop behaviour for SmartOS &lt;br /&gt;
* add networking manager based on the VLANManager but integrate with vmadm/crossbow instead of the Linux way&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
* http://www.cloudcomp.ch/2013/04/openstack-on-smartos/&lt;br /&gt;
* http://blog.hendrikvolkmer.de/2012/08/31/porting-openstack-to-smartos/&lt;br /&gt;
* http://www.nohuddleoffense.de/2012/02/12/smartstack-smartos-openstack-part-1/&lt;br /&gt;
* https://blueprints.launchpad.net/nova/+spec/smartos-support&lt;br /&gt;
* https://docs.google.com/presentation/d/1N2x1itaMc9h7q-6520vuFmmjT0MXrIt1MdfAoGnENDI/edit&lt;br /&gt;
* http://andy.edmonds.be/post/smartos-openstack&lt;br /&gt;
* http://www.nohuddleoffense.de/2012/02/12/smartstack-smartos-openstack-part-2/&lt;/div&gt;</summary>
		<author><name>Nimbosa</name></author>	</entry>

	<entry>
		<id>https://wiki.openstack.org/w/index.php?title=Smartos&amp;diff=48590</id>
		<title>Smartos</title>
		<link rel="alternate" type="text/html" href="https://wiki.openstack.org/w/index.php?title=Smartos&amp;diff=48590"/>
				<updated>2014-04-14T14:00:17Z</updated>
		
		<summary type="html">&lt;p&gt;Nimbosa: Nimbosa moved page Smartos to SmartOS: SmartOS is the proper typography per official documents&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[SmartOS]]&lt;/div&gt;</summary>
		<author><name>Nimbosa</name></author>	</entry>

	</feed>