runInstances
The runInstances method is used for provisioning and you must specify the BMC Cloud Lifecycle Management service offering name as image ID as the method argument. You can also use this method to onboard an Amazon Machine Instance (AMI) or Vitual Machine (VM) templates.
The following table depicts the tasks to be performed and the results while performing the onboarding or provisioning procedure using the runInstances method:
Procedure | Task | Result |
---|---|---|
Onboarding an AMI | Use the runInstances method for onboarding an AMI, by specifying ami id as image id in method. | While executing the runinstance method for onboarding an AMI, CLM AWS SDK performs the following tasks:
|
Onboarding an on-premise template | Use the runInstances method for onboarding the on-premise templates, by specifying image id in IR-<TemplateName> format. For example: To onboard RHEL6 template, you must specify the image id as IR-RHEL6. | While executing the runinstance method for onboarding an on-premise template, CLM AWS SDK performs the following tasks:
|
Provision a service | Use the runInstances method to provision a service in BMC Cloud Lifecycle Management, by supplying service offering name as Image ID in the method | While executing the runinstance method for provisioning a service, CLM AWS SDK provisions a service in Amazon cloud or an on-premise cloud. |
Before you begin
Prior to using the runInstances method, ensure that the following condition exists:
- You have the AMI ID from the Amazon portal. See Consolidated-list-of-configuration-settings-for-Amazon-provisioning for details.
- You have supplied the configuration parameters to the CLMEC2Client constructor or have specified in the configuration file. See CLM-AWS-SDK-syntax-and-usage for details.
- (Applies for on-premise cloud while onboarding) On-premise template (for example: VMware template) must exist in BMC Server Automation (BSA) as virtual guest template and a corresponding product catalog (PDC) must be created in cloud database.
(Applies for on-premise cloud while onboarding) You must provide a name for service blueprint as configuration parameter in the <ImageId>.blueprintname=<Service Blueprint Name> format. Here you must replace <imageId> with name of template and the <blueprint name> with the name of service blueprint used.
For example: To onboard an image VMW-W2K8-64B-20GB you must have the configuration parameter in config.properties set as VMW-W2K8-64B-20GB.blueprintname=Windows 2008 Service.
Request
Using com.amazonaws.services.ec2.model.RunInstancesRequest
Using com.bmc.cloud.sdk.aws.model.RunServiceInstancesRequest
Extends: com.amazonaws.services.ec2.model.RunInstancesRequest
Response
com.bmc.cloud.sdk.aws.model.RunServiceInstancesResult
Extends: com.amazonaws.services.ec2.model.RunInstancesResult
com.bmc.cloud.sdk.aws.model.RunSingleServiceInstancesResult
Extends: None
This is CLM AWS SDK construct only. Does not have direct mapping to AWS. Represents one service instance corresponding to collection of
com.amazonaws.services.ec2.model.Reservation
This is an AWS entity. Same class is used in CLM AWS SDK. Logically it is mapped to BMC Cloud Lifecycle Management resource set.
com.bmc.cloud.sdk.aws.model.ServerInstance
Extends: com.amazonaws.services.ec2.model.Instance
Related topic