diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/_index.md b/content/learning-paths/servers-and-cloud-computing/github-on-arm/_index.md new file mode 100644 index 0000000000..8288a91a4e --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/github-on-arm/_index.md @@ -0,0 +1,58 @@ +--- +title: Deploy GitHub Actions Self-Hosted Runner on Google Axion C4A virtual machine + +minutes_to_complete: 30 + +who_is_this_for: This Learning Path is for DevOps engineers, system administrators, or developers who want to deploy GitHub Actions Self-Hosted Runner on the Google Axion C4A Arm virtual machine. + +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. + +prerequisites: + - A [Google Cloud Platform (GCP)](https://cloud.google.com/free?utm_source=google&hl=en) account with billing enabled. + - Familiarity with [GitHub Actions](https://github.com/features/actions) and the Linux command line. + - A GitHub account. You can sign up [here](https://github.com/signup). + +author: Jason Andrews + +##### Tags +skilllevels: Advanced +subjects: CI-CD +cloud_service_providers: Google Cloud + +armips: + - Neoverse + +tools_software_languages: + - GitHub Actions + - GitHub CLI + +operatingsystems: + - Linux + +# ================================================================================ +# 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 + + +weight: 1 # _index.md always has weight of 1 to order correctly +layout: "learningpathall" # All files under learning paths have this same wrapper +learning_path_main_page: "yes" # Indicates this should be surfaced when looking for related content. Only set for _index.md of learning path content. +--- diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/_next-steps.md b/content/learning-paths/servers-and-cloud-computing/github-on-arm/_next-steps.md new file mode 100644 index 0000000000..c3db0de5a2 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/github-on-arm/_next-steps.md @@ -0,0 +1,8 @@ +--- +# ================================================================================ +# FIXED, DO NOT MODIFY THIS FILE +# ================================================================================ +weight: 21 # Set to always be larger than the content in this path to be at the end of the navigation. +title: "Next Steps" # Always the same, html page title. +layout: "learningpathall" # All files under learning paths have this same wrapper for Hugo processing. +--- diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/background.md b/content/learning-paths/servers-and-cloud-computing/github-on-arm/background.md new file mode 100644 index 0000000000..8eb8259dae --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/github-on-arm/background.md @@ -0,0 +1,27 @@ +--- +title: "About Google Axion C4A series and GitHub Actions" + +weight: 2 + +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 C4A series provides a cost-effective alternative to x86 virtual machine while leveraging the scalability and performance benefits of the Arm architecture in 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). + +## 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 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. + +Self-hosted runners provide more control, flexibility, and cost-efficiency—making them ideal for advanced CI/CD pipelines and platform-specific testing. diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/deploy.md b/content/learning-paths/servers-and-cloud-computing/github-on-arm/deploy.md new file mode 100644 index 0000000000..8d6e2ff6d2 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/github-on-arm/deploy.md @@ -0,0 +1,113 @@ +--- +title: Install and Set Up GitHub Self-Hosted Runner on Google Cloud C4A Virtual Machine +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + + +## Set Up GitHub Actions Self-Hosted Runner on Google Axion C4A Virtual Machine + +This Learning Path shows how to deploy a self-hosted GitHub Actions runner on a Google Cloud C4A Arm64 virtual machine running Ubuntu. It covers installing Git and GitHub CLI, authenticating with GitHub and configuring the runner on an Arm64 environment for optimized CI/CD workflows. + +### Install Git and GitHub CLI +```console +sudo apt update +sudo apt install -y git gh +``` +Login to GitHub +```console +gh auth login + ``` +The command `gh auth login` 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. + +![Login to GitHub](./images/gh-auth.png) + +Below is the GitHub login UI: + +![GitHub UI](./images/login-page.png) + +### Test GitHub CLI and Git +Create a test repo: +```console +gh repo create test-repo –public +``` +You should see an output similar to: +```output +✓ Created repository /test-repo on GitHub + https://github.com//test-repo +``` + +The command `gh repo create test-repo --public` 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 + +### 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. +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**. + +![runner](./images/newsh-runner.png) + +Then, click on the **New runner** button, followed by **New self-hosted runner**. In the **Add new self-hosted runner** section, proceed as follows: +- Select Linux for the operating system. +- Choose ARM64 for the architecture + +![new-runner](./images/new-runner.png) + +Next, execute the following instructions on your Google Axion C4A virtual machine: +```console +mkdir actions-runner && cd actions-runner# Download the latest runner package +curl -o actions-runner-linux-arm64-2.326.0.tar.gz -L https://github.com/actions/runner/releases/download/v2.326.0/actions-runner-linux-arm64-2.326.0.tar.gz +echo "ee7c229c979c5152e9f12be16ee9e83ff74c9d9b95c3c1aeb2e9b6d07157ec85 actions-runner-linux-arm64-2.326.0.tar.gz" | shasum -a 256 -c# Extract the installer +tar xzf ./actions-runner-linux-arm64-2.326.0.tar.gz +``` +Then, configure the virtual machine with the following command: + +```console +./config.sh --url https://github.com//YOUR_REPO --token YOUR_TOKEN +``` +Replace `YOUR_USERNAME`, `YOUR_REPO`, and `YOUR_TOKEN` accordingly. +This command links the runner to your GitHub repo using a one-time registration token. + +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: + +You should see an output similar to: + +```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 +``` + +Finally, start the runner by executing: +```console +./run.sh +``` +You should see an output similar to: + +```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: + +![final-runner](./images/final-runner.png) diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/final-runner.png b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/final-runner.png new file mode 100644 index 0000000000..40fa28b573 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/final-runner.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/gh-auth.png b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/gh-auth.png new file mode 100644 index 0000000000..3a99824831 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/gh-auth.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/image.png b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/image.png new file mode 100644 index 0000000000..2a65bdcde8 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/image.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/login-page.png b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/login-page.png new file mode 100644 index 0000000000..f2bb1bd185 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/login-page.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/new-runner.png b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/new-runner.png new file mode 100644 index 0000000000..524acaefc5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/new-runner.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/newsh-runner.png b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/newsh-runner.png new file mode 100644 index 0000000000..b507f32101 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/newsh-runner.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/nginx.png b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/nginx.png new file mode 100644 index 0000000000..83d940dc56 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/github-on-arm/images/nginx.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/instance.md b/content/learning-paths/servers-and-cloud-computing/github-on-arm/instance.md new file mode 100644 index 0000000000..74bcc63ce3 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/github-on-arm/instance.md @@ -0,0 +1,29 @@ +--- +title: Create Google Axion C4A Arm virtual machine +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Introduction + +This guide walks you through provisioning **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**. + +If you are new to Google Cloud, it is recommended to follow the [GCP Quickstart Guide to Create a virtual machine](https://cloud.google.com/compute/docs/instances/create-start-instance). + +For more details, kindly follow the Learning Path on [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) + +To create a virtual machine based on the C4A Arm architecture: +1. Navigate to the [Google Cloud Console](https://console.cloud.google.com/). +2. Go to **Compute Engine > VM Instances** 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/image.png) +4. Under the **OS and Storage**, click on **Change**, and select Arm64 based OS Image of your choice. For this Learning Path, we 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. diff --git a/content/learning-paths/servers-and-cloud-computing/github-on-arm/nginx-deployment.md b/content/learning-paths/servers-and-cloud-computing/github-on-arm/nginx-deployment.md new file mode 100644 index 0000000000..6572dff9cf --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/github-on-arm/nginx-deployment.md @@ -0,0 +1,51 @@ +--- +title: Deploy NGINX on Self-Hosted Runner Using GitHub Actions +weight: 5 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + + +## Deploy NGINX Using GitHub Actions +This workflow installs and starts the NGINX web server on a self-hosted runner whenever code is pushed to the main branch. + +### Create the Workflow: + +Create a workflow file at `.github/workflows/deploy-nginx.yaml` with the following content: + +```yaml + +name: Deploy NGINX + +on: + push: + branches: [ main ] + +jobs: + deploy: + runs-on: self-hosted + steps: + - name: Install NGINX + run: | + sudo apt update + sudo apt install -y nginx + + - name: Start NGINX + run: sudo systemctl start nginx +``` +### Commit and Push: + + ```console +git add . +git commit -m "Add NGINX deploy workflow" +git push origin main +``` +### Access the NGINX Server +Once the workflow completes, open your browser and navigate to: +``` +http:// +``` +You should see the NGINX welcome page confirming a successful deployment. + +![nginx](./images/nginx.png)