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
3 changes: 2 additions & 1 deletion .wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5260,4 +5260,5 @@ sSf
tcmalloc
tlsv
vLLM's
webp
webp
HugeTLB
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
---
title: CircleCI Arm Native Workflows on SUSE Arm (GCP VM)

draft: true
cascade:
draft: true
title: Run CircleCI Arm Native Workflows on a SUSE Arm GCP VM

minutes_to_complete: 45

who_is_this_for: This is an introductory topic for software developers and DevOps engineers looking to set up and run CircleCI Arm native workflows on SUSE Linux Arm64 VMs, specifically on Google Cloud C4A with Axion processors, using self-hosted runners.
who_is_this_for: This is an introductory topic for developers and DevOps engineers looking to set up and run CircleCI Arm native workflows on SUSE Linux Arm64 virtual machines (VMs), specifically on Google Cloud C4A with Axion processors, using self-hosted runners.

learning_objectives:
- Provision a SUSE Arm64 virtual machine on Google Cloud (C4A with Axion processors)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
title: Getting started with CircleCI on Google Axion C4A (Arm Neoverse-V2)
title: Get started with CircleCI on Google Axion C4A

weight: 2

layout: "learningpathall"
---

## Google Axion C4A Arm instances in Google Cloud
## Explore Google Axion C4A

Google Axion C4A 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 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 machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud.

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

## CircleCI
## Learn about CircleCI for Arm-based CI/CD workflows

CircleCI is a cloud-based Continuous Integration and Continuous Delivery (CI/CD) platform that automates the process of building, testing, and deploying software.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
---
title: CircleCI Arm64 Cloud-Native Demo
title: Build and test an Arm64 Node.js app using CircleCI
weight: 8

### FIXED, DO NOT MODIFY
layout: learningpathall
---

## Deploying a Cloud-Native Arm64 Node.js App Using a Self-Hosted CircleCI Runner on GCP
## Overview

This section demonstrates how to build and test a simple Node.js web application using a self-hosted CircleCI runner running on a Google Cloud C4A (Axion Arm64) SUSE Linux virtual machine.
This final section demonstrates how to build and test a simple Node.js web application using a self-hosted CircleCI runner running on a Google Cloud C4A (Axion Arm64) SUSE Linux virtual machine. You’ll configure Docker on the VM so that CircleCI jobs can build, test, and run containerized applications directly in your Arm64 environment, ideal for cloud-native development and CI/CD workflows targeting Arm architecture.

You’ll configure Docker on the VM so that CircleCI jobs can build, test, and run containerized applications directly in your Arm64 environment, ideal for cloud-native development and CI/CD workflows targeting Arm architecture.


### Install and Configure Docker
## Install and configure Docker
Ensure Docker is installed, enabled, and accessible by both your local user and the CircleCI runner service.

1. Install Docker
Refresh your package manager and install Docker on your system:
Start by refreshing your package manager and then install Docker on your system:

```bash
sudo zypper refresh
sudo zypper install docker
```
2. Enable and start Docker service
Set Docker to start automatically at boot and verify it’s running:
To enable and start the Docker service, set Docker to start automatically at boot and verify it is running:
```bash
sudo systemctl enable docker
sudo systemctl start docker
sudo systemctl status docker
```
3. Grant Docker access to users
Add both your current user and the circleci system user to the Docker group so they can run Docker commands without sudo:
Now grant Docker access to users by adding both your current user and the circleci system user to the Docker group so they can run Docker commands without sudo:
```bash
sudo usermod -aG docker $USER
sudo usermod -aG docker circleci
```
### Validate Docker access
After installing Docker and adding the circleci user to the Docker group, verify that the CircleCI runner user can access Docker without requiring elevated privileges.

Run the following commands:
Expand All @@ -45,8 +40,8 @@ docker ps
exit
```

### Verify Docker Permissions
Now, confirm that Docker’s socket permissions and the CircleCI runner service are both configured correctly.
## Verify Docker permissions
Now, confirm that Docker’s socket permissions and the CircleCI runner service are both configured correctly:

```bash
ls -l /var/run/docker.sock
Expand All @@ -56,7 +51,7 @@ These commands ensure that the Docker socket is accessible and the CircleCI runn

