README.md - improved

This commit is contained in:
Andrea Turli 2012-03-28 21:59:16 +01:00
parent 35a88b7f6f
commit c436b1ef50
1 changed files with 72 additions and 64 deletions

136
README.md
View File

@ -3,35 +3,6 @@ jclouds
jclouds is an open source library that helps you get started in the cloud and reuse your java and clojure development skills. Our api allows you freedom to use portable abstractions or cloud-specific features. We test support of 30 cloud providers and cloud software stacks, including Amazon, GoGrid, Ninefold, vCloud, OpenStack, and Azure. jclouds is an open source library that helps you get started in the cloud and reuse your java and clojure development skills. Our api allows you freedom to use portable abstractions or cloud-specific features. We test support of 30 cloud providers and cloud software stacks, including Amazon, GoGrid, Ninefold, vCloud, OpenStack, and Azure.
We offer several API abstractions as java and clojure libraries. The following are the most mature: We offer several API abstractions as java and clojure libraries. The following are the most mature:
BLOBSTORE
-----------
Simplifies dealing with key-value providers such as Amazon S3. For example, BlobStore can give you a simple Map view of a container.
BlobStore Example (Java):
// init
context = new BlobStoreContextFactory().createContext(
"aws-s3",
accesskeyid,
secretaccesskey);
blobStore = context.getBlobStore();
// create container
blobStore.createContainerInLocation(null, "mycontainer");
// add blob
blob = blobStore.blobBuilder("test").payload("testdata").build();
blobStore.putBlob("mycontainer", blob);
BlobStore Example (Clojure):
(use 'org.jclouds.blobstore2)
(def *blobstore* (blobstore "azureblob" account encodedkey))
(create-container *blobstore* "mycontainer")
(put-blob *blobstore* "mycontainer" (blob "test" :payload "testdata"))
COMPUTESERVICE
---------------
Simplifies the task of managing machines in the cloud. For example, you can use ComputeService to start 5 machines and install your software on them.
Features Features
-------- --------
Even if you don't need the portable apis we provide, or could roll it your own, programming against cloud environments can be challenging. We focus on the following areas so that you can focus on using the cloud, rather than troubleshooting it! Even if you don't need the portable apis we provide, or could roll it your own, programming against cloud environments can be challenging. We focus on the following areas so that you can focus on using the cloud, rather than troubleshooting it!
@ -58,6 +29,78 @@ All of our abstractions are location-aware. For example, you can get ISO-3166 co
* QUALITY * QUALITY
We test every provider with live scenarios before each release. If it doesn't pass, the provider goes into the sandbox. We test every provider with live scenarios before each release. If it doesn't pass, the provider goes into the sandbox.
BlobStore
-----------
Simplifies dealing with key-value providers such as Amazon S3. For example, BlobStore can give you a simple Map view of a container.
BlobStore Example (Java):
// init
context = new BlobStoreContextFactory().createContext(
"aws-s3",
accesskeyid,
secretaccesskey);
blobStore = context.getBlobStore();
// create container
blobStore.createContainerInLocation(null, "mycontainer");
// add blob
blob = blobStore.blobBuilder("test").payload("testdata").build();
blobStore.putBlob("mycontainer", blob);
BlobStore Example (Clojure):
(use 'org.jclouds.blobstore2)
(def *blobstore* (blobstore "azureblob" account encodedkey))
(create-container *blobstore* "mycontainer")
(put-blob *blobstore* "mycontainer" (blob "test" :payload "testdata"))
ComputeService
---------------
Simplifies the task of managing machines in the cloud. For example, you can use ComputeService to start 5 machines and install your software on them.
Compute Example (Java):
// init
context = new ComputeServiceContextFactory().createContext(
"aws-ec2",
accesskeyid,
secretaccesskey,
ImmutableSet.of(new Log4JLoggingModule(), new SshjSshClientModule()));
client = context.getComputeService();
// define the requirements of your node
template = client.templateBuilder().osFamily(UBUNTU).smallest().build();
// setup a boot user which is the same as your login
template.getOptions().runScript(AdminAccess.standard());
// these nodes will be accessible via ssh when the call returns
nodes = client.createNodesInGroup("mycluster", 2, template);
// you can now run ad-hoc commands on the nodes based on predicates
responses = client.runScriptOnNodesMatching(inGroup("mycluster"), "uptime", wrapInInitScript(false));
Compute Example (Clojure):
(use 'org.jclouds.compute2)
; create a compute service using sshj and log4j extensions
(def compute (*compute* "trmk`-ecloud" "user" "password" :sshj :log4j))
; launch a couple nodes with the default operating system, installing your user.
(create-nodes *compute* "mycluster" 2
(TemplateOptions$Builder/runScript (AdminAccess/standard)))
; run a command on that group
(run-script-on-nodes-matching *compute* (in-group? "mycluster") "uptime"
(RunScriptOptions$Builder/wrapInInitScript false))
Check out https://github.com/jclouds/jclouds-examples for more examples!
Downloads Downloads
------------------------ ------------------------
* release notes: http://www.jclouds.org/documentation/releasenotes/1.3 * release notes: http://www.jclouds.org/documentation/releasenotes/1.3
@ -76,44 +119,9 @@ Resources
* Dev group: http://groups.google.com/group/jclouds-dev * Dev group: http://groups.google.com/group/jclouds-dev
* Twitter: http://twitter.com/jclouds * Twitter: http://twitter.com/jclouds
Configuring
-----------
Uptime uses [node-config](https://github.com/lorenwest/node-config) to allow YAML configuration and environment support. Here is the default configuration, taken from `config/default.yaml`:
mongodb:
server: localhost
database: uptime
user: root
password:
monitor:
name: origin
apiUrl: 'http://localhost:8082/api'
pollingInterval: 10000 # ten seconds
updateInterval: 60000 # one minute
qosAggregationInterval: 600000 # ten minutes
timeout: 5000 # five seconds
pingHistory: 8035200000 # three months
http_proxy:
autoStartMonitor: true
server:
port: 8082
To modify this configuration, create a `development.yaml` or a `production.yaml` file in the same directory, and override just the settings you need. For instance, to run Uptime on port 80 in production, create a `production.yaml` file as follows:
server:
port: 80
Using jclouds
-------------
check out our examples site! https://github.com/jclouds/jclouds-examples
License License
------- -------
Copyright (C) 2009-2012 jclouds, Inc. Copyright (C) 2009-2012 jclouds, Inc.
Licensed under the Apache License, Version 2.0 Licensed under the Apache License, Version 2.0