Skip to content
This repository

A frontend for the SmartDC API from joyent that runs on vanilla SmartOS

branch: master


This project is meant to implement Joyent's cloud API ( on-top of vanilla SmartOS to allow for easier maintenance and handling of the host.

You can use tools like SmartDC CLI (

Note the account part is just grouping machines by the owner_uuid right now.

Getting Started

Watch this first

Grab the SmartDC Tools

You can read the how to get started here: . Or just grab do:

npm install smartdc -g

On your client

  • First clone this repository
  • make bootstrap
  • edit the makefile, change the DEPLOY_* variables to fit your setup
  • make deploy

On your SmartOS Server

The default behaviour for the server is to listen to, you can change this with ./vmwebadm port and host

  • By default there is admin user called admin with the password admin
  • Add users as you want with: ./vmwebadm passwd

Make it a service

  • run ./vmwebadmd install

you can disable the service with ./vmwebadmd disable and enable it with ./vmwebadmd enable

The service is persistent and will survive reboots!

On your client

You can now set up your sdc toos with:

sdc-setup http://<SmartOS IP>
Username (login): (<your user>)
Password: <your pass>

Configuration commands

Configuration tool
  import package <package-file(s)> - imports one or more package files.
  default-dataset <dataset>        - sets the default dataset.
  passwd <user> <pass>             - adds a new user or resets a password for an existing one.
  list users                       - lists all known users
  promote <user>                   - grants a user admin rights.
  demote <user>                    - demotes a user from admin rights.
  delete <user>                    - deletes a user.
  port <port>                      - sets the listen port for the server.
  host <host>                      - sets the listen host for the server.

Currently supported sdc-commands

sdc-getmachine 54e85ffa-988c-47b3-90f1-9ee5c23a8849
sdc-startmachine 40e06b7a-314a-4028-a328-84619c47fc68
sdc-stopmachine 40e06b7a-314a-4028-a328-84619c47fc68
sdc-rebootmachine 40e06b7a-314a-4028-a328-84619c47fc68
sdc-deletemachine 5a749276-9b9f-44b3-83c4-5965a7525646
sdc-createmachine \
--dataset 31bc4dbe-5e06-11e1-907c-5bed6b255fd1 \
--package '{"brand": "joyent","zfs_io_priority": 30,"quota": 20,"nowait": true,"max_physical_memory": 256,"alias": "zone4","nics": [{"nic_tag": "external","ip": "dhcp"}]}'
sdc-createmachine \
--dataset 31bc4dbe-5e06-11e1-907c-5bed6b255fd1 \
--package small
sdc-resizemachine --package '{"max_physical_memory":128}' 54e85ffa-988c-47b3-90f1-9ee5c23a8849

API Overview


[X] ListKeys
[X] GetKey
[X] CreateKey
[X] DeleteKey


This won't be implemented at the current state since it does not make sense.

[-] ListDatacenters
[-] GetDatacenter


[X] ListDatasets
[X] GetDataset


[X] ListPackages
[X] GetPackage


[X] ListMachines
[X] GetMachine
[X] CreateMachine
[X] StopMachine
[X] StartMachine
[X] RebootMachine
[X] ResizeMachine
[ ] CreateMachineSnapshot
[ ] StartMachineFromSnapshot
[ ] ListMachineSnapshots
[ ] GetMachineSnapshot
[ ] DeleteMachineSnapshot
[X] UpdateMachineMetadata
[X] GetMachineMetadata
[X] DeleteMachineMetadata
[X] DeleteAllMachineMetadata
[X] AddMachineTags
[X] ListMachineTags
[X] GetMachineTag
[X] DeleteMachineTag
[X] DeleteMachineTags
[X] DeleteMachine


This part does not really do anything yet, just the management functions to edit instrumentations are present.

[X] DescribeAnalytics
[X] ListInstrumentations
[X] GetInstrumentation
[X] GetInstrumentationValue
[ ] GetInstrumentationHeatmap
[ ] GetInstrumentationHeatmapDetails
[X] CreateInstrumentation
[X] DeleteInstrumentation

In addition to the normal decomposition vmwebadm supports a json base format to describe decompositions, the idea is to allow complex calls take the following example:

sdc-createinstrumentation -m fs -s logical_ops -n '[{"latency": {"count": [{"*": [{"/": ["latency", 1000]}, 1000]},{"+": [{"*": [{"/": ["latency", 1000]}, 1000]}, 999]}]}}]' -p '{"eq": ["optype","write"]}'

this compiles to

  self->start[probefunc] = timestamp;

  @latency[(((timestamp - self->start[probefunc])/1000)*1000),((((timestamp - self->start[probefunc])/1000)*1000)+999)]=count();

The syntax is comparable to the one used for predicates:

aggr={<name>: <aggrdef>}
function={<fn-name>: [<params>+]}
aggrdef={<aggrfn>: [<field>+, <args>+]}
Something went wrong with that request. Please try again.