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 | |
---|---|---|---|
|
|
System properties |
|
|
Environment variable |
|
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 | |
---|---|---|---|
|
|
||
System property |
|
||
Environment variable |
|
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. |
Config type | Variable name | Comment | |
---|---|---|---|
|
|
||
System property |
|
||
default |
|
the value of Grails |
Config type | Variable name | Comment | |
---|---|---|---|
|
|
||
System property |
|
||
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.
Config type | Variable name | Comment | |
---|---|---|---|
|
|
||
System property |
|
||
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
Container-specific options http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html#command-options-general http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/command-options.html#command-options-java
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