The dpmec2 run command creates an Amazon EC2 instance.
Important! Amazon EC2 lets you create an instance of a public image specifying a key pair. If the key is not provided, the instances are inaccessible.
This command has the following format:
dpmec2 run [-sc sc_url] -image imageID [-group groupID[,groupID]] [-key_pair keypair] [-os_type {linux|windows|other}] [-type instancesize] [-user_data string] [-zone placement] [-wait [timeout]] -subnet subnet [-pre] [-post]
(Optional) Defines the URL for the service controller host.
Example: https://hostname:port/...
Defines the fully qualified host where the service controller is installed.
Example: localhost.ca.com
Defines the listening port for the service controller server.
Example: 80
Defines the image from which to create an instance.
Defines the security group to which the instance belongs.
Defines the key pair the instance uses.
Defines the operating system that runs on the instance.
Defines the instance size. Valid entries: micro | small | large | xl | high_CPU_med | high_CPU_xl | high_Mem_xl | high_Mem_x2 | high_Mem_x4 | Cluster | default small
Defines the data available to the instance. The user data must be quoted if it contains any spaces.
Defines the Availability zone where the instance is run.
Specifies that the CLI displays the job status and does not return until the operation completes, fails, or the timeout period is met (if timeout is specified). If you do not specify the -wait option, the CLI returns without waiting for completion. If there is no response, the optional timeout value defines the timeout period in minutes. If you specify the -wait option with no timeout value, the CLI uses the default wait time from the sdadapter.conf (dpmsd only) or imaging.conf (all other CLIs) files, or defaults to 120 minutes. In addition to any positive integer, you can specify zero (0) to wait indefinitely.
Defines the subnet.
(Optional) Specifies whether to generate an event before the operation is performed.
(Optional) Specifies whether to generate an event after the operation is performed.
Example: Create and Instance with User Data
This example creates an instance and passes user data and waits up to 20 minutes for it to finish.
dpmec2 run -image ami-54bc27fg -key_pair pr_kp -user_data “Payroll System” -wait 20
Copyright © 2013 CA. All rights reserved. |
|