Once both checks pass, your environment is ready to build and run container-based pipelines with CircleCI on SUSE Arm64.

### Install Node.js and npm
## Install Node.js and npm

Before setting up the sample application, ensure that `Node.js` and its package manager `npm` are installed on your SUSE Arm64 VM. Both are required to run, build, and test the `Node.js` web application within your CircleCI pipeline.

Expand All @@ -69,32 +64,32 @@ sudo zypper install npm
```
Next, you’ll create the demo project and prepare its CircleCI configuration to run jobs using your self-hosted Arm64 runner.

### Create a repository for your example code
To store and manage your Node.js demo application, you’ll create a new GitHub repository using the GitHub CLI.
## Create a repository for your example code
To store and manage your Node.js demo application, you’ll create a new GitHub repository using the GitHub CLI. This approach lets you quickly initialize a remote repository, push your project files, and collaborate with others directly from your terminal. Using the GitHub CLI is especially helpful on Arm64 systems, as it streamlines repository creation and management without needing to use a web browser. You’ll also be able to authenticate securely and automate common GitHub tasks, making your workflow more efficient for cloud-native development on Arm platforms.

1. Install the GitHub CLI
## Install the GitHub CLI
The GitHub CLI (gh) lets you manage repositories, issues, and pull requests directly from your terminal.

```bash
sudo zypper install -y gh
```
2. Authenticate with GitHub
## Authenticate with GitHub
Run the following command to connect the CLI to your GitHub account:

```bash
gh auth login
```

3. Create a New Repository
## Create a new repository
Create a new public repository for your demo project and clone it locally:

```console
gh repo create arm64-node-demo --public --clone
cd arm64-node-demo
```

### Create a Dockerfile
In the root of your project, create a file named `Dockerfile` to define how your `Node.js` application container will be built and executed.
## Create a Dockerfile
In the root of your project, create a file named `Dockerfile` to define how your `Node.js` application container will be built and executed:

```console
# Dockerfile
Expand All @@ -115,7 +110,7 @@ Breakdown of the Dockerfile:

Next, you’ll add the application code and a `.circleci/config.yml` file to automate the build and test pipeline using your self-hosted Arm64 runner.

### Add a CircleCI Configuration
## Add a CircleCI configuration
Create a configuration file that defines your CircleCI pipeline for building, running, and testing your Node.js app on Arm64 architecture.
In the root of your project, create a folder named `.circleci` and inside it, add a file called `config.yml` with the contents below:

Expand Down Expand Up @@ -164,7 +159,7 @@ Explanation of the yaml file:
- resource_class: Specify the resource class for the CircleCI runner (e.g., a custom Arm64 runner if using self-hosted).
- Test Endpoint: The job sends a request to the app to verify it’s working.

### Node.js Application
## Node.js application
Create the application files in your repository root directory for the Node.js app.

Use a file editor of your choice and copy the contents shown below into a file named `index.js`:
Expand Down Expand Up @@ -202,10 +197,9 @@ Now copy the content below into a file named `package.json`:
- Express Server: The application uses Express.js to handle HTTP requests and respond with a simple message.
- Package Dependencies: The app requires the `express` package for handling HTTP requests.

### Push Code to GitHub
## Push code to GitHub

Now that all project files (Dockerfile, index.js, package.json, and .circleci/config.yml) are ready, push the code to GitHub.
This allows CircleCI to automatically detect the repository and trigger your Arm64 build pipeline using the self-hosted runner.
Now that all project files (Dockerfile, index.js, package.json, and .circleci/config.yml) are ready, you can push the code to GitHub. This allows CircleCI to automatically detect the repository and trigger your Arm64 build pipeline using the self-hosted runner.

Configure Git username and add and commit project files:

Expand All @@ -217,7 +211,7 @@ git push -u origin main
```
You have pushed your code to the GitHub repository so that CircleCI can trigger the build.

### Start CircleCI Runner and Execute Job
## Start CircleCI runner and execute the job
Before triggering your first workflow, ensure that the CircleCI runner service is enabled and running on your SUSE Arm64 VM. This will allow your self-hosted runner to pick up jobs from CircleCI.

```bash
Expand All @@ -229,35 +223,47 @@ sudo systemctl status circleci-runner
- Start and Check Status: Starts the CircleCI runner and verifies it is running.


