Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
---
title: Deploy GitHub Actions Self-Hosted Runner on Google Axion C4A virtual machine

draft: true
cascade:
draft: true

minutes_to_complete: 15

who_is_this_for: This is an introductory topic for developers who want to deploy GitHub Actions Self-Hosted Runner on an Arm-based Google Axion C4A instance.
who_is_this_for: This is an introductory topic for developers who want to deploy a GitHub Actions self-hosted runner on an Arm-based Google Axion C4A instance.

learning_objectives:
- Provision an Arm virtual machine on the Google Cloud Platform using the C4A Google Axion instance family.
- Set up and validate a GitHub Actions self-hosted runner on the Arm virtual machine.
- Deploy a basic CI workflow with NGINX and verify execution on Arm infrastructure.
- Provision an Arm virtual machine on the Google Cloud Platform using the C4A Google Axion instance family
- Set up and validate a GitHub Actions self-hosted runner on the Arm virtual machine
- Deploy a basic CI workflow with NGINX and verify execution on Arm infrastructure

prerequisites:
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free?utm_source=google&hl=en) account with billing enabled.
- A GitHub account. You can sign up [here](https://github.com/signup).
- A [Google Cloud Platform (GCP)](https://cloud.google.com/free?utm_source=google&hl=en) account with billing enabled
- A GitHub account; you can sign up [here](https://github.com/signup)

author: Annie Tallund

Expand All @@ -39,22 +35,22 @@ operatingsystems:
# FIXED, DO NOT MODIFY
# ================================================================================
further_reading:
- resource:
title: Google Cloud official website and documentation
link: https://cloud.google.com/docs
type: documentation

- resource:
title: Github-action official website and documentation
link: https://docs.github.com/en/actions
type: documentation

- resource:
title: GitHub Actions Arm runners
link: https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/
type: website

- resource:
- resource:
title: Google Cloud documentation
link: https://cloud.google.com/docs
type: documentation

- resource:
title: GitHub Actions documentation
link: https://docs.github.com/en/actions
type: documentation

- resource:
title: GitHub Actions Arm runners (announcement)
link: https://github.blog/news-insights/product-news/arm64-on-github-actions-powering-faster-more-efficient-build-systems/
type: website

- resource:
title: GCP Quickstart Guide to Create a virtual machine
link: https://cloud.google.com/compute/docs/instances/create-start-instance
type: website
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ layout: "learningpathall"

## Google Axion C4A series

The Google Axion C4A series is a family of Arm-based virtual machines built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance ideal for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.
The Google Axion C4A series is a family of Arm-based virtual machines (VMs) built on Google’s custom Axion CPU, which is based on Arm Neoverse-V2 cores. Designed for high-performance and energy-efficient computing, these virtual machines offer strong performance ideal for modern cloud workloads such as CI/CD pipelines, microservices, media processing, and general-purpose applications.

The C4A series provides offer a cost-effective virtual machine while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.
The C4A series provides cost-effective VMs while leveraging the scalability and performance benefits of the Arm architecture on Google Cloud.

To learn more about Google Axion, refer to the blog [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).
Learn more in Google’s announcement: [Introducing Google Axion processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu).

## GitHub Actions and CI/CD

GitHub Actions is a powerful CI/CD (Continuous Integration and Continuous Delivery) platform built into GitHub. It allows developers to automate tasks such as building, testing, and deploying code in response to events like code pushes, pull requests, or scheduled jobsdirectly from their GitHub repositories. This helps improve development speed, reliability, and collaboration.
GitHub Actions is a powerful CI/CD (Continuous Integration and Continuous Delivery) platform built into GitHub. It allows developers to automate tasks such as building, testing, and deploying code in response to events like code pushes, pull requests, or scheduled jobs - directly from their GitHub repositories. This helps improve development speed, reliability, and collaboration.

A key feature of GitHub Actions is [self-hosted runners](https://docs.github.com/en/actions/concepts/runners/about-self-hosted-runners), which let you run workflows on your own infrastructure instead of GitHub’s hosted servers. This is especially useful for:

- Running on custom hardware, including Arm64-based systems (e.g., Google Axion virtual machine), to optimize performance and ensure architecture-specific compatibility.
- Private network access, allowing secure interaction with internal services or databases.
- Faster execution, especially for resource-intensive workflows, by using dedicated or high-performance machines.
- Running on custom hardware, including Arm64-based systems (for example, Google Axion virtual machine), to optimize performance and ensure architecture-specific compatibility
- Private network access, allowing secure interaction with internal services or databases
- Faster execution, especially for resource-intensive workflows, by using dedicated or high-performance machines

Self-hosted runners provide more control, flexibility, and cost-efficiency—making them ideal for advanced CI/CD pipelines and platform-specific testing.
Self-hosted runners give you more control, flexibility, and cost efficiency - ideal for advanced CI/CD pipelines and platform-specific testing.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ weight: 4
layout: learningpathall
---

## Overview

This section shows how to deploy a self-hosted GitHub Actions runner on your instance. It covers installing Git and GitHub CLI, authenticating with GitHub and configuring the runner on an Arm64 environment for optimized CI/CD workflows.
This section shows you how to deploy a GitHub Actions self-hosted runner on your Arm64 Google Axion C4A instance. You will install Git and GitHub CLI, authenticate with GitHub, and register the runner so CI/CD workflows run on Arm infrastructure.

### Set up development environment
## Set up your development environment

Start by installing the required dependencies using the `apt` package manager:

Expand All @@ -18,7 +19,7 @@ sudo apt update
sudo apt install -y git gh vim
```

Next step is to configure your git credentials. Update the command with your name and email.
Configure your Git identity:

```bash
git config --global user.email "[email protected]"
Expand All @@ -27,30 +28,30 @@ git config --global user.name "Your Name"

Now you are ready to connect the machine to GitHub. The command below is used to authenticate the GitHub CLI with your GitHub account. It allows you to securely log in using a web browser or token, enabling the CLI to interact with repositories, actions, and other GitHub features on your behalf.

Authenticate with GitHub:

```console
gh auth login
```

The command will prompt you to make a few choices. For this use-case, you can use the default ones as shown in the image below.
Follow the prompts and accept the defaults:

![Login to GitHub](./images/gh-auth.png)
![Login to GitHub alt-text#center](./images/gh-auth.png "Screenshot of GitHub authentication prompt")

{{% notice %}}
If you get an error opening the browser on your virtual machine, you can navigate to the following URL on the host machine.
{{% notice Note %}}
If you get an error opening the browser on your virtual machine, you can navigate to the following URL on the host machine and enter the device code displayed in the CLI of the virtual machine:
```
https://github.com/login/device
```
From there, you can enter the code displayed in the CLI of the virtual machine.
{{% /notice %}}

If the log in was successful, you will see the following confirmation in your browser window.
When authentication succeeds, you will see a confirmation screen in your browser:

![GitHub UI](./images/login-page.png)
![GitHub UIalt-text#center](./images/login-page.png "Screenshot of successful GitHub login confirmation")

### Test GitHub CLI and Git
## Test GitHub CLI and Git

The command below creates a new public GitHub repository named **test-repo** using the GitHub CLI. It sets the repository visibility to public, meaning anyone can view it
The command below creates a new public GitHub repository named `test-repo` using the GitHub CLI. It sets the repository visibility to public, meaning that anyone can view it:

```console
gh repo create test-repo --public
Expand All @@ -59,66 +60,65 @@ You should see an output similar to:
```output
✓ Created repository <your-github-account>/test-repo on GitHub
https://github.com/<your-github-account>/test-repo
```
```


### Configure the Self-Hosted Runner
## Configure the self-hosted runner

* Go to your repository's **Settings > Actions**, and under the **Runners** section
* Click on **Add Runner** or view existing self-hosted runners.
In your repository, go to **Settings** → **Actions** → **Runners** and select **Add runner**, or view existing self-hosted runners.

{{% notice Note %}}
If the **Actions** tab is not visible, ensure Actions are enabled by navigating to **Settings > Actions > General**, and select **Allow all actions and reusable workflows**.
{{% /notice %}}
{{% notice Note %}}
If the **Actions** tab is not visible, enable Actions under **Settings** → **Actions** → **General** by selecting **Allow all actions and reusable workflows**.
{{% /notice %}}

![runner](./images/newsh-runner.png)
![runner alt-text#center](./images/newsh-runner.png "Screenshot of repository Runners settings page")

Then, click on the **New self-hosted runner** button. In the **Add new self-hosted runner** section. Select Linux for the operating system, and choose ARM64 for the architecture. This will generate commands to set up the runner. Copy and run them on your Google Axion C4A virtual machine.
Click **New self-hosted runner**. In the setup panel, choose `Linux` as the operating system and `ARM64` as the architecture. Copy the generated setup commands and run them on your C4A VM.

![new-runner alt-text#center](./images/new-runner.png "Screenshot of the Add new self-hosted runner panel")

![new-runner](./images/new-runner.png)
The final command links the runner to your GitHub repository using a one-time registration token.
During setup, you will be prompted for the runner group, runner name, and work folder. Press **Enter** at each prompt to accept the defaults. The output should look similar to:

The final command links the runner to your GitHub repo using a one-time registration token.
```output
--------------------------------------------------------------------------------
| ____ _ _ _ _ _ _ _ _ |
| / ___(_) |_| | | |_ _| |__ / \ ___| |_(_) ___ _ __ ___ |
| | | _| | __| |_| | | | | '_ \ / _ \ / __| __| |/ _ \| '_ \/ __| |
| | |_| | | |_| _ | |_| | |_) | / ___ \ (__| |_| | (_) | | | \__ \ |
| \____|_|\__|_| |_|\__,_|_.__/ /_/ \_\___|\__|_|\___/|_| |_|___/ |
| |
| Self-hosted runner registration |
| |
--------------------------------------------------------------------------------

During the command’s execution, you will be prompted to provide the runner group, the name of the runner, and the work folder name. You can accept the defaults by pressing **Enter** at each step. The output will resemble as below:
# Authentication

```output
--------------------------------------------------------------------------------
| ____ _ _ _ _ _ _ _ _ |
| / ___(_) |_| | | |_ _| |__ / \ ___| |_(_) ___ _ __ ___ |
| | | _| | __| |_| | | | | '_ \ / _ \ / __| __| |/ _ \| '_ \/ __| |
| | |_| | | |_| _ | |_| | |_) | / ___ \ (__| |_| | (_) | | | \__ \ |
| \____|_|\__|_| |_|\__,_|_.__/ /_/ \_\___|\__|_|\___/|_| |_|___/ |
| |
| Self-hosted runner registration |
| |
--------------------------------------------------------------------------------

# Authentication

√ Connected to GitHub
# Runner Registration
Enter the name of the runner group to add this runner to: [press Enter for Default]
Enter the name of runner: [press Enter for lpprojectubuntuarm64]
This runner will have the following labels: 'self-hosted', 'Linux', 'ARM64'
Enter any additional labels (ex. label-1,label-2): [press Enter to skip]
√ Runner successfully added
√ Runner connection is good
```
√ Connected to GitHub
# Runner Registration
Enter the name of the runner group to add this runner to: [press Enter for Default]
Enter the name of runner: [press Enter for lpprojectubuntuarm64]
This runner will have the following labels: 'self-hosted', 'Linux', 'ARM64'
Enter any additional labels (ex. label-1,label-2): [press Enter to skip]
√ Runner successfully added
√ Runner connection is good
```

Finally, start the runner by executing:
```console
./run.sh
```
You should see an output similar to:
Finally, start the runner by executing:
```console
./run.sh
```
You should see an output similar to:

```output
√ Connected to GitHub
```output
√ Connected to GitHub

Current runner version: '2.326.0'
2025-07-15 05:51:13Z: Listening for Jobs
```
The runner will now be visible in the GitHub actions:
Current runner version: '2.326.0'
2025-07-15 05:51:13Z: Listening for Jobs
```
The runner will now be visible in the GitHub actions:

![final-runner alt-text#center](./images/final-runner.png "Screenshot of runner visible in GitHub")

![final-runner](./images/final-runner.png)
For now, you can terminate the `./run.sh` command with `Ctrl+C`. Move on to the next section to set up a simple web server using the runner.

For now, you can terminate the `./run.sh` command with `Ctrl+C`. Move on to the next section to set up a simple web server using the runner.
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,30 @@ weight: 3
layout: learningpathall
---

## Introduction
## Overview

This section walks you through creating **Google Axion C4A Arm virtual machine** on GCP with the **c4a-standard-4 (4 vCPUs, 16 GB Memory)** machine type, using the **Google Cloud Console**.
This section walks you through creating a Google Axion C4A Arm virtual machine on Google Cloud with the `c4a-standard-4` (4 vCPUs, 16 GB memory) machine type using the Google Cloud Console. You will use this VM later as the host for a GitHub Actions self-hosted runner.

If you haven't got a Google Cloud account, you can follow the Learning Path on [Getting Started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/) to get started.
If you don't have a Google Cloud account, see the Learning Path [Getting started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/).

### Create an Arm-based Virtual Machine (C4A)
## Create an Arm-based virtual machine (C4A)

To create a virtual machine based on the C4A Arm architecture:
1. Open the [Google Cloud Console](https://console.cloud.google.com/).
2. Navigate to the card **Compute Engine** and click on **Create Instance**.
3. Under the **Machine Configuration**:
- Fill in basic details like **Instance Name**, **Region**, and **Zone**.
- Choose the **Series** as `C4A`.
- Select a machine type such as `c4a-standard-4`.
![Instance Screenshot](./images/select-instance.png)
4. Under the **OS and Storage**, click on **Change**, pick **Ubuntu** as the Operating System with **Ubuntu 24.04 LTS Minimal** as the Version. Make sure you pick the version of image for Arm.
5. Under **Networking**, enable **Allow HTTP traffic** to test workloads like NGINX later.
6. Click on **Create**, and the instance will launch.
Follow these steps in the Google Cloud Console:

- Open the [Google Cloud Console](https://console.cloud.google.com/).
- Go to **Navigation menu ▸ Compute Engine ▸ VM instances**, then select **Create instance**.
- Under **Machine configuration**:
- Enter **Instance name**, **Region**, and **Zone**
- Set **Series** to `C4A`
- Choose a machine type such as `c4a-standard-4`
- Under **OS and storage**, select **Change**, pick **Ubuntu** as the operating system, and choose **Ubuntu 24.04 LTS Minimal**. Make sure you select the Arm image variant.
- Under **Networking**, enable **Allow HTTP traffic** so you can test workloads like NGINX later.
- Select **Create** to launch the instance.

![Google Cloud Console page showing C4A VM creation with c4a-standard-4 selectedalt-text#center](./images/select-instance.png "Create a C4A VM in the Google Cloud Console")

{{% notice Important %}}
You should not enable the **Allow HTTP traffic** permanently, since this poses a security risk. For the long-term, you should only allow traffic from the IP address you use to connect to the instance.
Do not leave **Allow HTTP traffic** enabled permanently. For long-term use, allow traffic only from the IP addresses you use to connect to the instance.
{{% /notice %}}

You can access the Google Cloud Console by clicking the **SSH** button in the instance overview. Use this command line interface (CLI) to run the commands in the remainder of this Learning Path.
Access the VM from the instance list by selecting **SSH** in the instance overview. Use this command line interface (CLI) to run the commands in the remainder of this Learning Path.
Loading