NAV Navbar
Switch version:

Configure plugin settings

Plugin Settings


Note: Configuration marked with (*) are mandatory

Elastic container configuration

Elastic container configuration
  1. GoCD Server URL*: This is used by container to register with GoCD server. Server hostname must resolve in your container. Don’t use localhost.

  2. Container auto register time-out*: If an agent running on a container created by this plugin does not register with this server within the specified timeout period (specified in minutes), the plugin will assume that the container failed to startup and will be terminated.

  3. Environment Variables: These variables will be passed onto the container when it is started up. Read more about ENV.

    For example

    TZ=PST
    JAVA_HOME=/opt/java
    
  4. Container data volume size: Maximum volume size in GB that container can use to store container data. Defaults to 10G.

AWS Credentials

Optionally, specify Access Key and Secret Access Key of AWS account. These are used by plugin to make API calls. Specified API keys must have appropriate privileges to access aws resources. Please refer pre-requisites for more information.

AWS Credentials


If not specified, plugin will try to detect it in following order:

  1. Environment Variables - AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY (RECOMMENDED since they are recognized by all the AWS SDKs and CLI except for .NET), or AWS_ACCESS_KEY and AWS_SECRET_KEY (only recognized by Java SDK)

  2. Java System Properties - aws.accessKeyId and aws.secretKey

  3. Instance profile - Instance profile credentials delivered through the Amazon EC2 metadata service

Read more about API keys here.

EC2 instance settings

These settings are applied to all ec2 instances launched by plugin irrespective of platform.

EC2 instance settings
  1. AWS keypair name: The name of the key pair that you may use to SSH or RDP into the EC2 instance. User can override this from elastic profile. Read more about Key Pairs

  2. Subnet id(s): Enter comma separated subnet ids. If multiple subnet ids are specified, the subnet having the least number of EC2 instances will be used to spin up a new EC2 instance. If left unspecified or the specified subnet ids are not available at the time of launching the EC2 instance, AWS will choose a default subnet from your default VPC for you. User can override this from elastic profile. Read more about VPCs & Subnets

  3. Security Group Id(s): Enter comma separated security group ids. EC2 instances will be assigned the security groups(s) specified here. User can override this from elastic profile. Read more about SecurityGroup

  4. IAM profile for EC2 instance*: The name of the IAM profile that will allow the ECS agent to make API calls to AWS on your behalf. Please refer pre-requisites for the bare minimum privileges your profile must have to allow plugin to make API calls. User can override this from elastic profile.

EC2 instance settings for Linux

This is to configure linux specific defaults for EC2 instance. It will be used to launch new EC2 instance. However, user can override few of the defaults from an elastic profile.

