ec2:launch

Full name:

org.kuali.maven.plugins:ec2-maven-plugin:1.0.1:launch

Description:

Connect to EC2 and launch a a single instance configured according to user preferences. By default, the plugin waits until the instance reaches the state of "running" before allowing the build to continue. Once an EC2 instance is "running" Amazon has assigned it a public dns name. The publi dns name, the instance id, and the value of the tag "Name" (if that tag is supplied) are stored as the project properties ec2.instance.dns, ec2.instance.id, ec2.instance.name, respectively. If wait is false, the ec2.instance.dns property will not be set since the instance will not have a public dns name by the time the plugin execution completes.

Attributes:

  • Requires a Maven project to be executed.

Required Parameters

Name Type Since Description
accessKey String - The AWS Access Key Id for an account on EC2
ami String - The AMI to launch
key String - The name of the key to use
secretKey String - The AWS Secret Access Key for an account on EC2
type String - The type of instance to launch
Default value is: c1.medium.

Optional Parameters

Name Type Since Description
encoding String - The encoding of the userDataFile
Default value is: ${project.build.sourceEncoding}.
filterUserData boolean - If true, userData is filtered with current project, environment, and system properties before being supplied to the instance.
securityGroups List - The security groups into which the instance will be launched
state String - The state the instance needs to be in before the plugin considers it to be started.
Default value is: running.
tags List - List of tags to associate with the instance. Tags are key value pairs and can be supplied in the plugin configuration like this:
  <tags>
    <tag>
      <key>Name</key>
      <value>production</value>
    </tag>
    <tag>
      <key>Category</key>
      <value>networking</value>
    </tag>
  </tags>

userData String - Optional user data for the instance
userDataFile File - If supplied, the contents of the file are supplied to the instance as userData
wait boolean - If true, the build will wait until EC2 reports that the instance has reached the state of "running"
Default value is: true.
waitTimeout int - The number of seconds to wait for the instance to start before timing out and failing the build
Default value is: 300.

Parameter Details

accessKey:

The AWS Access Key Id for an account on EC2
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${ec2.accessKey}

ami:

The AMI to launch
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${ec2.ami}

encoding:

The encoding of the userDataFile
  • Type: java.lang.String
  • Required: No
  • Expression: ${ec2.encoding}
  • Default: ${project.build.sourceEncoding}

filterUserData:

If true, userData is filtered with current project, environment, and system properties before being supplied to the instance.
  • Type: boolean
  • Required: No
  • Expression: ${ec2.filterUserData}

key:

The name of the key to use
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${ec2.key}

secretKey:

The AWS Secret Access Key for an account on EC2
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${ec2.secretKey}

securityGroups:

The security groups into which the instance will be launched
  • Type: java.util.List
  • Required: No

state:

The state the instance needs to be in before the plugin considers it to be started.
  • Type: java.lang.String
  • Required: No
  • Expression: ${ec2.state}
  • Default: running

tags:

List of tags to associate with the instance. Tags are key value pairs and can be supplied in the plugin configuration like this:
  <tags>
    <tag>
      <key>Name</key>
      <value>production</value>
    </tag>
    <tag>
      <key>Category</key>
      <value>networking</value>
    </tag>
  </tags>
  • Type: java.util.List
  • Required: No

type:

The type of instance to launch
  • Type: java.lang.String
  • Required: Yes
  • Expression: ${ec2.type}
  • Default: c1.medium

userData:

Optional user data for the instance
  • Type: java.lang.String
  • Required: No
  • Expression: ${ec2.userData}

userDataFile:

If supplied, the contents of the file are supplied to the instance as userData
  • Type: java.io.File
  • Required: No
  • Expression: ${ec2.userDataFile}

wait:

If true, the build will wait until EC2 reports that the instance has reached the state of "running"
  • Type: boolean
  • Required: No
  • Expression: ${ec2.wait}
  • Default: true

waitTimeout:

The number of seconds to wait for the instance to start before timing out and failing the build
  • Type: int
  • Required: No
  • Expression: ${ec2.waitTimeout}
  • Default: 300