Skip to content

Commit a550eb2

Browse files
Merge pull request #2429 from jasonrandrews/review
Tech review of Buildkite Learning Path
2 parents 2703257 + e6afb45 commit a550eb2

File tree

7 files changed

+186
-159
lines changed

7 files changed

+186
-159
lines changed

content/learning-paths/servers-and-cloud-computing/buildkite-gcp/_index.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,26 @@
11
---
2-
title: Multi-Architecture Docker builds with Buildkite on Arm-based GCP C4A Axion VMs
2+
title: Build multi-architecture Docker images with Buildkite on Google Axion
33

44
draft: true
55
cascade:
66
draft: true
77

88
minutes_to_complete: 40
99

10-
who_is_this_for: This is an introductory guide for software developers learning to build and run multi-architecture Docker images with Buildkite on Arm-based Google Cloud C4A virtual machines powered by Axion processors.
11-
10+
who_is_this_for: This is an introductory guide for software developers learning to build and run multi-architecture Docker images with Buildkite on Arm-based Google Cloud C4A virtual machines powered by Google Axion processors.
1211

1312
learning_objectives:
14-
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
15-
- Install and configure Docker, Buildx, and the Buildkite agent
13+
- Provision an Arm-based virtual machine on Google Cloud running SUSE Linux Enterprise Server or Ubuntu
14+
- Install and configure Docker, Docker Buildx, and the Buildkite agent
1615
- Write a Dockerfile to containerize a simple Flask-based Python application
17-
- Configure a Buildkite pipeline to build multi-architecture Docker images and push them to DockerHub
18-
- Run and validate the application to ensure it works as expected
19-
16+
- Configure a Buildkite pipeline to build a multi-architecture Docker image and push it to Docker Hub
17+
- Run the application to ensure it works as expected
2018

