7.3. fabric:cloud-service-add
Abstract
Synopsis
fabric:cloud-service-add [
--help
] [
--provider providerName
] [
--name name
] [
--api APIName
] [
--endpoint URL
] [
--identity accessKeyID
] [
--credential secretAccessKey
] [
--owner owner
] [
--option key=value
] [
--async-registration
]
Description
fabric:cloud-service-list to discover when the initialization has completed.
- Commercial cloud provider—if you are using a commercial cloud provider, JClouds provides prepackaged modules that encapsulate the basic connection details for the provider. The prepackaged modules are available to install as Karaf features (named
jclouds-ProviderName) and encapsulate such details as the endpoint URI, cloud API, and so on.For example, to install an Amazon Web Services (AWS) EC2 cloud provider, you can perform the following steps (assuming you are working in a standalone container):- Install the basic set of fabric cloud commands:
karaf@root> features:install fabric-jclouds
- Install the JClouds module specifically for AWS EC2:
karaf@root> features:install jclouds-aws-ec2
- Add the AWS EC2 provider, specifying the login credentials for your EC2 account:
karaf@root> fabric:cloud-service-add --provider aws-ec2 --identity AccessKeyID --credential SecretAccessKey
- You are now ready to start creating compute instances on the
aws-ec2cloud service, using thefabric:container-create-cloudcommand.
- Private cloud service—if you are hosting your compute instances on a private cloud service, you must specify the connection details more explicitly, by supplying the
--apiand--endpointoptions. In this case, you must also define a name for the cloud service, by supplying the--nameoption.For example, to define a connection to a private cloud service that uses theopenstack-novaAPI through the endpoint,http://172.16.0.1:4000/v2.0/, you can perform the following steps (assuming you are working in a standalone container):- Install the basic set of fabric cloud commands:
karaf@root> features:install fabric-jclouds
- Install the JClouds module for the
openstack-novaAPI:karaf@root> features:install jclouds-api-openstack-nova
- Add the private cloud service, specifying the login credentials, API, and endpoint URL:
karaf@root> fabric:cloud-service-add --name myOpenStack --api openstack-nova --endpoint http://172.16.0.1:4000/v2.0/ --identity AccessKeyID --credential SecretAccessKey
NoteYou can provide additional customisation of the connection by setting options through the--optionflag (which can appear multiple times in the command). - You are now ready to start creating compute instances on the
myOpenStackcloud service, using thefabric:container-create-cloudcommand.
Installing the command in a fabric
fabric-jclouds feature. To install the fabric-jclouds feature, deploy the cloud profile into the current container, using the fabric:container-change-profile command.
root container of the Fabric, you could add the cloud profile as follows:
JBossA-MQ:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1 success JBossA-MQ:karaf@root> fabric:container-change-profile root fabric fabric-ensemble-0000-1 cloud JBossA-MQ:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root* 1.0 true fabric, fabric-ensemble-0000-1, cloud success
Arguments
Table 7.3. fabric:cloud-service-add Arguments
| Argument | Interpretation |
|---|---|
--help | Displays the online help for this command. |
--provider | The name of a commercial cloud provider (for example, aws-ec2 or rackspace). |
--name | The JClouds service context name, which identifies the cloud service uniquely. Defaults to the provider name (as specified by the --provider option). |
--api | Specifies the cloud API (for example, ec2, openstack-nova, or cloudstack). |
--endpoint | Specifies the cloud service's endpoint URL. |
--identity | The identity used to access the cloud service. |
--credential | The credential used to access the cloud service. |
--owner | Specifies the EC2 AMI owner, which enables you to use private images (AWS EC2 only). |
--option | Provider-specific properties. For example: --option jclouds.regions=us-east-1. If you want to specify more than one option, specify this option multiple times. |
--async-registration | Do not wait for the provider registration (that is, complete the registration in a background thread). |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.