Skip to content

Instantly share code, notes, and snippets.

@chorrell
Last active December 23, 2015 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chorrell/6688898 to your computer and use it in GitHub Desktop.
Save chorrell/6688898 to your computer and use it in GitHub Desktop.
user-script example for the joyent api. In this example, provision a base 13.1.0 image (f669428c-a939-11e2-a485-b790efc0f0c1) using package g3-g3-standard-0.625-smartos (6a6c0056-38b9-4982-90ad-682d63970b4) called base-13.1.0-with-git" with git installed
The script (/Users/christopher/script.sh):
/opt/local/bin/pkgin -y install scmgit
The api command:
Create a machine and pass the absolute path of the script to --script:
sdc-createmachine --dataset f669428c-a939-11e2-a485-b790efc0f0c1 --package 6a6c0056-38b9-4982-90ad-682d63970b4c --name base-13.1.0-with-git --script /Users/christopher/script.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment