A set of command line tools is available for the Joyent cloud computing platform which allows you to e.g. list images and create virtual machines. The installation of this set is a bit tricky on CentOS as it requires node.js and this package is not available with yum. So we start with the installation of node.js:

yum install make gcc-c++
wget -N http://nodejs.org/dist/node-latest.tar.gz
tar zxvf node-latest.tar.gz
cd node-v0.8.16
make install

Now that node.js is installed, we can continue with the installation of the Joyent CLI:

npm install smartdc -g

Now it is time to add the Joyent account details to our setup. This is accomplished with the following command:

sdc-setup https://us-west-1.api.joyentcloud.com

We picked one of the four datacenters that Joyent currently has. Feel free to use another one if that better suits your needs. It automatically picked up on the SSH key we already uploaded manually and we use that here. Now edit the ~/.bash_profile file:

export SDC_CLI_URL=https://us-west-1.api.joyentcloud.com
export SDC_CLI_ACCOUNT=name_of_your_account
export SDC_CLI_KEY_ID=name_of_your_key_id
export SDC_CLI_IDENTITY=/path/to/your/.ssh/id_rsa

Please change the values of the last three parameters to your situation. Now start the tool:

# sdc-listdatacenters
Unable to load ssh-agent identities: MissingEnvironmentVariableError: SSH_AUTH_SOCK was not found in your environment
{ [Error: Cannot find module './DTraceProviderBindings'] code: 'MODULE_NOT_FOUND' }
  "us-east-1": "https://us-east-1.api.joyentcloud.com",
  "us-west-1": "https://us-west-1.api.joyentcloud.com",
  "us-sw-1": "https://us-sw-1.api.joyentcloud.com",
  "eu-ams-1": "https://eu-ams-1.api.joyentcloud.com"

It throws some error messages at you, but it seems these can be ignored. If somebody knows how to solve or suppress these error messages, please tell me.

Installing Joyent command line tools on CentOS
Tagged on:     

2 thoughts on “Installing Joyent command line tools on CentOS

  • 2013-01-11 at 02:08

    Fix to that error is to configure with the dtrace option

    • 2013-02-16 at 00:29

      what do you mean to configure with the dtrace option?


Leave a Reply

Your email address will not be published. Required fields are marked *