2. Set authentication credentials (from account profile)

Omit the secret key if you are running on a very old Unix system that leaks the content of your environment to other users via
ps e. You will then be interactively prompted for your secret key by curl. Alternatively, you can hard-code the value of EHAUTH in your local copy of the scripts, but make sure they aren't world-readable!
$ elastichosts-upload image.raw
Created drive 08c92dd5-70a0-4f51-83d2-835919d254df of size 10000000
Uploading 2 chunks of 5242880 bytes: .. completed
$ elastichosts -c drives create << EOF | grep drive
$ > name TestDrive
$ > size 10000000
$ > EOF
$ drive 08c92dd5-70a0-4f51-83d2-835919d254df
$ elastichosts -f image.raw drives 08c92dd5-70a0-4f51-83d2-835919d254df write
     
The RESTful HTTP cloud computing API allows users to create drives, upload and download drive images, and create and control virtual servers on our infrastructure.

You can download our ready-made command line tools, or make direct calls to the API from your own scripts.

Install our command-line tools

We provide ready-made scripts to let you control your cloud computing platform infrastructure without writing any code.

Ubuntu users can install these with:
Note that you may need to add the Ubuntu universe repositories first.

Other Unix and Windows Cygwin users should download our simple command line tool, drive upload tool and drive download tool.

Once you have these scripts, in just two commands, you can upload a drive image and boot a server. Here is the full input and output to do exactly this.

Each command corresponds to a single API HTTP GET or POST, with the URL corresponding to the command-line arguments, and the input and output data exactly as seen on the command line here.

1. Set API end-point for your availability zone

Substitute api-us-east.crosspeer.com if your account is there.  Alternatively, you can hard-code the value of EHURI in your local copy of the scripts.
3. Create drive and upload image

We use the drive upload tool to automatically upload in gzipped chunks.
NOTE:  for reference, a more basic upload with the raw API would be:
4. Boot a server from the drive

Boot a server from the drive, with 2000 core MHz and 1024 MB RAM.
$ elastichosts -c servers create << EOF
      > name TestServer
      > cpu 2000
      > mem 1024
      > ide:0:0 08c92dd5-70a0-4f51-83d2-835919d254df
      > boot ide:0:0
      > nic:0:model e1000
      > nic:0:dhcp auto
      > smp auto
      > vnc auto
      > vnc:password XXXXXXXX
      > EOF
      server 85ef58c8-6f5d-4f7f-8f1c-0c19d45d7c1c
      name TestServer
      cpu 2000
      smp auto
      smp:cores 1
      smp:sockets 1
      mem 1024
      ide:0:0 08c92dd5-70a0-4f51-83d2-835919d254df
      boot ide:0:0
      nic:0:dhcp auto
      nic:0:dhcp:ip 91.203.56.132
      nic:0:model e1000
      rx 0
      tx 0
      vnc auto
      vnc:ip 91.203.56.132
      vnc:password XXXXXXXX
Crosspeer Cloud Computing Tools
Copyright © 2012 - 2014 Crosspeer, Inc.
               All Rights Reserved