Skip to content

Commit 89a5ab5

Browse files
Merge pull request #2344 from odidev/buildkite_LP
Deploy Multi-Architecture Docker Images with Buildkite on GCP C4A Arm VM
2 parents d438455 + 1cdb2cc commit 89a5ab5

File tree

19 files changed

+524
-0
lines changed

19 files changed

+524
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Multi-Architecture Docker Builds with Buildkite on Arm-based GCP C4A Axion VMs
3+
4+
minutes_to_complete: 40
5+
6+
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.
7+
8+
9+
learning_objectives:
10+
- Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors)
11+
- Install and configure Docker, Buildx, and the Buildkite agent
12+
- Write a Dockerfile to containerize a simple Flask-based Python application
13+
- Configure a Buildkite pipeline to build multi-architecture Docker images and push them to DockerHub
14+
- Run and validate the application to ensure it works as expected
15+
16+
17+
prerequisites:
18+
- 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)
19+
- Basic knowledge of Linux system administration (creating users, installing packages, managing services)
20+
- Familiarity with [Docker](https://docs.docker.com/get-started/) and container concepts
21+
- A [GitHub](https://github.com/) account to host your application repository
22+
- Familiarity with [Buildkite concepts](https://buildkite.com/docs/tutorials/getting-started) such as agents, pipelines, secrets, and queues
23+
24+
25+
author: Pareena Verma
26+
27+
##### Tags
28+
skilllevels: Introductory
29+
subjects: CI-CD
30+
cloud_service_providers: Google Cloud
31+
32+
armips:
33+
- Neoverse
34+
35+
tools_software_languages:
36+
- Buildkite
37+
- Docker
38+
- Buildx
39+
40+
operatingsystems:
41+
- Linux
42+
43+
# ================================================================================
44+
# FIXED, DO NOT MODIFY
45+
# ================================================================================
46+
further_reading:
47+
- resource:
48+
title: Google Cloud documentation
49+
link: https://cloud.google.com/docs
50+
type: documentation
51+
52+
- resource:
53+
title: Buildkite documentation
54+
link: https://buildkite.com/docs
55+
type: documentation
56+
57+
- resource:
58+
title: Docker documentation
59+
link: https://docs.docker.com/
60+
type: documentation
61+
62+
weight: 1
63+
layout: "learningpathall"
64+
learning_path_main_page: "yes"
65+
---
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
# ================================================================================
3+
# FIXED, DO NOT MODIFY THIS FILE
4+
# ================================================================================
5+
weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation.
6+
title: "Next Steps" # Always the same, html page title.
7+
layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing.
8+
---
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Get started with Buildkite on Google Axion C4A (Arm Neoverse V2)
3+
4+
weight: 2
5+
layout: "learningpathall"
6+
---
7+
8+
## Google Axion C4A instances on Google Cloud
9+
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 to modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
11+
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.
13+
14+
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).
15+
16+
## Buildkite for CI/CD on Arm
17+
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 Arm’s performance and cost efficiency to build, test, and deploy applications—including multi-architecture Docker images.
19+
20+
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).
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Set-up Buildkite
3+
weight: 5
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
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.
11+
12+
## 1. Create an Agent Token
13+
14+
Before configuring the agent, you need an agent token from your Buildkite organization.
15+
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.
22+
23+
![Buildkite Dashboard alt-text#center](images/agent-token.png "Figure 1: Create Buildkite agent Token")
24+
25+
26+
## 2. Configure Buildkite Agent
27+
28+
Create the configuration directory and file on your local system:
29+
30+
```console
31+
sudo tee /root/.buildkite-agent/buildkite-agent.cfg > /dev/null <<EOF
32+
token="YOUR_AGENT_TOKEN"
33+
tags="queue=buildkite-queue1"
34+
EOF
35+
```
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.
39+
40+
41+
Verify the configuration:
42+
43+
```console
44+
sudo cat /root/.buildkite-agent/buildkite-agent.cfg
45+
```
46+
You should see output similar to:
47+
48+
```output
49+
# The token from your Buildkite "Agents" page
50+
token="YOUR-GENERATED-TOKEN-VALUE"
51+
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
61+
```
62+
## 3. Create a Queue in Buildkite
63+
64+
1. Go to your **Buildkite Organization → Queues → Create Queue**.
65+
2. Name it: `buildkite-queue1`.
66+
3. Save it.
67+
68+
{{% notice Note %}}Make sure the queue name matches the `tags` field in the agent configuration.{{% /notice %}}
69+
70+
![Buildkite Dashboard alt-text#center](images/queue.png "Figure 2: Create Buildkite Queue")
71+
72+
## 4. Verify Agent in Buildkite UI
73+
74+
First, you need to run locally:
75+
76+
```console
77+
sudo /root/.buildkite-agent/bin/buildkite-agent start
78+
```
79+
80+
Then, Verify by UI:
81+
82+
Go to **Buildkite → Agents.**
83+
84+
Confirm that the agent is online and connected to the queue buildkite-queue1.
85+
86+
![Buildkite Dashboard alt-text#center](images/agent.png "Figure 3: Verify Agent")
87+
88+
Buildkite-agent setup is complete, you can now proceed with the multi-arch build using Buildkite.
87.3 KB
Loading
118 KB
Loading
7.8 KB
Loading
58.4 KB
Loading
261 KB
Loading
152 KB
Loading

0 commit comments

Comments
 (0)