A random collection of posts

Installing Chef-Server in SmartOS


Recently Joyent provided a Chef Server image for SmartOS.

Installing the image on a SmartOS system not managed by the joyent cloud does not work out of the box. The following steps will walk you through the installation of Chef Server on SmartOS.

Install the image

All work is done in the Global Zone. To create the zone we first need to install the image. From the image we then create the zone chef with the ip

Install image
imgadm avail|grep chef
# d2fc0a96-61d1-11e2-8701-c7c137935369 chefserver 1.0.0 smartos 2013-02-04T19:30:16Z
imgadm install d2fc0a96-61d1-11e2-8701-c7c137935369
# image is downloaded
# Check if everything worked:
imgadm list |grep chef
# d2fc0a96-61d1-11e2-8701-c7c137935369 chefserver 1.0.0 smartos 2013-02-04T19:30:16Z

Fix the image

The setup scripts contained in the image need to be fixed, before the installation can proceed:

Fix chef image
cd /zones/d2fc0a96-61d1-11e2-8701-c7c137935369/root/var/zoneinit/includes
echo 'NET0_IP=${PUBLIC_IP}' >>

Install the zone

Install the zone
vmadm create <<EOF
"brand": "joyent",
"dns_domain": "",
"resolvers": [
"alias": "chef",
"hostname": "chef",
"max_physical_memory": 2048,
"quota": 15,
"dataset_uuid": "d2fc0a96-61d1-11e2-8701-c7c137935369",
"delegate_dataset": true,
"autoboot": true,
"nics": [
"nic_tag": "external",
"ip": "",
"netmask": "",
"gateway": "",
"primary": true

The UUID of the new zone will be used as ZONE_UUID.

Using knife

User admin in the new zone gets pre-configured for the new installation. Log into the new zone, and test:

zlogin $ZONE_UUID
# ...
svcs -xv
# hopefully no broken services
svcs '*chef*'
# online 22:38:01 svc:/pkgsrc/chef-expander:default
# online 22:38:02 svc:/pkgsrc/chef-solr:default
# online 22:38:03 svc:/pkgsrc/chef-server-webui:default
# online 22:38:03 svc:/pkgsrc/chef-server:default
su - admin
knife client list
# admin
# chef-validator
# chef-webui

Using the Web Console

Browse to http://YOUR-IP:4040 and log in with chef/dbpass123.