updated examples

This commit is contained in:
Adrian Cole 2010-05-06 09:07:44 -07:00
parent 4e7644bef2
commit fa86b799ab
1 changed files with 21 additions and 2 deletions

View File

@ -26,7 +26,14 @@ BlobStore Example (Java):
// add blob
blob = blobStore.newBlob("test");
blob.setPayload("testdata");
blobStore.putBlob(containerName, blob);
blobStore.putBlob("mycontainer", blob);
BlobStore Example (Clojure):
(use 'org.jclouds.blobstore)
(with-blobstore ["azureblob" account encodedkey]
(create-container "mycontainer")
(upload-blob "mycontainer" "test" "testdata"))
Compute Example (Java):
// init
@ -44,6 +51,18 @@ Compute Example (Java):
// these nodes will be accessible via ssh when the call returns
nodes = client.runNodesWithTag("mycluster", 2, template);
Compute Example (Clojure):
(use 'org.jclouds.compute)
; create a compute service using ssh and log4j extensions
(def compute
(compute-service "terremark" "user" "password" :ssh :log4j))
; use the default node template and launch a couple nodes
; these will have your ~/.ssh/id_rsa.pub authorized when complete
(with-compute-service [compute]
(run-nodes "mycluster" 2))
Downloads:
* distribution zip: http://jclouds.googlecode.com/files/jclouds-1.0-beta-5.zip
* maven repo: http://jclouds.googlecode.com/svn/repo