Previous Topic: dpmec2 manage Command--Manage Amazon Elastic Compute Cloud Instances

Next Topic: Collection Engine Commands

dpmec2 run Command--Create Amazon EC2 Instance

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]] [-region region] [-pre] [-post][-locale iso639value]
-sc sc_url

(Optional) Defines the URL for the service controller host.

Example: https://hostname:port/...

hostname

Defines the fully qualified host where the service controller is installed.

Example: localhost.ca.com

port

Defines the listening port for the service controller server.

Example: 80

-image imageID

Defines the image from which to create an instance.

-group groupID

Defines the security group to which the instance belongs.

-key_pair keypair

Defines the key pair the instance uses.

-os_type linux | windows | other

Defines the operating system that runs on the instance.

-type instancesize

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

-user_data string

Defines the data available to the instance. The user data must be quoted if it contains any spaces.

-zone placementZone

Defines the Availability zone where the instance is run.

-wait [timeout]

Indicates that the CLI displays the status of the job and does not return until the operation completes, fails, or the timeout period is met (if you specify a timeout value). If you do not specify this 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 enter 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, the following timeout value is also possible: 0, Indicates to wait indefinitely.

-region region

Defines any of the regions supported and defined by Amazon.

-pre

(Optional) Specifies whether to generate an event before the operation is performed.

-post

(Optional) Specifies whether to generate an event after the operation is performed.

-locale iso639value

(Optional) Specifies an IS0 639_3166 combination (for example: fr_FR for French) to override the default English output. To use the locale of the command prompt, specify "native".

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