1. Introduction

TK

2. Quick Start

See the plugin Quick Start guide.

3. Installation

In BuildConfig.groovy add the following plugin dependency to the plugins section (with the latest version of the plugin specified):

plugins {
	build ':aws-elastic-beanstalk:0.3'
}

4. Plugin Configuration

4.1. Configuring AWS credentials

Config type Variable name Comment

Config.groovy

grails.plugin.awsElasticBeanstalk.awsAccessKeyId grails.plugin.awsElasticBeanstalk.awsAccessKeyId

System properties

AWSAccessKeyId AWSSecretKey

Environment variable

AWS_CREDENTIAL_FILE

TK warning about storing AWS credentials WARNING: secure this key!

TK sample config file here

AWSAccessKeyId=
AWSSecretKey=

4.2. Using a non-default AWS region

By default, the Elastic Beanstalk plugin uses the US-East (Northern Virginia) AWS Region (us-east-1). To use a different region, configure the AWS Elastic Beanstalk service endpoint using one of the endpoint URLs listed in the AWS reference docs:

Config type Variable name Comment

Config.groovy

grails.plugin.awsElasticBeanstalk.serviceEndpointUrl

System property

awsElasticBeanstalk.serviceEndpointUrl

Environment variable

ELASTICBEANSTALK_URL

compatible with AWS CLI tool

For example, to configure the plugin to use the Asia Pacific (Tokyo) Region, add the following to Config.groovy:

grails.plugin.awsElasticBeanstalk.serviceEndpointUrl = 'https://elasticbeanstalk.ap-northeast-1.amazonaws.com'

4.3. Configuring the target Elastic Beanstalk application and environment

Note
The application name must be between 4 and 23 characters long.
Table 1. Configuration options for Elastic Beanstalk application name
Config type Variable name Comment

Config.groovy

grails.plugin.awsElasticBeanstalk.applicationName

System property

awsElasticBeanstalk.applicationName

default

appName

the value of Grails appName is used by default if not otherwise specified

Table 2. Configuration options for Elastic Beanstalk environment name
Config type Variable name Comment

Config.groovy

grails.plugin.awsElasticBeanstalk.environmentName

System property

awsElasticBeanstalk.environmentName

default

appName

+"${appname}-default}" is used if not otherwise specified

5. Using an Elastic Beanstalk saved configuration for new environments

When deploying a WAR, if the plugin finds that the target environment does not exist, it will create a new environment using a saved configuration, if specified.

Table 3. Configuration options for Elastic Beanstalk saved configuration name
Config type Variable name Comment

Config.groovy

grails.plugin.awsElasticBeanstalk.savedConfigurationName

System property

awsElasticBeanstalk.savedConfigurationName

default

default

5.1. Defaults

TK document default application/environment name

TK discuss default JVM settings / container settings

6. Configuring JVM and

7. Stopping an environment

The aws-eb-stop command (alias for aws-eb-terminate-environment) will terminate all running instances for an environment and deleting the associated AWS resources.

TK link to AWS docs here

Unfortunately, Elastic Beanstalk does not currently provide any way to stop a running application without terminating all instances.

TK add warning callout here If you have created other AWS resources tied to the Elastic Beanstalk environment (such as a CloudFront distribution), these may prevent the environment from terminating successfully and will need to be cleaned up separately.

8. Elastic Beanstalk configuration

8.1. Environment Properties

config.grails.plugin.awsElasticBeanstalk.environmentProperties = ['property.name.1':'property-value-1', 'property.name.2':'property-value-2']

note that these settings are only used when creating a new environment.

Note that these will NOT override any settings made through the console. (TODO verify this)

todo verify that changing these will NOT update the environment?

8.2. JVM options

config.grails.plugin.awsElasticBeanstalk.jvmOptions =

TK docs about .ebextensions folder

9. Application configuration

10. Advanced configuration

11. Custom Elastic Beanstalk application version label and description

By default, the application version and label

These fields can be customized

TK screenshot

TK more here

12. Integrating with Jenkins