mirror of https://github.com/apache/jclouds.git
More doc for compute2.clj. Added example to ns-doc.
This commit is contained in:
parent
a70c672d6a
commit
fbe02ae4d8
|
@ -27,7 +27,35 @@
|
|||
slicehost, elastichosts-lon-p, elastichosts-sat-p, elastichosts,
|
||||
openhosting-east1, serverlove-z1-man, skalicloud-sdg-my, deltacloud]
|
||||
|
||||
Here's an example of getting some compute configuration from rackspace:"
|
||||
Here's an example of getting some compute configuration from rackspace:
|
||||
|
||||
(use 'org.jclouds.compute2)
|
||||
(use 'clojure.pprint)
|
||||
|
||||
(def provider \"cloudservers\")
|
||||
(def provider-identity \"username\")
|
||||
(def provider-credential \"password\")
|
||||
|
||||
;; create a compute service
|
||||
(def compute
|
||||
(compute-service provider provider-identity provider-credential))
|
||||
|
||||
(pprint (locations compute))
|
||||
(pprint (images compute))
|
||||
(pprint (nodes compute))
|
||||
(pprint (hardware-profiles compute)))
|
||||
|
||||
Here's an example of creating and running a small linux node in the group webserver:
|
||||
|
||||
;; create a compute service using ssh and log4j extensions
|
||||
(def compute
|
||||
(compute-service
|
||||
provider provider-identity provider-credential :ssh :log4j))
|
||||
|
||||
(create-node \"webserver\" compute)
|
||||
|
||||
See http://code.google.com/p/jclouds for details.
|
||||
"
|
||||
(:use org.jclouds.core
|
||||
(clojure.contrib logging core))
|
||||
(:require
|
||||
|
|
Loading…
Reference in New Issue