### Verify Job Execution in CircleCI
## Verify Job Execution in CircleCI

After pushing your code to GitHub, open your CircleCI Dashboard → Projects, and confirm that your Arm64 workflow starts running using your self-hosted runner.

If the setup is correct, you’ll see your job running under the resource class you created.

### Output
## Output
When the CircleCI workflow starts running on your self-hosted Arm64 runner, you’ll see the following stages executed in your CircleCI Dashboard:

1. Detect the ARM64 Architecture
CircleCI confirms the job is executing on your Arm64 self-hosted runner. This validates that the pipeline is correctly targeting your Google Cloud C4A (Axion) VM.

![CircleCI Dashboard alt-text#center](images/output1.png "Figure 1: Show architecture")
![CircleCI dashboard showing successful detection of ARM64 architecture. The main panel displays a terminal output with the message Detected architecture: aarch64 and a green checkmark indicating Running on ARM64 architecture. The interface includes navigation menus and job status indicators, conveying a positive and successful workflow execution environment. alt-text#center](images/output1.png "Show architecture")

2. Build the Docker image
## Build the Docker image
The runner builds the `arm64-node-demo` Docker image using the Dockerfile you defined.

![CircleCI Dashboard alt-text#center](images/output2.png "Figure 2: Docker Image")
![CircleCI dashboard displaying the Docker image build stage. The main panel shows terminal output with the command docker build -t arm64-node-demo and progress logs indicating successful build steps. The interface includes navigation menus, job status indicators, and a green checkmark signaling a successful build. The environment appears organized and professional, conveying a sense of accomplishment and progress in the workflow. alt-text#center](images/output2.png "Docker Image")

3. Runs a container from that Image
## Run a container from the image
Once the image is built, the job launches a container to host your Node.js web app.

![CircleCI Dashboard alt-text#center](images/output4.png "Figure 3: Container Run")
![CircleCI dashboard showing the container run stage. The main panel displays terminal output with the command docker run -d -p 3000:3000 arm64-node-demo and status messages confirming the container is running. The interface includes navigation menus, job status indicators, and a green checkmark indicating successful execution. The environment appears organized and professional, conveying a sense of progress and accomplishment. alt-text#center](images/output4.png "Container Run")

4. Test the application by hitting the endpoint.
## Test the application by hitting the end point
The workflow tests the running app by sending an HTTP request to http://localhost:3000.
![CircleCI Dashboard alt-text#center](images/output3.png "Figure 3: Verify App")
If the app responds successfully, the test confirms that the Node.js web server is running correctly inside the container.
![CircleCI dashboard displaying the application endpoint test stage. The main panel shows terminal output with the command curl http://localhost:3000 and the response Hello from ARM64 Node.js app followed by a rocket emoji. The interface includes navigation menus, job status indicators, and a green checkmark indicating successful execution. The environment feels positive and organized, highlighting a successful application test within the workflow. alt-text#center](images/output3.png "Verify App")

If the app responds with the expected message, you know your Node.js web server is running correctly inside the container.

You should now see your CircleCI job running and the app deployed in the CircleCI Dashboard. This confirms your end-to-end CI/CD pipeline is working on SUSE Arm64 using a Google Cloud C4A (Axion) VM as a self-hosted runner.

## What you've accomplished and what's next

You have built, tested, and deployed a Node.js app using CircleCI on Arm64 in the cloud. This demonstrates a complete CI/CD workflow for cloud-native development on Arm platforms.

To investigate this area further, you can now:

If successful, you will see your CircleCI job running and the app deployed in the CircleCI Dashboard.
- Explore more advanced CircleCI features, such as parallel jobs, caching, and deployment workflows, to optimize your pipelines for Arm64
- Integrate automated testing frameworks to expand your test coverage and improve code quality
- Try deploying your containerized application to a managed Kubernetes service on Arm, such as Google Kubernetes Engine (GKE) with Arm nodes
- Review additional Learning Paths on Arm cloud development, containerization, and CI/CD best practices

This demonstrates an end-to-end cloud-native CI/CD workflow running natively on SUSE Arm64 with Google Cloud C4A (Axion) as a self-hosted runner on CircleCI.
You are ready to build scalable, cloud-native applications targeting Arm platforms using modern CI/CD workflows.
Loading
Loading