Skip to content

Commit 6577504

Browse files
committed
CircleCI Arm Native Workflows on AWS Graviton2 (EC2)
Signed-off-by: odidev <[email protected]>
1 parent 2b30581 commit 6577504

File tree

18 files changed

+427
-0
lines changed

18 files changed

+427
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
title: CircleCI Arm Native Workflows on AWS Graviton2 (EC2)
3+
4+
minutes_to_complete: 45
5+
6+
who_is_this_for: This learning path is intended for software developers and DevOps engineers looking to set up and run CircleCI Arm native workflows on Linux Arm64 VMs, specifically on AWS EC2 Graviton2 instances (Neoverse N1), using self-hosted runners.
7+
8+
learning_objectives:
9+
- Provision an AWS EC2 Graviton2 Arm64 virtual machine
10+
- Install and configure CircleCI self-hosted machine runners on Arm64
11+
- Verify the runner by running a simple workflow and test computation
12+
- Define and execute CircleCI job using a machine executor
13+
- Check CPU architecture and execute a basic script to confirm if the runner is operational
14+
- Display CPU information and validate outputs from the sample computation
15+
16+
prerequisites:
17+
- An [AWS account](https://aws.amazon.com/free/) with billing enabled
18+
- Basic familiarity with Linux command line
19+
- Basic understanding of CircleCI concepts such as
20+
[workflows](https://circleci.com/docs/guides/orchestrate/workflows/),
21+
[jobs](https://circleci.com/docs/guides/orchestrate/jobs-steps/),
22+
[resource classes](https://circleci.com/docs/guides/execution-managed/resource-class-overview/), and
23+
[runners](https://circleci.com/docs/guides/execution-runner/runner-overview/)
24+
25+
26+
author: Pareena Verma
27+
28+
##### Tags
29+
skilllevels: Introductory
30+
subjects: CI-CD
31+
cloud_service_providers: AWS
32+
33+
armips:
34+
- Neoverse
35+
36+
tools_software_languages:
37+
- CircleCI
38+
- Bash/Shell scripting
39+
- Git
40+
41+
42+
operatingsystems:
43+
- Linux
44+
45+
# ================================================================================
46+
# FIXED, DO NOT MODIFY
47+
# ================================================================================
48+
further_reading:
49+
- resource:
50+
title: AWS EC2 Documentation
51+
link: https://docs.aws.amazon.com/ec2/index.html
52+
type: documentation
53+
54+
- resource:
55+
title: CircleCI Self-Hosted Runner Documentation
56+
link: https://circleci.com/docs/guides/execution-runner/install-machine-runner-3-on-linux/
57+
type: documentation
58+
59+
- resource:
60+
title: CircleCI CLI Documentation
61+
link: https://circleci.com/docs/guides/toolkit/local-cli/
62+
type: documentation
63+
64+
65+
weight: 1
66+
layout: "learningpathall"
67+
learning_path_main_page: "yes"
68+
---
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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
title: Getting Started with CircleCI on AWS Graviton2 (Arm Neoverse-N1)
3+
4+
weight: 2
5+
6+
layout: "learningpathall"
7+
---
8+
9+
10+
## AWS Graviton2 Arm Instances on Amazon EC2
11+
12+
**AWS Graviton2** is a family of Arm-based processors designed by AWS and built on **Arm Neoverse-N1 cores**. These instances deliver exceptional price-to-performance efficiency, making them ideal for compute-intensive workloads such as CI/CD pipelines, microservices, containerized applications, and data processing tasks.
13+
14+
Graviton2-powered EC2 instances provide high performance and energy efficiency compared to traditional x86-based instances while maintaining compatibility with popular Linux distributions and open-source software stacks.
15+
16+
To learn more about AWS Graviton processors, refer to the [AWS Graviton2 Processor Overview](https://aws.amazon.com/ec2/graviton/).
17+
18+
## CircleCI
19+
20+
**CircleCI** is a leading cloud-based **Continuous Integration and Continuous Delivery (CI/CD)** platform that automates the **building, testing, and deployment** of software projects.
21+
22+
It seamlessly integrates with popular version control systems such as **GitHub**, **Bitbucket**, and **GitLab**, allowing developers to define automation workflows through a `.circleci/config.yml` file written in **YAML syntax**.
23+
24+
CircleCI supports multiple execution environments, including **Docker**, **Linux**, **macOS**, and **Windows**, while providing advanced capabilities like **parallel job execution**, **build caching**, and **matrix builds** for optimized performance.
25+
26+
It is widely adopted by development teams to **accelerate build cycles, enforce code quality, automate testing, and streamline application delivery**.
27+
To learn more, visit the [official CircleCI website](https://circleci.com/) and explore its [documentation](https://circleci.com/docs/).
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
title: Install CircleCI Machine Runner on AWS Graviton2
3+
weight: 6
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Install CircleCI Machine Runner on AWS Graviton2
10+
11+
This guide provides step-by-step instructions to install and configure the **CircleCI Machine Runner** on an **AWS Graviton2 (Neoverse N1) instance**.
12+
With this setup, your self-hosted **Arm64 environment** can efficiently execute CircleCI jobs directly on the Graviton2 architecture, enabling faster builds and improved performance for ARM-based workloads.
13+
14+
15+
### Add CircleCI Package Repository
16+
For **Debian/Ubuntu-based systems** running on **AWS Graviton2 (Arm64)**, first add the official CircleCI repository.
17+
This ensures you can install the CircleCI Runner package directly using `apt`.
18+
19+
```console
20+
curl -s https://packagecloud.io/install/repositories/circleci/runner/script.deb.sh?any=true | sudo bash
21+
```
22+
23+
- The `curl` command downloads and executes the repository setup script from CircleCI’s official package server.
24+
- It configures the repository on your system, allowing `apt` to fetch and install the CircleCI runner package.
25+
- After successful execution, the CircleCI repository will be added under `/etc/apt/sources.list.d/`.
26+
27+
### Configure the Runner Token
28+
- Each self-hosted runner requires a unique authentication token generated from your Resource Class in the CircleCI Dashboard.
29+
- Copy the token from the CircleCI web interface.
30+
- Export the token as an environment variable and update the runner configuration file as shown:
31+
32+
```console
33+
export RUNNER_AUTH_TOKEN="YOUR_AUTH_TOKEN"
34+
sudo sed -i "s/<< AUTH_TOKEN >>/$RUNNER_AUTH_TOKEN/g" /etc/circleci-runner/circleci-runner-config.yaml
35+
```
36+
37+
### Install the CircleCI Runner
38+
Install the pre-built CircleCI runner package:
39+
40+
```console
41+
sudo apt-get install -y circleci-runner
42+
```
43+
44+
- Installs the latest CircleCI Machine Runner compatible with your Arm64 instance.
45+
- Runner binary and configuration files are located in `/usr/bin/` and `/etc/circleci-runner/`.
46+
47+
### Configure the Runner Authentication Token
48+
Update the CircleCI runner configuration with your authentication token. This token is generated from the Resource Class you created in the CircleCI Dashboard.
49+
50+
```console
51+
export RUNNER_AUTH_TOKEN="YOUR_AUTH_TOKEN"
52+
sudo sed -i "s/<< AUTH_TOKEN >>/$RUNNER_AUTH_TOKEN/g" /etc/circleci-runner/circleci-runner-config.yaml
53+
```
54+
55+
### Enable and Start the CircleCI Runner
56+
Set the CircleCI runner service to start automatically and verify it is running:
57+
58+
```console
59+
sudo systemctl enable circleci-runner
60+
sudo systemctl start circleci-runner
61+
sudo systemctl status circleci-runner
62+
```
63+
64+
If the status shows active (running), your runner is successfully installed and connected to CircleCI.
65+
66+
```output
67+
● circleci-runner.service - Run the CircleCI self-hosted runner agent
68+
Loaded: loaded (/usr/lib/systemd/system/circleci-runner.service; enabled; preset: enabled)
69+
Active: active (running) since Fri 2025-10-17 05:33:20 UTC; 51min ago
70+
Main PID: 2226 (circleci-runner)
71+
Tasks: 9 (limit: 18717)
72+
Memory: 53.0M (peak: 66.9M)
73+
CPU: 1.249s
74+
CGroup: /system.slice/circleci-runner.service
75+
└─2226 /usr/bin/circleci-runner machine -c /etc/circleci-runner/circleci-runner-config.yaml
76+
77+
Oct 17 05:41:28 ip-172-31-34-224 circleci-runner[2226]: 05:41:28 7b67e 24.210ms worker loop: claim: app.backoff_ms=5000 app.>
78+
Oct 17 06:00:08 ip-172-31-34-224 circleci-runner[2226]: 06:00:08 a8093 22.942ms POST /api/v3/runner/claim app.loop_name=claim>
79+
Oct 17 06:00:08 ip-172-31-34-224 circleci-runner[2226]: 06:00:08 a8093 23.028ms claim app.loop_name=claim: mode=agent result>
80+
Oct 17 06:00:08 ip-172-31-34-224 circleci-runner[2226]: 06:00:08 a8093 23.064ms worker loop: claim: app.backoff_ms=5000 app.>
81+
Oct 17 06:04:49 ip-172-31-34-224 circleci-runner[2226]: 06:04:49 73039 19.847ms POST /api/v3/runner/claim app.loop_name=claim>
82+
Oct 17 06:04:49 ip-172-31-34-224 circleci-runner[2226]: 06:04:49 73039 19.936ms claim app.loop_name=claim: mode=agent result>
83+
Oct 17 06:04:49 ip-172-31-34-224 circleci-runner[2226]: 06:04:49 73039 19.971ms worker loop: claim: app.backoff_ms=5000 app.>
84+
Oct 17 06:19:13 ip-172-31-34-224 circleci-runner[2226]: 06:19:13 c34c1 22.392ms POST /api/v3/runner/claim app.loop_name=claim>
85+
Oct 17 06:19:13 ip-172-31-34-224 circleci-runner[2226]: 06:19:13 c34c1 22.479ms claim app.loop_name=claim: mode=agent result>
86+
Oct 17 06:19:13 ip-172-31-34-224 circleci-runner[2226]: 06:19:13 c34c1 22.514ms worker loop: claim: app.backoff_ms=5000 app.>
87+
```
88+
89+
This confirms that the CircleCI Runner is actively connected to your CircleCI account and ready to accept jobs.
90+
91+
Also, you can verify it from the dashboard:
92+
93+
![Self-Hosted Runners alt-text#center](images/runner.png "Figure 1: Self-Hosted Runners ")
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Install CircleCI CLI
3+
weight: 4
4+
5+
### FIXED, DO NOT MODIFY
6+
layout: learningpathall
7+
---
8+
9+
## Install CircleCI CLI on AWS Graviton2 (Neoverse N1) Instance
10+
This guide explains installing the **CircleCI Command Line Interface (CLI)** on an **AWS Graviton2 (Neoverse N1) Arm64 EC2 instance**.
11+
The CLI enables you to interact with CircleCI directly from your terminal — for validating configuration files, managing pipelines, and operating self-hosted runners on your EC2 instance.
12+
13+
### Install Required Packages
14+
Before installing the CircleCI CLI, ensure your system has the necessary tools for downloading and extracting files.
15+
16+
```console
17+
sudo apt update && sudo apt install -y curl tar gzip coreutils gpg git
18+
```
19+
### Download and Extract the CircleCI CLI
20+
21+
Next, download the CircleCI CLI binary for **Linux arm64** and extract it.
22+
23+
```console
24+
curl -fLSs https://github.com/CircleCI-Public/circleci-cli/releases/download/v0.1.33494/circleci-cli_0.1.33494_linux_arm64.tar.gz | tar xz
25+
sudo mv circleci-cli_0.1.33494_linux_arm64/circleci /usr/local/bin/
26+
```
27+
- The `curl` command fetches the official **CircleCI CLI archive** from GitHub.
28+
- The `| tar xz` command extracts the compressed binary in a single step.
29+
- After extraction, a new folder named **`circleci-cli_0.1.33494_linux_arm64`** appears in your current directory.
30+
31+
### Verify the Installation
32+
33+
To ensure that the CLI is installed successfully, check its version:
34+
35+
```console
36+
circleci version
37+
```
38+
You should see an output similar to:
39+
40+
```output
41+
0.1.33494+7cc6570 (release)
42+
```
43+
44+
If this version number appears, the CircleCI CLI installation on your AWS Graviton2 instance was successful!
78.3 KB
Loading
40.9 KB
Loading
58.4 KB
Loading
145 KB
Loading
79.3 KB
Loading

0 commit comments

Comments
 (0)