2119
prerequisites:
22-
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free?utm_source=google&hl=en) account with billing enabled (or another supported cloud provider like Azure or AWS)
23-
- Basic knowledge of Linux system administration (creating users, installing packages, managing services)
24-
- Familiarity with [Docker](https://docs.docker.com/get-started/) and container concepts
25-
- A [GitHub](https://github.com/) account to host your application repository
26-
- Familiarity with [Buildkite concepts](https://buildkite.com/docs/tutorials/getting-started) such as agents, pipelines, secrets, and queues
27-
20+
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free?utm_source=google&hl=en) account with billing enabled
21+
- Basic knowledge of Linux system administration such as creating users, installing packages, and managing services
22+
- Familiarity with Docker and container concepts
23+
- A GitHub account to host your application repository
2824

2925
author: Jason Andrews
3026

@@ -39,7 +35,7 @@ armips:
3935
tools_software_languages:
4036
- Buildkite
4137
- Docker
42-
- Buildx
38+
- Docker Buildx
4339

4440
operatingsystems:
4541
- Linux
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
2-
title: Get started with Buildkite on Google Axion C4A (Arm Neoverse V2)
2+
title: Get started with Buildkite on Google Axion C4A instances
33

44
weight: 2
55
layout: "learningpathall"
66
---
77

88
## Google Axion C4A instances on Google Cloud
99

10-
Google Axion C4A is a family of Arm-based virtual machines powered by Googles custom Axion CPU, which is built on Arm Neoverse V2 cores. Designed for high performance and energy efficiency, these VMs are well-suited to modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
10+
Google Axion C4A is a family of Arm-based virtual machines powered by Google's custom Axion CPU, which is built on Arm Neoverse V2 cores. Designed for high performance and energy efficiency, these VMs are well-suited for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
1111

12-
The C4A series can provide a cost-efficient alternative to x86 VMs while leveraging the scalability and performance characteristics of the Arm64 (AArch64) architecture on Google Cloud.
12+
The C4A series can provide a cost-efficient alternative to x86 VMs while leveraging the scalability and performance characteristics of the Arm architecture on Google Cloud.
1313

1414
To learn more about Google Axion, see the blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
1515

1616
## Buildkite for CI/CD on Arm
1717

18-
[Buildkite](https://buildkite.com/) is a flexible and scalable continuous integration and delivery (CI/CD) platform that allows you to run pipelines on your own infrastructure. By deploying Buildkite agents on Google Axion C4A VMs, you can take advantage of Arms performance and cost efficiency to build, test, and deploy applicationsincluding multi-architecture Docker images.
18+
Buildkite is a flexible and scalable continuous integration and delivery (CI/CD) platform that allows you to run pipelines on your own infrastructure. By deploying Buildkite agents on Google Axion C4A VMs, you can take advantage of Arm's performance and cost efficiency to build, test, and deploy applications, including multi-architecture Docker images.
1919

2020
Buildkite integrates seamlessly with version control systems such as GitHub and supports advanced workflows for cloud migration, multi-arch builds, and testing microservices. Learn more in the [Buildkite documentation](https://buildkite.com/docs).

content/learning-paths/servers-and-cloud-computing/buildkite-gcp/buildkite-agent-setup.md

Lines changed: 43 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,83 +6,91 @@ weight: 5
66
layout: learningpathall
77
---
88

9-
# Buildkite Agent Setup
10-
This guide describes the steps to configure a Buildkite agent and queue after installing the Buildkite agent binary on a Google Axion C4A Arm VM.
9+
# Set up a Buildkite agent
10+
11+
After installing the Buildkite agent binary on a Google Axion C4A Arm VM, you can set up and configure a Buildkite agent and queue.
1112

1213
## 1. Create an Agent Token
1314

1415
Before configuring the agent, you need an agent token from your Buildkite organization.
1516

16-
1. Log in to your **Buildkite** account (you can login with GitHub), and go to your **Organization Settings**.
17-
2. Click **Agents** in the left menu.
18-
3. Click **Create Agent Token**.
19-
4. Enter a **name** for your token, e.g., `buildkite-arm`.
20-
5. Click **Create Token**.
21-
6. **Copy the token** immediately you won’t be able to see it again after leaving the page.
17+
1. Log in to your Buildkite account (you can login with GitHub), and go to your Organization Settings
18+
2. Click Agents in the left menu
19+
3. Click Create Agent Token
20+
4. Enter a name for your token, such as `buildkite-arm`
21+
5. Click Create Token
22+
6. Copy the token immediately, you won’t be able to see it again after leaving the page.
2223

23-
![Buildkite Dashboard alt-text#center](images/agent-token.png "Figure 1: Create Buildkite agent Token")
24+
![Buildkite Dashboard alt-text#center](images/agent-token.png "Create Buildkite agent Token")
2425

2526

2627
## 2. Configure Buildkite Agent
2728

28-
Create the configuration directory and file on your local system:
29+
Create the configuration directory and file on your local system with the commands below:
2930

3031
```console
3132
sudo tee /root/.buildkite-agent/buildkite-agent.cfg > /dev/null <<EOF
3233
token="YOUR_AGENT_TOKEN"
3334
tags="queue=buildkite-queue1"
3435
EOF
3536
```
36-
- Replace `YOUR_AGENT_TOKEN` with the token you generated from your **Buildkite Agents page**.
37-
- `tags` in Buildkite are key-value labels that let you match pipeline steps to specific agents, ensuring jobs run only on agents with the required tag.
38-
- The `name` field is optional; if omitted, Buildkite will assign a default name.
37+
38+
Replace `YOUR_AGENT_TOKEN` with the token you generated from your Buildkite Agents page.
39+
40+
{{% notice Note %}}
41+
You find it easier to copy the commands above into a text file named `config-agent.sh` and run the file.
42+
```console
43+
bash ./config-agent.sh
44+
```
45+
{{% /notice %}}
46+
47+
In Buildkite `tags` are key-value labels that let you match pipeline steps to specific agents, ensuring jobs run only on agents with the required tag.
48+
49+
The `name` field is optional; if omitted, Buildkite will assign a default name.
3950

4051

4152
Verify the configuration:
4253

4354
```console
4455
sudo cat /root/.buildkite-agent/buildkite-agent.cfg
4556
```
57+
4658
You should see output similar to:
4759

4860
```output
4961
# The token from your Buildkite "Agents" page
5062
token="YOUR-GENERATED-TOKEN-VALUE"
5163
tags="queue=buildkite-queue1"
52-
53-
# The name of the agent
54-
name="%hostname-%spawn"
55-
56-
# The number of agents to spawn in parallel (default is "1")
57-
# spawn=1
58-
59-
# The priority of the agent (higher priorities are assigned work first)
60-
# priority=1
6164
```
65+
6266
## 3. Create a Queue in Buildkite
6367

64-
1. Go to your **Buildkite Organization → Queues → Create Queue**.
65-
2. Name it: `buildkite-queue1`.
66-
3. Save it.
68+
Now that your agent is created, you can create a queue.
69+
70+
1. Go to your Buildkite Organization select Queues and then select Create Queue
71+
2. Name the queue, for example `buildkite-queue1`
72+
3. Save the queue
6773

68-
{{% notice Note %}}Make sure the queue name matches the `tags` field in the agent configuration.{{% /notice %}}
74+
{{% notice Note %}}
75+
Make sure the queue name matches the `tags` field in the agent configuration.
76+
{{% /notice %}}
6977

70-
![Buildkite Dashboard alt-text#center](images/queue.png "Figure 2: Create Buildkite Queue")
78+
![Buildkite Dashboard alt-text#center](images/queue.png "Create Buildkite Queue")
7179

72-
## 4. Verify Agent in Buildkite UI
80+
## 4. Verify the agent in the Buildkite UI
7381

74-
First, you need to run locally:
82+
First, start the agent on your local computer:
7583

7684
```console
77-
sudo /root/.buildkite-agent/bin/buildkite-agent start
85+
sudo /root/.buildkite-agent/bin/buildkite-agent start --build-path="/var/lib/buildkite-agent/builds"
7886
```
7987

80-
Then, Verify by UI:
88+
Then, confirm it is visible in the Buildkite UI:
8189

82-
Go to **Buildkite Agents.**
90+
Go Buildkite and select Agents
8391

84-
Confirm that the agent is online and connected to the queue buildkite-queue1.
92+
Confirm that the agent is online and connected to the queue `buildkite-queue1`.
8593

86-
![Buildkite Dashboard alt-text#center](images/agent.png "Figure 3: Verify Agent")
94+
![Buildkite Dashboard alt-text#center](images/agent.png "Verify Agent")
8795

88-
Buildkite-agent setup is complete, you can now proceed with the multi-arch build using Buildkite.
96+
The Buildkite agent is ready, you can proceed to use Buildkit for building multi-arch images.

content/learning-paths/servers-and-cloud-computing/buildkite-gcp/installation.md

Lines changed: 75 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,29 @@ layout: learningpathall
99
## Install Buildkite on a Google Axion C4A Arm VM
1010
This section guides you through installing the Buildkite agent on a Google Axion C4A Arm VM, enabling it to connect to your Buildkite account and run CI/CD pipelines.
1111

12-
```console
12+
{{< tabpane code=true >}}
13+
{{< tab header="Ubuntu" language="bash">}}
14+
sudo apt update
15+
sudo apt install unzip -y
16+
{{< /tab >}}
17+
{{< tab header="SUSE Linux" language="bash">}}
1318
sudo zypper refresh
1419
sudo zypper install -y curl unzip
15-
```
20+
{{< /tab >}}
21+
{{< /tabpane >}}
1622

1723
### Download and Install Buildkite Agent
1824

1925
```console
20-
sudo sh -c "$(curl -sL https://raw.githubusercontent.com/buildkite/agent/main/install.sh)"
26+
sudo bash -c "$(curl -sL https://raw.githubusercontent.com/buildkite/agent/main/install.sh)"
2127
```
22-
This one-line command downloads and runs the official Buildkite installer.
23-
It will:
2428

25-
- Grab the latest version of the agent (`v3.107.0`)
26-
- Install it into **root’s home directory** (`/root/.buildkite-agent`)
29+
This one-line command downloads and runs the Buildkite installer.
30+
31+
The installer performs the following steps:
32+
33+
- Download the latest version of the agent, for example `v3.109.1`
34+
- Install it into the home directory of the root user at `/root/.buildkite-agent`
2735
- Create a default config file (`buildkite-agent.cfg`) where you’ll later add your agent token
2836

2937
```output
@@ -37,21 +45,21 @@ It will:
3745
__/ |
3846
|___/
3947
Finding latest release...
40-
Installing Version: v3.107.0
48+
Installing Version: v3.109.1
4149
Destination: /root/.buildkite-agent
42-
Downloading https://github.com/buildkite/agent/releases/download/v3.107.0/buildkite-agent-linux-arm64-3.107.0.tar.gz
50+
Downloading https://github.com/buildkite/agent/releases/download/v3.109.1/buildkite-agent-linux-arm64-3.109.1.tar.gz
4351
4452
A default buildkite-agent.cfg has been created for you in /root/.buildkite-agent
4553
46-
Don't forget to update the config with your agent token! You can find the token on your "Agents" page in Buildkite
54+
Don't forget to update the config with your agent token! You can find it token on your "Agents" page in Buildkite
4755
4856
Successfully installed to /root/.buildkite-agent
4957
5058
You can now start the agent!
5159
5260
/root/.buildkite-agent/bin/buildkite-agent start
5361
54-
For docs, help, and support:
62+
For docs, help and support:
5563
5664
https://buildkite.com/docs/agent/v3
5765
@@ -65,57 +73,90 @@ This command checks the version of the Buildkite agent and confirms it is instal
6573
sudo /root/.buildkite-agent/bin/buildkite-agent --version
6674
```
6775
You should see output similar to:
76+
6877
```output
69-
buildkite-agent version 3.107.0+10853.4606e31391a3bad2a5ba62f421ef041c0e4f04ab
78+
buildkite-agent version 3.109.1+10971.5c28e309805a3d748068a3ff7f5c531f51f6f495
7079
```
7180

7281
{{% notice Note %}}
73-
The Buildkite Agent version 3.43.0 introduces Linux/Arm64 Docker image for the Buildkite Agent, making deployment and installation easier for Linux users on Arm. You can view [this release note](https://github.com/buildkite/agent/releases/tag/v3.43.0).
82+
The Buildkite Agent version 3.43.0 introduces Linux/Arm64 Docker image for the Buildkite Agent, making deployment and installation easier for Linux users on Arm. You can view the [release note](https://github.com/buildkite/agent/releases/tag/v3.43.0).
7483

7584
The [Arm Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/) recommends Buildkite Agent version v3.43.0 as the minimum recommended on the Arm platforms.
7685
{{% /notice %}}
7786

7887
### Install Docker and Docker Buildx
79-
Buildkite will use Docker to build and push images. Let’s set it up.
8088

81-
1. Refresh package repositories and install required packages
89+
Buildkite will use Docker to build and push images.
8290

83-
This updates your system’s software list and installs git, Python3-pip, and Docker:
91+
First, refresh the package repositories and install the required packages including git, Python3-pip, and Docker:
8492

85-
```console
86-
sudo zypper refresh
93+
Next, enable and start the Docker service to ensure it runs automatically when your VM starts:
94+
95+
{{< tabpane code=true >}}
96+
{{< tab header="Ubuntu" language="bash">}}
97+
sudo apt update
98+
sudo apt install python-is-python3 python3-pip -y
99+
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
100+
sudo usermod -aG docker $USER ; newgrp docker
101+
{{< /tab >}}
102+
{{< tab header="SUSE Linux" language="bash">}}
87103
sudo zypper install -y git python3 python3-pip docker
88-
```
104+
sudo usermod -aG docker $USER ; newgrp docker
105+
{{< /tab >}}
106+
{{< /tabpane >}}
107+
89108

90-
2. Enable and Start Docker
109+
SUSE Linux requires some extra steps to start Docker, you can skip this for Ubuntu:
91110

92-
This makes sure Docker runs automatically every time, when your VM starts:
93111
```console
94112
sudo systemctl enable docker
95113
sudo systemctl start docker
96114
```
97-
3. Verify Docker installation
115+
116+
Verify the Docker installation by checking the version and running a test container:
98117

99118
```console
100-
docker --version
101119
docker run hello-world
102120
```
103121

122+
You will see the Docker message:
123+
124+
```output
125+
Hello from Docker!
126+
This message shows that your installation appears to be working correctly.
127+
128+
To generate this message, Docker took the following steps:
129+
1. The Docker client contacted the Docker daemon.
130+
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
131+
(arm64v8)
132+
3. The Docker daemon created a new container from that image which runs the
133+
executable that produces the output you are currently reading.
134+
4. The Docker daemon streamed that output to the Docker client, which sent it
135+
to your terminal.
136+
137+
To try something more ambitious, you can run an Ubuntu container with:
138+
$ docker run -it ubuntu bash
139+
140+
Share images, automate workflows, and more with a free Docker ID:
141+
https://hub.docker.com/
142+
143+
For more examples and ideas, visit:
144+
https://docs.docker.com/get-started/
145+
```
146+
104147
## Install Docker Buildx
105-
Docker Buildx is a plugin that allows building multi-architecture images (e.g., Arm64 and x86).
148+
149+
Docker Buildx is a plugin that allows building multi-architecture images, for example `arm64` and `amd64`.
150+
151+
For SUSE Linux, you need to install Docker Buildx. This is not necessary on Ubuntu.
152+
153+
Download the binary and move it to the Docker CLI plugin directory:
106154

107155
```console
108156
wget https://github.com/docker/buildx/releases/download/v0.26.1/buildx-v0.26.1.linux-arm64
109157
chmod +x buildx-v0.26.1.linux-arm64
110-
mv buildx-v0.26.1.linux-arm64 ~/.docker/cli-plugins/docker-buildx
111-
sudo mv ~/.docker/cli-plugins/docker-buildx /usr/libexec/docker/cli-plugins/docker-buildx
112-
sudo chmod +x /usr/libexec/docker/cli-plugins/docker-buildx
158+
sudo mkdir -p /usr/libexec/docker/cli-plugins
159+
sudo mv buildx-v0.26.1.linux-arm64 /usr/libexec/docker/cli-plugins/docker-buildx
113160
```
114-
What this does:
115-
116-
- Downloads the Buildx binary for **Arm64**
117-
- Makes it **executable**
118-
- Moves it into Docker’s CLI plugin directory for the current user (`~/.docker/cli-plugins/`)
119-
- Optionally, move it system-wide (`/usr/libexec/docker/cli-plugins/`) so all users can access it
120161

121-
Now that the Buildkite installation is completed, you can set up the Buildkite agent.
162+
Now that the Buildkite installation is complete, you can set up the Buildkite agent.

0 commit comments

Comments
 (0)