Skip to content

Commit 5feb7c1

Browse files
authored
Merge pull request #957 from buildkite/keithduncan/add-updating-docs
Add docs on updating the different components
2 parents 1a96df0 + ae4c6b0 commit 5feb7c1

File tree

4 files changed

+128
-0
lines changed

4 files changed

+128
-0
lines changed

docs/updating-agent.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Updating the Agent
2+
3+
The `buildkite-agent` is built in to the AMIs by the Packer build. The agent
4+
binary is downloaded from download.buildkite.com.
5+
6+
Once you have [released](https://github.com/buildkite/agent/blob/master/RELEASE.md) an updated
7+
version of the agent, you can incorporate it into the Elastic CI Stack
8+
for AWS template.
9+
10+
See https://github.com/buildkite/elastic-ci-stack-for-aws/pull/935 for an
11+
example of updating the buildkite-agent.
12+
13+
1. Create a new branch
14+
1. Update and commit a change to the Packer install scripts for [Linux](#linux) and [Windows](#windows) for the new version
15+
1. Push your branch and open a pull request
16+
1. Wait for CI to go green
17+
1. Merge
18+
19+
## Linux
20+
21+
Update the `AGENT_VERSION` variable in [`packer/linux/scripts/install-buildkite-agent.sh`](packer/linux/scripts/install-buildkite-agent.sh)
22+
to change which version is installed during the Packer build for the Linux AMI.
23+
24+
## Windows
25+
26+
Update the `AGENT_VERSION` variable in [`packer/windows/scripts/install-buildkite-agent.ps1`](packer/windows/scripts/install-buildkite-agent.ps1)
27+
to change which version is installed during the Packer build for the Windows
28+
AMI.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Updating buildkite-agent-scaler
2+
3+
The [buildkite-agent-scaler](https://buildkite.com/buildkite/buildkite-agent-scaler)
4+
is brought in to the Elastic CI Stack for AWS template using the AWS
5+
Serverless Application Repository.
6+
7+
Once you have [released](https://github.com/buildkite/buildkite-agent-scaler/blob/master/RELEASE.md)
8+
an updated version, you can incorporate it into the Elastic CI Stack for AWS
9+
template.
10+
11+
See https://github.com/buildkite/elastic-ci-stack-for-aws/pull/955 for an
12+
example of updating the buildkite-agent-scaler.
13+
14+
1. Create a new branch
15+
1. In the [`templates/aws-stack.yml`](templates/aws-stack.yml) update the `Autoscaling` resource’s `SemanticVersion` property to the newly released version.
16+
1. Push your branch and open a pull request
17+
1. Wait for CI to pass
18+
1. If needed for testing, create a stack with the branch’s published template to verify functionality
19+
1. In the Buildkite build, get the template URL from the build annotation
20+
1. In the AWS Console, launch CloudFormation
21+
1. Create a new stack, select new resources
22+
1. Supply the template URL from the build annotation for the Amazon S3 URL field
23+
1. Supply a Buildkite Agent token in the `BuildkiteAgentToken`
24+
or `BuildkiteAgentTokenParameterStorePath` parameters
25+
1. Supply a queue in the `BuildkiteQueue` parameter
26+
1. Create the stack and wait for it to complete
27+
1. Verify that instances are booted in response to Buildkite jobs on your queue
28+
1. Delete the stack
29+
1. Merge your pull request

docs/updating-docker.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Updating Docker and docker-compose
2+
3+
Docker and docker-compose are built into the AMIs by the Packer build.
4+
5+
See https://github.com/buildkite/elastic-ci-stack-for-aws/pull/954 for an
6+
example of updating Docker and docker-compose for Linux and Windows.
7+
8+
1. Create a new branch
9+
1. Update and commit a change to the Packer install scripts for [Linux](#linux) and [Windows](#windows) for the new version(s)
10+
1. Push your branch and open a pull request
11+
1. Wait for CI to go green
12+
1. Merge
13+
14+
## Linux
15+
16+
Packer installs Docker, docker-compose, and `docker buildx` using the [`packer/linux/scripts/install-docker.sh`](packer/linux/scripts/install-docker.sh)
17+
script. Update the `DOCKER_VERSION` variable in this file to change which
18+
version of Docker is installed. Update the `DOCKER_COMPOSE_VERSION` variable to
19+
change which version of docker-compose is installed. Update the
20+
`DOCKER_BUILDX_VERSION` variable to change which version of `docker buildx` is installed.
21+
22+
Binary releases are downloaded directly from Docker and GitHub.
23+
24+
## Windows
25+
26+
Packer installs Docker, and `docker-compose` using the [`packer/windows/scripts/install-docker.ps1`](packer/windows/scripts/install-docker.ps1)
27+
script.
28+
29+
[MicrosoftDockerProvider](https://github.com/OneGet/MicrosoftDockerProvider)
30+
is used to source Docker packages. The list of available packages that it
31+
installs can be found at https://dockermsft.azureedge.net/dockercontainer/DockerMsftIndex.json.
32+
33+
Update the `docker_version` variable in `install-docker.ps1` to one of the
34+
available package versions to change which version of Docker is installed.
35+
36+
The `choco` package manager is used to install `docker-compose`. See the
37+
[chocolatey package manager version history](https://community.chocolatey.org/packages/docker-compose#versionhistory)
38+
for a list of available versions.
39+
40+
Update the `docker_compose_version` variable in `install-docker.ps1` to change
41+
which version of `docker-compose` is installed.

docs/updating-secrets.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Updating elastic-ci-stack-s3secrets-hooks
2+
3+
The elastic-ci-stack-s3secrets-hooks are included in the AMIs by the Packer
4+
build. The hooks are copied in directly from the submodule, the binaries are
5+
downloaded from the GitHub release.
6+
7+
Once you have [released](https://github.com/buildkite/elastic-ci-stack-s3-secrets-hooks/blob/master/RELEASE.md)
8+
an updated version of the s3secrets-hooks, you can incorporate it into the
9+
Elastic CI Stack for AWS template.
10+
11+
See https://github.com/buildkite/elastic-ci-stack-for-aws/pull/956 for an
12+
example of updating elastic-ci-stack-s3secrets-hooks.
13+
14+
1. Create a new branch
15+
1. Update the `plugins/secrets` git submodule and `.gitmodules` file for the new tag
16+
1. `git submodule init`
17+
1. `cd plugins/secrets && git checkout v2.1.x`
18+
1. Commit the change to the submodule pin and `.gitmodules`
19+
1. Update and commit a change to the Packer install scripts for [Linux](#linux) and [Windows](#windows) to use the new version
20+
1. Push your branch and open a pull request
21+
1. Wait for CI to go green
22+
1. Merge
23+
24+
## Linux
25+
26+
Update `S3_SECRETS_HELPER_VERSION` in [`packer/linux/scripts/install-s3secrets-helper.sh`](packer/linux/scripts/install-s3secrets-helper.sh)
27+
28+
## Windows
29+
30+
Update `S3_SECRETS_HELPER_VERSION` in [`packer/windows/scripts/install-s3secrets-helper.ps1`](packer/windows/scripts/install-s3secrets-helper.ps1)

0 commit comments

Comments
 (0)