tag | 7190c1bdc4c3c6888af307b49a1e5827d8bb432d | |
---|---|---|
tagger | Ioannis Canellos <iocanel@apache.org> | Wed Jul 25 13:33:17 2012 +0300 |
object | 350d502c7170fc9b3f76b6106f66d2be4deaa90b |
[maven-release-plugin] copy for tag jclouds-karaf-1.5.0-beta.8
commit | 350d502c7170fc9b3f76b6106f66d2be4deaa90b | [log] [tgz] |
---|---|---|
author | Ioannis Canellos <iocanel@apache.org> | Wed Jul 25 13:33:14 2012 +0300 |
committer | Ioannis Canellos <iocanel@apache.org> | Wed Jul 25 13:33:14 2012 +0300 |
tree | cedbdd2b8d41c201abc388ee3a702b94e2e8a921 | |
parent | a386a50b99ddd5e7e452f968f728abb6a3b45775 [diff] |
[maven-release-plugin] prepare release jclouds-karaf-1.5.0-beta.8
This project currently hosts a Karaf feature for easy installation of JClouds inside Apache Karaf.
On Karaf 2.2.5 or later:
Install the feature and a provider for blobstore and compute service:
karaf@root> features:addurl mvn:org.jclouds.karaf/jclouds-karaf/1.5.0-SNAPSHOT/xml/features karaf@root> features:install jclouds-aws-s3 karaf@root> features:install jclouds-aws-ec2
Install Karaf Commands:
karaf@root> features:install jclouds-commands
Jclouds Karaf provides Managed Service Factories for blobstores, so creating a BlobStore Service is as easy as creating configuration.
Create a sample blobstore service, by using the console:
karaf@root> config:edit org.jclouds.blobstore-s3 karaf@root> config:propset provider aws-s3 karaf@root> config:propset identity XXXXXXXXX karaf@root> config:propset credential XXXXXXXXX karaf@root> config:update
You can use the shell commands to list, create, delete, read or write to a blob:
karaf@root> jclouds:blobstore-write BUCKET_NAME BLOB_NAME payload karaf@root> jclouds:blobstore-read BUCKET_NAME BLOB_NAME
This works well for String payloads, but for binary payloads the user can use the url to be used as input or output for the commands:
karaf@root> jclouds:blobstore-write BUCKET_NAME BLOB_NAME URL_POINTING_TO_THE_PAYLOAD. karaf@root> jclouds:blobstore-read BUCKET_NAME BLOB_NAME LOCAL_FILE_TO_STORE_THE_BLOB.
If the payload represents a URI the content of the URL will be written instead. You can bypass this by specifying the --store-url and store the url as a string.
The commands above are usefull when using the shell, but most of the time you will want the use of blobstore to be transparent. Jclouds Karaf also provides a url handler which will allow you to use blobstore by using URLs of the following format:
blob:/PROVIDER/CONTAINER/BLOB
A Funny Example: You can copy a bundle to a blob and install it directly from there:
karaf@root> features:install jclouds-url-handler karaf@root>osgi:install -s blob:/PROVIDER/CONTAINER/PATH_TO_BUNDLE
Managed Service Factories are also provided for ComputeService. Again all you need to do is to create a configuration and the service will automatically created and exported for you.
karaf@root> config:edit org.jclouds.compute-ec2 karaf@root> config:propset provider aws-ec2 karaf@root> config:propset identity XXXXXXXXX karaf@root> config:propset credential XXXXXXXXX karaf@root> config:propset jclouds.ec2.ami-owners XXXXXXXXX karaf@root> config:update
Use the compute service commands
karaf@root> jclouds:node-create --imageId YOUR_IMAGE_ID --locationId YOUR_LOCATION_ID GROUPNAME karaf@root> jclouds:node-list.
If you don't want/need to specify specific image, you specify the os family and the os version
karaf@root> jclouds:node-create --os-family OS_FAMILY --os-version OS_VERSION --locationId YOUR_LOCATION_ID GROUPNAME
Note: You can supply additional options to select hardware etc.
Run a script to a single node or a group of nodes:
karaf@root> jclouds:group-runscript --script-url URL_OF_THE_SCRIPT GROUPNAME. karaf@root> jclouds:node-runscript --script-url URL_OF_THE_SCRIPT NODEID.
For simple commands you can just inline the command, for example to get the uptime of the node:
karaf@root> jclouds:group-runscript --direct uptime GROUPNAME. karaf@root> jclouds:node-runscript --direct uptime NODEID.
Or you can use whatever command you want.
Shutdown all your nodes or the nodes of a specific group:
karaf@root> jclouds:group-destroy GROUPNAME karaf@root> jclouds:node-destroy-all GROUPNAME
Most of the commands support tab completion, in order to help the user easily complete node ids, images, locations, blob containers etc.
Copyright (C) 2009-2011 jclouds, Inc.
Licensed under the Apache License, Version 2.0