EC2 instance settings for Linux
  1. AMI ID: The AMI ID that will be used when an instance is spun up. The ECS agent will run on this ECS optimized EC2 instance. We recommend using an Amazon ECS-Optimized AMI. ECS optimized Linux AMIs are available here. User can override this from elastic profile.

  2. Instance type: This instance type will be used to spin up EC2 instances that will run docker containers with this profile. Read more about Instance Type

  3. Operating system volume type: Allows to override default operating system volume. This is used to store operating system and container volumes. It will get deleted on instance termination. Defaults to 8G. User may have to increase size of the volume if containers are generating too much persistent data. See docker volumes for more information.

  4. Docker Volume type: Allows to override default storage with specified type and size. This is used to store docker images and metadata. It will get deleted on ec2 instance termination. Defaults to 22G. User may have to increase size of th`e volume if docker images size is too big to fit in 22G of default volume. See docker storage for more information.

  5. Instance creation timeout: If an EC2 instance created by this plugin does not register with the container service within this timeout period, the plugin will assume that the instance has failed to startup and will be terminated. Defaults to 5 minutes.

  6. Minimum instance required in cluster: Minimum linux instances you’d like to have running at any point of time. Defaults to 0.

  7. Maximum instances allowed: Restricts maximum number of linux instances in the cluster. Plugin will not launch new linux instance if the cluster is already running specified number of instances. Defaults to 5.

  8. Instance stop policy*: Plugin will stop ec2 instances in the ECS cluster based on specified stop policy.

    • Stop Idle Instance: Plugin stops the instance which is idle for more than the specified idle timeout. Defaults to 10 minutes.
    • Stop Oldest Instance: Plugin stops the oldest instance in the group. This option is useful when you’re upgrading the instances in the cluster to a new EC2 instance type, so you can gradually replace instances of the old type with instances of the new type.
  9. Terminate stopped instance after*: The plugin terminates the instance which is in stopped state for more than specified period. Defaults to 5 minutes.

  10. Userdata script: This allows user to execute command on startup of ec2 instance. Read more about userdata script.

    For example

    yum update -y
    yum install -y subversion git
    

EC2 instance settings for Windows

This is to configure windows specific defaults for EC2 instance. It will be used to launch new EC2 instance. However, user can override few of the defaults from an elastic profile.

EC2 instance settings for Windows
  1. AMI ID: The AMI ID that will be used when an instance is spun up. The ECS agent will run on this ECS optimized EC2 instance. We recommend using an Amazon ECS-Optimized AMI. ECS optimized Windows AMIs are available here. User can override this from elastic profile.

  2. Instance type: This instance type will be used to spin up EC2 instances that will run docker containers with this profile. Read more about Instance Type

  3. Operating system volume type: Allows to override default operating system volume. This is used to store all persistent data including docker. It will get deleted on instance termination. Defaults to 50G.

  4. Instance creation timeout: If an EC2 instance created by this plugin does not register with the container service within this timeout period, the plugin will assume that the instance has failed to startup and will be terminated. Defaults to 15 minutes.

  5. Minimum instance required in cluster: Minimum linux instances you’d like to have running at any point of time. Defaults to 0.

  6. Maximum instances allowed: Restricts maximum number of linux instances in the cluster. Plugin will not launch new linux instance if the cluster is already running specified number of instances. Defaults to 5.

  7. Instance stop policy*: Plugin will stop ec2 instances in the ECS cluster based on specified stop policy.

    • Stop Idle Instance: Plugin stops the instance which is idle for more than the specified idle timeout. Defaults to 10 minutes.
    • Stop Oldest Instance: Plugin stops the oldest instance in the group. This option is useful when you’re upgrading the instances in the cluster to a new EC2 instance type, so you can gradually replace instances of the old type with instances of the new type.
  8. Terminate stopped instance after*: The plugin terminates the instance which is in stopped state for more than specified period. Defaults to 5 minutes.

  9. Userdata script: This allows user to execute powershell commands on startup of ec2 instance. Do not use <powershell> or <script> tags in script. Read more about userdata script.

    For example

    $file = $env:SystemRoot + "\Temp\" + (Get-Date).ToString("MM-dd-yy-hh-mm")
    New-Item $file -ItemType file
    

AWS Cluster configuration

AWS Cluster configuration
  1. AWS Cluster Name*: Name of the ECS cluster that will be managed by the plugin. This cluster must already exist.

  2. AWS Region: If you don’t specify an Availability Zone, AWS will choose one for you.

Log configuration

Log configuration
  1. Log driver name: Read more about enabling the awslogs on your Container Instances. Supported logging drivers are listed here.

  2. Log options: Log options are used to filter log for the container instance. Enter one variable per line. Read more about log options

    For example

    awslogs-group=awslogs-mysql
    awslogs-region=ap-northeast-1
    

Docker Registry

This is to override default docker registry settings. Default registry is hub.docker.com

Docker registry configuration

Authenticate using auth token

  1. Private docker registry url*: Specify docker registry URL here
  2. Email*: Specify email of the user. This settings is already deprecated by docker. This may get removed in subsequent releases.
  3. Docker registry auth token*: Authentication token for the user.

Authenticate using username and password

  1. Private docker registry url*: Specify docker registry URL here
  2. Email*: Specify email of the user. This settings is already deprecated by docker. This may get removed in subsequent releases.
  3. Docker registry username*: Username of the private docker registry user.
  4. Docker registry password*: Password associated with the above specified user.

EFS

EFS configuration


EFS IP address or DNS: Plugin will use provided EFS volume and mount it at /efs in ec2 instances and in docker containers. Multiple Amazon EC2 instances can access an Amazon EFS file system, so it can be used to store credentials for docker container.

After configuring settings save your changes