diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/_index.md b/content/learning-paths/servers-and-cloud-computing/jenkins/_index.md index 6cf64c05e1..905b1018eb 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/_index.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/_index.md @@ -1,5 +1,5 @@ --- -title: Deploy Jenkins on Arm64 Cloud Platforms (Azure & GCP) +title: Deploy Jenkins on Arm cloud platforms draft: true cascade: @@ -7,21 +7,21 @@ cascade: minutes_to_complete: 30 -who_is_this_for: This learning path is intended for software developers deploying and optimizing Jenkins workloads on Linux/Arm64 environments, specifically on Microsoft Azure Cobalt 100 Arm processors and Google Cloud C4A virtual machines powered by Axion processors. +who_is_this_for: This Learning Path is for software developers deploying and optimizing Jenkins workloads on Arm Linux environments, specifically on Microsoft Azure Cobalt 100 processors and Google Cloud C4A virtual machines powered by Axion processors. learning_objectives: - - Provision an Azure Arm64 virtual machine using the Azure console, with Ubuntu Pro 24.04 LTS as the base image - - Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors) - - Install the latest stable Jenkins LTS with OpenJDK 17 on an Arm64 VM + - Provision an Azure Arm64 virtual machine using the Azure console with Ubuntu Pro 24.04 LTS + - Provision an Arm-based SUSE Linux virtual machine on Google Cloud (C4A with Axion processors) + - Install Jenkins LTS with OpenJDK 17 on an Arm64 virtual machine - Validate Jenkins installation through service checks, UI access, and Arm-native pipeline execution - Execute Arm-native Jenkins pipelines to verify correct runtime behavior - - Implement real-world CI use cases on Arm64, including Docker-based pipelines + - Implement CI use cases on Arm64, including Docker-based pipelines prerequisites: - - A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100 based instances (Dpsv6). - - A [Google Cloud Platform](https://cloud.google.com/) account with access to Arm-based VM instances. - - Basic understanding of Linux command line. - - Familiarity with CI/CD concepts and [Jenkins fundamentals](https://www.jenkins.io/doc/book/pipeline/). + - A [Microsoft Azure](https://azure.microsoft.com/) account with access to Cobalt 100-based instances (Dpsv6) + - A [Google Cloud Platform](https://cloud.google.com/) account with access to Arm-based virtual machine instances + - Basic understanding of Linux command line + - Familiarity with CI/CD concepts and [Jenkins fundamentals](https://www.jenkins.io/doc/book/pipeline/) author: Pareena Verma diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/azure-installation.md b/content/learning-paths/servers-and-cloud-computing/jenkins/azure-installation.md index 9df0fe3c8c..b5db716742 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/azure-installation.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/azure-installation.md @@ -1,65 +1,59 @@ --- -title: Install Jenkins on Azure Ubuntu Arm64 VM +title: Install Jenkins on Azure Ubuntu Arm64 virtual machine weight: 5 ### FIXED, DO NOT MODIFY layout: learningpathall --- +To install Jenkins on an Azure Ubuntu 24.04 LTS Arm64 virtual machine, follow these steps. -## Install Jenkins on Azure Cobalt 100 -This guide explains how to install **Jenkins** on an **Azure Ubuntu 24.04 LTS Arm64 VM**. - -At the end of this guide, Jenkins will be: +At the end of the installation, Jenkins is: * Installed and running as a system service -* Accessible on **port 8080** -* Verified on **Arm64 (aarch64)** with **Java 17** +* Accessible on port 8080 +* Verified on Arm64 (aarch64) with Java 17 + +## Update the system and install basic tools -### System Preparation -Updates the OS and installs basic tools required to securely download and manage Jenkins packages. +Update the OS and install basic tools to securely download and manage Jenkins packages. ```console sudo apt update && sudo apt upgrade -y sudo apt install -y curl wget gnupg ca-certificates ``` -These tools are required to securely download Jenkins packages. +## Install Java 17 -### Install Java 17 (Required) -Install the supported Java runtime required for running Jenkins LTS reliably. -Jenkins LTS officially supports **Java 17**. +Jenkins LTS officially supports Java 17. Install the Java runtime: ```console sudo apt install -y openjdk-17-jdk ``` -### Verify Java Installation -Confirms that Java 17 is installed correctly and available in the system PATH. +Verify Java installation: ```console java -version ``` -You should see an output similar to: +The output is similar to: ```output openjdk version "17.0.17" 2025-10-21 OpenJDK Runtime Environment (build 17.0.17+10-Ubuntu-124.04) OpenJDK 64-Bit Server VM (build 17.0.17+10-Ubuntu-124.04, mixed mode, sharing) ``` -### Add Jenkins Official Repository (Stable LTS) -Add the official Jenkins signing key to ensure package authenticity and security. +## Add the Jenkins repository + +Add the official Jenkins signing key to ensure package authenticity: ```console curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | \ sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null ``` -This key ensures Jenkins packages are trusted. - -### Add Jenkins Stable Repository -Configure the system to download Jenkins LTS packages from the official Jenkins repository. +Add the Jenkins stable repository: ```console echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ @@ -67,47 +61,46 @@ https://pkg.jenkins.io/debian-stable binary/ | \ sudo tee /etc/apt/sources.list.d/jenkins.list ``` -### Install Jenkins (Latest Stable LTS) -Install the latest stable Jenkins Long-Term Support release on the Arm64 VM. +## Install Jenkins + +Install the latest stable Jenkins LTS release: ```console sudo apt update sudo apt install -y jenkins ``` -This installs the **latest Jenkins LTS available** at install time. +## Start and enable the Jenkins service -### Start and Enable Jenkins Service -Starts Jenkins immediately and enables it to launch automatically after system reboot. +Start Jenkins immediately and enable it to launch automatically after system reboot: ```console sudo systemctl enable jenkins sudo systemctl start jenkins ``` -### Verify Service Status -Confirms that the Jenkins service is running successfully without errors. +Verify the service is running: ```console sudo systemctl status jenkins ``` -You should see an output similar to: +The output is similar to: ```output Active: active (running) ``` -### Verify Jenkins Version -Validates the installed Jenkins LTS version to ensure correct deployment on Arm64. +## Verify the Jenkins version + +Check the installed Jenkins version: ```console jenkins --version ``` -You should see an output similar to: +The output is similar to: ```output 2.528.3 ``` -This confirm the installed Jenkins LTS version. -This installation confirm Jenkins LTS is successfully deployed on an Azure Ubuntu Arm64 VM. +Jenkins LTS is now successfully deployed on your Azure Ubuntu Arm64 virtual machine. diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/azure-instance.md b/content/learning-paths/servers-and-cloud-computing/jenkins/azure-instance.md index 4077c4a57d..7121dc3585 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/azure-instance.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/azure-instance.md @@ -1,50 +1,49 @@ --- -title: Create an Arm based cloud virtual machine using Microsoft Cobalt 100 CPU +title: Create an Arm-based virtual machine using Microsoft Cobalt 100 weight: 3 ### FIXED, DO NOT MODIFY layout: learningpathall --- -## Introduction +You can create an Arm-based Cobalt 100 virtual machine using the Microsoft Azure console, the Azure CLI tool, or Infrastructure as Code (IaC). For this Learning Path, you use the Azure console to create a virtual machine with an Arm-based Cobalt 100 processor. -There are several ways to create an Arm-based Cobalt 100 virtual machine: the Microsoft Azure console, the Azure CLI tool, or using your choice of IaC (Infrastructure as Code). This guide will use the Azure console to create a virtual machine with Arm-based Cobalt 100 Processor. +You'll focus on the general-purpose virtual machine of the D series. For more details, see [Dpsv6 size series](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series) in the Microsoft Azure documentation. -This learning path focuses on the general-purpose virtual machine of the D series. Please read the guide on [Dpsv6 size series](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes/general-purpose/dpsv6-series) offered by Microsoft Azure. +If you haven't used Microsoft Azure before, see [Create a Linux virtual machine in the Azure portal](https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu). -If you have never used the Microsoft Cloud Platform before, please review the microsoft [guide to Create a Linux virtual machine in the Azure portal](https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu). +## Create an Arm-based Azure virtual machine -#### Create an Arm-based Azure Virtual Machine +To create an Azure virtual machine based on Cobalt 100, launch the Azure portal and navigate to **Virtual Machines**. -Creating a virtual machine based on Azure Cobalt 100 is no different from creating any other virtual machine in Azure. To create an Azure virtual machine, launch the Azure portal and navigate to "Virtual Machines". -1. Select "Create", and click on "Virtual Machine" from the drop-down list. -2. Inside the "Basic" tab, fill in the Instance details such as "Virtual machine name" and "Region". -3. Choose the image for your virtual machine (for example, Ubuntu Pro 24.04 LTS) and select “Arm64” as the VM architecture. -4. In the “Size” field, click on “See all sizes” and select the D-Series v6 family of virtual machines. Select “D4ps_v6” from the list. +1. Select **Create**, and click on **Virtual Machine** from the drop-down list. +2. In the **Basic** tab, fill in the instance details such as **Virtual machine name** and **Region**. +3. Choose the image for your virtual machine (for example, **Ubuntu 24.04 LTS**) and select **Arm64** as the VM architecture. +4. In the **Size** field, click on **See all sizes** and select the **D-Series v6** family of virtual machines. Select **D4ps_v6** from the list. ![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/instance.png "Figure 1: Select the D-Series v6 family of virtual machines") -5. Select "SSH public key" as an Authentication type. Azure will automatically generate an SSH key pair for you and allow you to store it for future use. It is a fast, simple, and secure way to connect to your virtual machine. -6. Fill in the Administrator username for your VM. -7. Select "Generate new key pair", and select "RSA SSH Format" as the SSH Key Type. RSA could offer better security with keys longer than 3072 bits. Give a Key pair name to your SSH key. -8. In the "Inbound port rules", select HTTP (80) and SSH (22) as the inbound ports. +5. Select **SSH public key** as an authentication type. Azure automatically generates an SSH key pair for you and allows you to store it for future use. +6. Fill in the administrator username for your virtual machine. +7. Select **Generate new key pair**, and select **RSA SSH Format** as the SSH key type. RSA offers better security with keys longer than 3072 bits. Give a key pair name to your SSH key. +8. In **Inbound port rules**, select **HTTP (80)** and **SSH (22)** as the inbound ports. ![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/instance1.png "Figure 2: Allow inbound port rules") -9. Click on the "Review + Create" tab and review the configuration for your virtual machine. It should look like the following: +9. Click on the **Review + Create** tab and review the configuration for your virtual machine. ![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/ubuntu-pro.png "Figure 3: Review and Create an Azure Cobalt 100 Arm64 VM") -10. Finally, when you are confident about your selection, click on the "Create" button, and click on the "Download Private key and Create Resources" button. +10. When you're confident about your selection, click on the **Create** button, and click on the **Download Private key and Create Resources** button. ![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/instance4.png "Figure 4: Download Private key and Create Resources") -11. Your virtual machine should be ready and running in no time. You can SSH into the virtual machine using the private key, along with the Public IP details. +11. Your virtual machine is ready and running in a few minutes. Press **Go to Resource** to view the new virtual machine details. You can SSH into the virtual machine using the private key and the public IP address. ![Azure portal VM creation — Azure Cobalt 100 Arm64 virtual machine (D4ps_v6) alt-text#center](images/final-vm.png "Figure 5: VM deployment confirmation in Azure portal") {{% notice Note %}} -To learn more about Arm-based virtual machine in Azure, refer to “Getting Started with Microsoft Azure” in [Get started with Arm-based cloud instances](/learning-paths/servers-and-cloud-computing/csp/azure). +For more information about Arm-based virtual machines in Azure, see [Get started with Arm-based cloud instances](/learning-paths/servers-and-cloud-computing/csp/azure). {{% /notice %}} diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/azure_firewall.md b/content/learning-paths/servers-and-cloud-computing/jenkins/azure_firewall.md index ecb479b525..2d064f4253 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/azure_firewall.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/azure_firewall.md @@ -1,5 +1,5 @@ --- -title: Create a Firewall Rule on Azure +title: Create a firewall rule on Azure weight: 4 @@ -7,34 +7,31 @@ weight: 4 layout: learningpathall --- -## Overview -In this section, you will create a firewall rule in the Microsoft Azure Console to allow inbound TCP traffic on port 8080. - -To allow external traffic on port **8080** for your application running on an Azure Virtual Machine, you must open the port in the **Network Security Group (NSG)** attached to the VM's network interface or subnet. +To allow external traffic on port 8080 for your application running on an Azure virtual machine, open the port in the Network Security Group (NSG) attached to the virtual machine's network interface or subnet. {{% notice Note %}} -For support on Azure setup, see the Learning Path [Getting started with Microsoft Azure Platform](/learning-paths/servers-and-cloud-computing/csp/azure/). +For more information about Azure setup, see [Getting started with Microsoft Azure Platform](/learning-paths/servers-and-cloud-computing/csp/azure/). {{% /notice %}} -### Create a Firewall Rule in Azure +## Create a firewall rule in Azure To expose the TCP port 8080, create a firewall rule. -Navigate to the [Azure Portal]([https://console.cloud.google.com/](https://portal.azure.com)), go to ****Virtual Machines**, and select **your VM**. +Navigate to the [Azure Portal](https://portal.azure.com), go to **Virtual Machines**, and select your virtual machine. ![Create a firewall rule alt-text#center](images/virtual_machine.png "Virtual Machines") -Next, in the left menu, click **Networking** and in the **Networking** select **Network settings** that is associated with the VM's network interface. +In the left menu, click **Networking** and in the **Networking** select **Network settings** that is associated with the virtual machine's network interface. ![Create a firewall rule alt-text#center](images/networking.png "Network settings") -Now, navigate to **Create port rule**, select **Inbound port rule**. +Navigate to **Create port rule**, and select **Inbound port rule**. ![Create a firewall rule alt-text#center](images/port_rule.png "Create rule") -Next, configure it using the following details. After filling in the details, click **Add** to save the rule. +Configure it using the following details. After filling in the details, click **Add** to save the rule. ![Create a firewall rule alt-text#center](images/inbound_rule.png "Network settings") -The network firewall rule has now been created +The network firewall rule is now created. diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/background.md b/content/learning-paths/servers-and-cloud-computing/jenkins/background.md index c5d0278135..8c91f00792 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/background.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/background.md @@ -1,16 +1,16 @@ --- -title: Technology Stack Overview +title: Technology stack overview weight: 2 layout: "learningpathall" --- -## Cobalt 100 Arm-based processor +## Cobalt 100 processor -Azure’s Cobalt 100 is built on Microsoft's first-generation, in-house Arm-based processor: the Cobalt 100. Designed entirely by Microsoft and based on Arm’s Neoverse N2 architecture, this 64-bit CPU delivers improved performance and energy efficiency across a broad spectrum of cloud-native, scale-out Linux workloads. These include web and application servers, data analytics, open-source databases, caching systems, and other related technologies. Running at 3.4 GHz, the Cobalt 100 processor allocates a dedicated physical core for each vCPU, ensuring consistent and predictable performance. +Azure's Cobalt 100 is built on Microsoft's first-generation, in-house Arm-based processor. Designed entirely by Microsoft and based on Arm's Neoverse N2 architecture, this 64-bit CPU delivers improved performance and energy efficiency across a broad spectrum of cloud-native, scale-out Linux workloads, including web and application servers, data analytics, open-source databases, caching systems, and related technologies. Running at 3.4 GHz, the Cobalt 100 processor allocates a dedicated physical core for each vCPU, ensuring consistent and predictable performance. -To learn more about Cobalt 100, refer to the blog [Announcing the preview of new Azure virtual machine based on the Azure Cobalt 100 processor](https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353). +For more information about Cobalt 100, see [Announcing the preview of new Azure virtual machines based on the Azure Cobalt 100 processor](https://techcommunity.microsoft.com/blog/azurecompute/announcing-the-preview-of-new-azure-vms-based-on-the-azure-cobalt-100-processor/4146353). ## Google Axion C4A Arm instances in Google Cloud @@ -18,9 +18,10 @@ Google Axion C4A is a family of Arm-based virtual machines built on Google’s c The C4A series offers a cost-effective alternative to x86 virtual machines, 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. +For more information about Google Axion, see [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu). ## Jenkins -Jenkins is an open-source automation server used to build, test, and deploy software through continuous integration and continuous delivery (CI/CD). It automates development workflows and integrates with a wide range of tools and platforms via its plugin ecosystem. -Learn more from the [Jenkins official website](https://www.jenkins.io/) and the [official documentation](https://www.jenkins.io/doc/). +Jenkins is an open-source automation server used to build, test, and deploy software through continuous integration and continuous delivery (CI/CD). It automates development workflows and integrates with a wide range of tools and platforms through its plugin ecosystem. + +For more information, see the [Jenkins official website](https://www.jenkins.io/) and the [official documentation](https://www.jenkins.io/doc/). diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/baseline.md b/content/learning-paths/servers-and-cloud-computing/jenkins/baseline.md index 90714138fc..bf503ee32f 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/baseline.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/baseline.md @@ -1,44 +1,31 @@ --- -title: Jenkins Baseline Testing -weight: 6 +title: Validate Jenkins installation +weight: 9 ### FIXED, DO NOT MODIFY layout: learningpathall --- -## Jenkins Baseline Validation on Azure Ubuntu Arm64 -This document validates a **working Jenkins LTS setup** on an **Azure Ubuntu 24.04 Arm64 VM** after installation is complete. -It focuses on **service health, network access, ARM verification, and a first pipeline run**. +After installation completes, validate the Jenkins LTS setup on the Azure Ubuntu 24.04 Arm64 virtual machine. You'll verify service health, network access, Arm architecture, and run a first pipeline. -### Network Verification -This section verifies that Jenkins is reachable over the network and properly exposed on the expected port. +## Verify network configuration -Ensure Jenkins is listening on port **8080** and that the port is allowed at both the Azure and VM levels. +Ensure Jenkins is listening on port 8080 and that the port is allowed at both the Azure and virtual machine levels. -#### Verify Jenkins is listening on port 8080 -Confirm that the Jenkins service is actively listening on port 8080 on the VM. +Confirm Jenkins is actively listening on port 8080: ```console ss -lntp | grep 8080 ``` -Expected output indicates Jenkins is listening: +The expected output indicates Jenkins is listening: ```output LISTEN 0 50 *:8080 *:* ``` -#### Azure Network Security Group (NSG) -Ensure inbound access to Jenkins is allowed at the Azure networking layer. +## Retrieve the initial admin password -Verify that an inbound NSG rule exists with the following configuration: - -* **Port**: 8080 -* **Protocol**: TCP -* **Action**: Allow -* **Source**: Internet (or your IP range) - -### Retrieve Initial Admin Password -This step retrieves the automatically generated Jenkins administrator password required for first-time login. +Retrieve the automatically generated Jenkins administrator password required for first-time login: ```console sudo cat /var/lib/jenkins/secrets/initialAdminPassword @@ -46,105 +33,105 @@ sudo cat /var/lib/jenkins/secrets/initialAdminPassword Copy and securely store this password for UI access. -### Verify Jenkins User and Home Directory -Validate that the Jenkins service user exists and that the Jenkins home directory is correctly configured. +## Verify Jenkins user and home directory + +Validate that the Jenkins service user exists and that the Jenkins home directory is correctly configured: ```console id jenkins ls -ld /var/lib/jenkins ``` -You should see an output similar to: +The output is similar to: ```output drwxr-xr-x 12 jenkins jenkins 4096 Dec 16 06:11 /var/lib/jenkins ``` -### Verify Jenkins Process -Confirm that the Jenkins process is running and managed by the system. +## Verify the Jenkins process + +Confirm that the Jenkins process is running: ```console ps -ef | grep jenkins ``` -You should see an output similar to: +The output is similar to: ```output jenkins 11986 1 9 06:04 ? 00:00:38 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080 azureus+ 15126 2233 0 06:11 pts/0 00:00:00 grep --color=auto jenkins ``` -### Verify ARM Architecture -Ensure the VM is running on Arm64 architecture. +## Verify Arm architecture + +Ensure the virtual machine is running on Arm64 architecture: ```console uname -m ``` -You should see an output similar to: +The output is similar to: ```text aarch64 ``` -### Access Jenkins UI -This step confirms browser-based access to the Jenkins web interface. +## Access the Jenkins UI -**Open Jenkins in a local browser:** +Open Jenkins in a local browser: ```text http://:8080 ``` -### Complete UI Setup -Complete the initial Jenkins setup using the web interface. +### Complete UI setup + +Complete the initial Jenkins setup using the web interface: + +1. Paste the initial admin password saved previously. -1. Paste the initial admin password +![ Jenkins UI alt-text#center](images/initial-setup.png "Figure 1: Initial Jenkins page") -![ Jenkins UI alt-text#center](images/initial-setup.png "Figure 1: Initial-Jenkins_page") +2. Select **Install suggested plugins**. -2. Select **Install suggested plugins** +![ Jenkins UI alt-text#center](images/jenkins-plugins.png "Figure 2: Install suggested plugins") -![ Jenkins UI alt-text#center](images/jenkins-plugins.png "Figure 2: New Item") +3. Create an admin user. -3. Create an admin user +![ Jenkins UI alt-text#center](images/jenkins-admin.png "Figure 3: Create admin user") -![ Jenkins UI alt-text#center](images/jenkins-admin.png "Figure 3: Install Plugins") +4. Finish setup and reach the Jenkins dashboard. -4. Finish setup and reach the Jenkins dashboard +## Execute a first Jenkins pipeline -### Execute First Jenkins Pipeline -This section confirms Jenkins can run jobs successfully on Arm. +Now that you've set up Jenkins, run a basic pipeline to validate that jobs can execute successfully on Arm. -#### Step 1: Open Jenkins Dashboard -Navigate to the Jenkins dashboard and authenticate using the configured credentials. +### Open the Jenkins dashboard (if not already open) + +Navigate to the Jenkins dashboard: ```text http://:8080 ``` -**Log in using your Jenkins credentials:** - -![ Jenkins UI alt-text#center](images/jenkins-login-page.png "Figure 4: Jenkins Login Page") - -#### Step 2: Create a New Pipeline Job -Create a basic pipeline job to validate execution capability. +Log in using your Jenkins credentials: -1. Click **New Item** (left sidebar) +![ Jenkins UI alt-text#center](images/jenkins-login-page.png "Figure 4: Jenkins login page") -2. Enter item name: +### Create a new pipeline job -```text -armbaseline-pipeline -``` +Create a basic pipeline job to validate execution capability: -3. Select **Pipeline** +1. Click **New Item** (left sidebar). +2. Enter item name: `armbaseline-pipeline`. +3. Select **Pipeline**. +4. Click **OK**. -4. Click **OK** +![ Jenkins UI alt-text#center](images/jenkins-item.png "Figure 5: Create new pipeline item") -![ Jenkins UI alt-text#center](images/jenkins-item.png "Figure 5: New Item") +### Add the pipeline script -#### Step 3: Add the Pipeline Script -Configure a simple pipeline to validate ARM architecture and Java availability. +Configure a simple pipeline to validate Arm architecture and Java availability. -Scroll to the **Pipeline** section. +Scroll to the **Pipeline** section: * **Definition**: Pipeline script @@ -155,7 +142,7 @@ pipeline { agent any stages { - stage('ARM Validation') { + stage('Arm Validation') { steps { sh 'echo "Architecture:"' sh 'uname -m' @@ -170,35 +157,32 @@ pipeline { Click **Save**. -![Jenkins UI alt-text#center](images/jenkins-pipeline.png "Figure 6: Create Pipeline ") +![Jenkins UI alt-text#center](images/jenkins-pipeline.png "Figure 6: Create pipeline") -#### Step 4: Run the Pipeline -Trigger the pipeline execution and observe build progress. +### Run the pipeline -1. On the job page, click **Build Now** +Trigger the pipeline execution: -2. A build number will appear under **Build History** +1. On the job page, click **Build Now**. +2. A build number appears under **Build History**. -![ Jenkins UI alt-text#center](images/jenkins-job.png "Figure 7: Run Pipeline") +![ Jenkins UI alt-text#center](images/jenkins-job.png "Figure 7: Run pipeline") -#### Step 5: View Console Output -Review the pipeline logs to confirm successful execution. +### View console output -1. Click the build number (for example, `#1`) +Review the pipeline logs to confirm successful execution: -2. Click **Console Output** +1. Click the build number (for example, `#1`). +2. Click **Console Output**. -![Jenkins UI alt-text#center](images/jenkins-output.png "Figure 8: Console Output ") +![Jenkins UI alt-text#center](images/jenkins-output.png "Figure 8: Console output") -### Baseline Validation Result +## What you've accomplished and what's next -Successful execution confirms: +You've successfully validated your Jenkins LTS setup on Azure Ubuntu Arm64 using Java 17. Successful pipeline execution confirms: * Jenkins LTS is running correctly * Java 17 is properly configured -* Jenkins jobs execute natively on ARM64 - -### Baseline Summary +* Jenkins jobs execute natively on Arm64 -This baseline validates a successful Jenkins LTS setup on Azure Ubuntu Arm64 using Java 17. Service health, UI accessibility, system verification, and ARM-native pipeline execution are confirmed. -The system is now ready for CI/CD workloads on Arm architecture. +Your system is now ready for CI/CD workloads on Arm architecture. In the next section, you'll explore more advanced CI use cases. diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installtion.md b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installation.md similarity index 56% rename from content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installtion.md rename to content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installation.md index 423f8755cc..08e70fc9f6 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installtion.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installation.md @@ -1,16 +1,16 @@ --- -title: Install Jenkins GCP SUSE Arm64 VM -weight: 9 +title: Install Jenkins on GCP SUSE Arm64 virtual machine +weight: 8 ### FIXED, DO NOT MODIFY layout: learningpathall --- -## Install Jenkins on GCP SUSE Arm64 -This section covers the installation of **Jenkins (Stable LTS)** on a **GCP SUSE Linux Enterprise Server (SLES) Arm64 VM**. The goal is to prepare a clean, Arm-native Jenkins environment that will be used later for CI/CD use cases. +To install Jenkins (Stable LTS) on a GCP SUSE Linux Enterprise Server (SLES) Arm64 virtual machine, follow these steps. -### System Preparation -Update the system and install required utilities. +## Update the system and install utilities + +Update the system and install required utilities: ```console sudo zypper refresh @@ -18,8 +18,9 @@ sudo zypper update -y sudo zypper install -y curl wget ca-certificates gnupg ``` -### Install Java 17 (Required) -Jenkins LTS officially requires Java 17. +## Install Java 17 + +Jenkins LTS officially requires Java 17. Install Java: ```console sudo zypper install -y java-17-openjdk java-17-openjdk-devel @@ -31,14 +32,15 @@ Verify Java installation: java -version ``` -You should see an output similar to: +The output is similar to: ```text openjdk version "17.0.13" 2024-10-15 OpenJDK Runtime Environment (build 17.0.13+11-suse-150400.3.48.2-aarch64) OpenJDK 64-Bit Server VM (build 17.0.13+11-suse-150400.3.48.2-aarch64, mixed mode, sharing) ``` -### Add Jenkins Official Repository (Stable LTS) +## Add the Jenkins repository + Import the Jenkins repository signing key: ```console @@ -52,16 +54,17 @@ sudo zypper addrepo https://pkg.jenkins.io/redhat-stable/ jenkins sudo zypper refresh ``` -### Install Jenkins (Latest Stable LTS) +## Install Jenkins + +Install the latest stable Jenkins LTS release: ```console sudo zypper install -y jenkins ``` -This installs the **latest Jenkins LTS** available at install time. +## Start and enable the Jenkins service -### Start and Enable Jenkins Service -Enable Jenkins to start automatically on boot and start the service. +Enable Jenkins to start automatically on boot and start the service: ```console sudo systemctl enable jenkins @@ -74,22 +77,24 @@ Verify service status: sudo systemctl status jenkins ``` -You should see an output similar to: +The output is similar to: ```output ● jenkins.service - Jenkins Continuous Integration Server Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled) Active: active (running) since Wed 2025-12-17 08:08:22 UTC; 1h 56min ago ``` -### Verify Jenkins Version +## Verify the Jenkins version + +Check the installed Jenkins version: ```console jenkins --version ``` -You should see an output similar to: +The output is similar to: ```output 2.528.3 ``` -This section completes the installation of Jenkins LTS on a GCP SUSE Arm64 VM using Java 17. Jenkins service health, version validation, network accessibility, and initial UI setup are verified. The system is now ready for Arm-native CI/CD use cases. +Jenkins LTS is now successfully installed on your GCP SUSE Arm64 virtual machine. diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-instance.md b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-instance.md index 707f125187..4a020a1405 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-instance.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-instance.md @@ -1,32 +1,44 @@ --- -title: Create a Google Axion C4A Arm virtual machine on GCP -weight: 8 +title: Create a Google Axion C4A virtual machine +weight: 7 ### FIXED, DO NOT MODIFY layout: learningpathall --- -## Overview - -In this section, you will learn how to provision a Google Axion C4A Arm virtual machine on Google Cloud Platform (GCP) using the `c4a-standard-4` (4 vCPUs, 16 GB memory) machine type in the Google Cloud Console. -We will then use this GCP VM to execute a few Jenkins use cases. +You now provision a Google Axion C4A virtual machine on Google Cloud Platform (GCP) using the `c4a-standard-4` machine type, which provides 4 vCPUs and 16 GB of memory. {{% notice Note %}} -For support on GCP setup, see the Learning Path [Getting started with Google Cloud Platform](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/google/). +For general guidance on setting up a Google Cloud account and project, see [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/). {{% /notice %}} -## Provision a Google Axion C4A Arm VM in Google Cloud Console +## Provision a Google Axion C4A virtual machine in the Google Cloud Console + +To create a virtual machine using the C4A instance type: -To create a virtual machine based on the C4A instance type: -- Navigate to the [Google Cloud Console](https://console.cloud.google.com/). -- Go to **Compute Engine > VM Instances** and select **Create Instance**. +- Open the [Google Cloud Console](https://console.cloud.google.com/). +- Go to **Compute Engine** > **VM instances**, and then select **Create instance**. - Under **Machine configuration**: - - Populate fields such as **Instance name**, **Region**, and **Zone**. - - Set **Series** to `C4A`. - - Select `c4a-standard-4` for machine type. + - Specify an **Instance name**, **Region**, and **Zone**. + - Set **Series** to **C4A**. + - Select **c4a-standard-4** as the machine type. + +![Google Cloud Console VM creation page with C4A machine series selected alt-text#center](images/gcp-vm.png "Creating a Google Axion C4A virtual machine in the Google Cloud Console") + +- Under **OS and storage**, select **Change**, and then choose an Arm64-based operating system image. + - For this Learning Path, select **SUSE Linux Enterprise Server**. + - For the license type, choose **Pay as you go**. + - Increase **Size (GB)** from **10** to **50** to allocate sufficient disk space. + - Select **Choose** to apply the changes. +- Under **Networking**, enable **Allow HTTP traffic** and **Allow HTTPS traffic**. Additionally, enter **"allow-tcp-8080"** as a networking tag. +- Select **Create** to launch the virtual machine. + +After the instance starts, click **SSH** next to the virtual machine in the instance list to open a browser-based terminal session. + +![Google Cloud Console VM instances list with SSH button highlighted alt-text#center](images/gcp-ssh.png "Connecting to a running C4A instance using SSH") + +A new browser window opens with a terminal connected to your virtual machine. - ![Create a Google Axion C4A Arm virtual machine in the Google Cloud Console with c4a-standard-4 selected alt-text#center](images/gcp-vm.png "Creating a Google Axion C4A Arm virtual machine in Google Cloud Console") +![Browser-based terminal window showing a command prompt on a SUSE Linux virtual machine alt-text#center](images/gcp-shell.png "Terminal session connected to the virtual machine") -- Under **OS and Storage**, select **Change**, then choose an Arm64-based OS image. For this Learning Path, use **SUSE Linux Enterprise Server**. Pick the preferred version for your Operating System. Ensure you select the **Arm image** variant. Click **Select**. -- Under **Networking**, enable **Allow HTTP traffic**. -- Click **Create** to launch the instance. +Next, install Jenkins on your virtual machine. \ No newline at end of file diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/gcp_firewall.md b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp_firewall.md index beaf2ad41e..649f6e7e83 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/gcp_firewall.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp_firewall.md @@ -1,20 +1,18 @@ --- -title: Create a Firewall Rule on GCP -weight: 7 +title: Create a firewall rule on GCP +weight: 6 ### FIXED, DO NOT MODIFY layout: learningpathall --- -## Overview - -In this section, you will create a firewall rule in the Google Cloud Console to allow inbound TCP traffic on port 8080. +To allow inbound TCP traffic on port 8080, create a firewall rule in the Google Cloud Console. {{% notice Note %}} -For support on GCP setup, see the Learning Path [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/). +For more information about GCP setup, see [Getting started with Google Cloud Platform](/learning-paths/servers-and-cloud-computing/csp/google/). {{% /notice %}} -## Create a Firewall Rule in GCP +## Create a firewall rule in GCP To expose the TCP port 8080, create a firewall rule. diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-shell.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-shell.png new file mode 100644 index 0000000000..7e2fc3d1b5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-shell.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-ssh.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-ssh.png new file mode 100644 index 0000000000..597ccd7fea Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-ssh.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/use_case1_gcp.md b/content/learning-paths/servers-and-cloud-computing/jenkins/use_case1_gcp.md index e4783f04aa..c80978a31f 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/use_case1_gcp.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/use_case1_gcp.md @@ -1,69 +1,27 @@ --- -title: Jenkins Use Case 1 – Arm-Native Go CI Pipeline on Jenkins (GCP SUSE Arm64) +title: Build an Arm-native Go CI pipeline on Jenkins (GCP SUSE Arm64) weight: 10 ### FIXED, DO NOT MODIFY layout: learningpathall --- +You can validate Arm-native CI execution on a GCP SUSE Arm64 virtual machine using Jenkins. Build and execute a simple Go application to confirm that Jenkins, Go, and the underlying system run natively on aarch64. -## Jenkins Use Case - Arm-Native Go CI Pipeline on Jenkins (GCP SUSE Arm64) -This use case demonstrates how to validate **Arm-native CI execution** on a **GCP SUSE Arm64 VM** using Jenkins. -A simple Go application is built and executed to confirm that Jenkins, Go, and the underlying system are running natively on **aarch64**. +## Prerequisites -### Network Verification -Ensure Jenkins is listening on port **8080** and accessible. +Before starting, ensure the following components are available: -```console -ss -lntp | grep 8080 -``` - -You should see an output similar to: -```output -LISTEN 0 50 *:8080 *:* -``` -Also, confirm that the VM firewall and GCP firewall rules allow inbound traffic on port **8080**. - -### Retrieve Initial Admin Password -Jenkins generates a one-time administrator password during the first startup. This step retrieves that password so you can log in to the UI. - -```console -sudo cat /var/lib/jenkins/secrets/initialAdminPassword -``` - -Copy and securely store this password for UI access. - -### Access Jenkins UI -This step verifies that the Jenkins web interface is accessible from your browser. - -Open Jenkins using the VM’s public IP address: - -```text -http://:8080 -``` - -### Complete UI Setup -Complete the initial Jenkins setup using the web interface. - -1. Paste the initial admin password - -![ Jenkins UI alt-text#center](images/initial-setup.png "Figure 1: Initial-Jenkins_page") - -2. Select **Install suggested plugins** +* Jenkins installed and running on a GCP SUSE Arm64 virtual machine +* Jenkins web UI accessible -![ Jenkins UI alt-text#center](images/jenkins-plugins.png "Figure 2: New Item") +## Prepare a Go application on the GCP SuSE Arm64 virtual machine -3. Create an admin user +Prepare a simple Go application that Jenkins will build and execute. -![ Jenkins UI alt-text#center](images/jenkins-admin.png "Figure 3: Install Plugins") +### Install Go -4. Finish setup and reach the Jenkins dashboard - -### Prepare Go Application on the VM -This section prepares a simple Go application that will be built and executed by Jenkins. - -#### Install Go -Install the Go programming language on the SUSE Arm64 VM. +Install the Go programming language: ```console sudo zypper install -y go @@ -75,13 +33,14 @@ Verify Go installation: go version ``` -You should see an output similar to: +The output is similar to: ```output -go version go1.x.x linux/Arm64 +go version go1.x.x linux/arm64 ``` -#### Create a Sample Go Application -Create a small Go program to use in the Jenkins pipeline. +### Create a sample Go application + +Create a small Go program: ```console mkdir -p ~/go-demo @@ -102,45 +61,50 @@ func main() { EOF ``` -**Initialize the Go module:** +Initialize the Go module: ```console go mod init go-demo ``` -Test the application locally to ensure it works: +Test the application locally: ```console go run main.go ``` -### Create Jenkins Pipeline Job -This section creates a Jenkins pipeline to build and run the Go application automatically. +The output is similar to: -#### Step 1: Create New Job -Create a new Jenkins pipeline job. +```output +Hello from Go on Arm64 via Jenkins +``` -* Open Jenkins UI +## Create a Jenkins pipeline job -* Click **New Item** +Create a Jenkins pipeline to build and run the Go application automatically. -* Job name: `go-Arm-ci` +### Create a new job +* Open the Jenkins UI +* Click **New Item** +* Job name: `go-arm-ci` * Select **Pipeline** - * Click **OK** -![ Jenkins UI alt-text#center](images/jenkins-go.png "Figure 4: Create Job") +![ Jenkins UI alt-text#center](images/jenkins-go.png "Figure 4: Create new job") -#### Step 2: Configure Pipeline Script -Define the steps Jenkins will execute during the build. +### Configure the pipeline script In the **Pipeline** section: * Set **Definition** to **Pipeline script** - * Paste the following script: +{{% notice Note %}} +Update "/home/gcpuser/go-demo" in the script to reflect the actual location of your go-demo directory. +{{% /notice %}} + + ```groovy pipeline { agent any @@ -178,37 +142,33 @@ pipeline { Click **Save**. -![ Jenkins UI alt-text#center](images/go-pipeline.png "Figure 5: Create Job") +![ Jenkins UI alt-text#center](images/go-pipeline.png "Figure 5: Configure pipeline script") -#### Step 3: Run the Pipeline -Trigger the pipeline to verify execution. +### Run the pipeline -* On the job page, click **Build Now** +Trigger the pipeline: +* On the job page, click **Build Now** * Click the build number -![ Jenkins UI alt-text#center](images/go-build.png "Figure 6: Run Job") +![ Jenkins UI alt-text#center](images/go-build.png "Figure 6: Run pipeline") -#### Step 4: View Console Output -Review the console logs to confirm that the Go application was built and executed successfully. +### View console output -* Click the build number (for example, `#1`) +Review the console logs to confirm the Go application was built and executed successfully: +* Click the build number (for example, `#1`) * Click **Console Output** -![Jenkins UI alt-text#center](images/jenkins-output.png "Figure 8: Console Output ") +![Jenkins UI alt-text#center](images/jenkins-output.png "Figure 7: Console output") +## What you've accomplished and what's next -### Validation Criteria - -This use case confirms: +You've successfully validated an Arm-native Jenkins CI pipeline by building and executing a Go application on your GCP SUSE Arm64 virtual machine. Successful execution confirms: * Jenkins jobs execute successfully on Arm64 * Go toolchain runs natively on aarch64 -* Jenkins workspace and filesystem handling are correct +* Jenkins workspace and filesystem handling work correctly * End-to-end CI execution works on GCP SUSE Arm64 -### Use Case Summary - -This use case validates an Arm-native Jenkins CI pipeline by building and executing a Go application on a GCP SUSE Arm64 VM. -It confirms correct Jenkins configuration, Go module handling, and native Arm execution suitable for cloud-native CI workloads. +Your Jenkins setup is now ready for cloud-native CI workloads on Arm architecture. diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/use_case2-gcp.md b/content/learning-paths/servers-and-cloud-computing/jenkins/use_case2-gcp.md index 5d4879fdcc..4a65115a14 100644 --- a/content/learning-paths/servers-and-cloud-computing/jenkins/use_case2-gcp.md +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/use_case2-gcp.md @@ -1,171 +1,176 @@ --- -title: Jenkins Use Case 2 – Docker-based CI Pipeline on Arm64 +title: Build a Docker-based CI pipeline on Arm64 weight: 11 ### FIXED, DO NOT MODIFY layout: learningpathall --- -## Jenkins Use Case – Docker-based CI Pipeline on Arm64 -This use case demonstrates how to use **Jenkins on a GCP SUSE Arm64 VM** to build and run a **Docker container natively on Arm64**. It validates Docker installation, Jenkins–Docker integration, and Arm-native container execution. +You can use Jenkins on a GCP SUSE Arm64 virtual machine to build and run a Docker container natively on Arm64. Validate Docker installation, Jenkins–Docker integration, and Arm-native container execution. -### Prerequisites -Before starting, ensure the following components are already available and working: +## Prerequisites -* Jenkins is installed and running on a GCP SUSE Arm64 VM - -* Jenkins web UI is accessible - -* Docker installed on the VM +Before starting, ensure the following components are available: +* Jenkins installed and running on a GCP SUSE Arm64 virtual machine +* Jenkins web UI accessible +* Docker installed on the virtual machine * Jenkins user added to Docker group -### Install Docker on SUSE Linux (Arm64) -This step installs Docker using the SUSE package manager so containers can be built and run on the VM. +## Install Docker on the GCP SuSE Arm64 virtual machine + +If not already installed, install Docker using the SUSE package manager: ```bash sudo zypper refresh sudo zypper install -y docker ``` -### Enable and start Docker service -Docker must be running as a background service to accept commands from Jenkins. +Enable and start the Docker service: ```console sudo systemctl enable docker sudo systemctl start docker ``` -### Allow Jenkins to Use Docker -By default, Jenkins does not have permission to access Docker. This step grants Docker access to the Jenkins user. +## Allow Jenkins to use Docker + +By default, Jenkins doesn't have permission to access Docker. Grant Docker access to the Jenkins user. -**Add Jenkins user to Docker group:** +Add the Jenkins user to the Docker group: ```console sudo usermod -aG docker jenkins ``` -### Restart services -Restarting services ensures the new permissions take effect. +## Restart services + +Restart services to ensure the new permissions take effect: ```console sudo systemctl restart docker sudo systemctl restart jenkins ``` -### Verify Docker access as Jenkins -This step confirms that Jenkins can successfully run Docker commands. +## Verify Docker access as Jenkins -```console -sudo -u jenkins docker version -``` - -### Prepare Jenkins Workspace -All demo files must be created inside the Jenkins workspace so the pipeline can access them during execution. - -### Switch to Jenkins user +Confirm that Jenkins can successfully run Docker commands: ```console -sudo -u jenkins bash +sudo -u jenkins docker version ``` -### Navigate to Jenkins job workspace -This directory matches the Jenkins job name and is where pipeline files are stored. - -```console -cd /var/lib/jenkins/workspace/docker-Arm-ci +The output is similar to: +```output +Client: + Version: 28.3.3-ce + API version: 1.51 + Go version: go1.24.5 + Git commit: bea959c7b + Built: Tue Jul 29 12:00:00 2025 + OS/Arch: linux/arm64 + Context: default + +Server: + Engine: + Version: 28.3.3-ce + API version: 1.51 (minimum version 1.24) + Go version: go1.24.5 + Git commit: bea959c7b + Built: Tue Jul 29 12:00:00 2025 + OS/Arch: linux/arm64 + Experimental: false + containerd: + Version: v1.7.27 + GitCommit: 05044ec0a9a75232cad458027ca83437aae3f4da + runc: + Version: 1.2.6 + GitCommit: v1.2.6-0-ge89a29929c77 + docker-init: + Version: 0.2.0_catatonit + GitCommit: ``` -`docker-Arm-ci` must match your Jenkins job name. +## Create a Docker demo directory -### Create Docker demo directory -This directory will hold the Dockerfile used in the pipeline. +Create a directory to hold the Dockerfile: ```console -mkdir docker-demo +mkdir ~/docker-demo cd docker-demo +pwd ``` -### Create Arm64 Dockerfile -This Dockerfile uses an Arm64-native base image and prints a message when the container runs. +## Create an Arm64 Dockerfile + +Create a Dockerfile that uses an Arm64-native base image: ```bash cat < Dockerfile -FROM Arm64v8/alpine:latest +FROM arm64v8/alpine:latest CMD ["echo", "Hello from Arm64 Docker container"] EOF ``` -**Dockerfile details:** - -- Uses an Arm64-native base image -- Prints a message when the container runs +## Create a Jenkins pipeline job -### Exit Jenkins shell -Return to your normal user account after preparing the workspace. +Configure Jenkins to build and run the Docker container automatically. -```console -exit -``` - -### Create Jenkins Pipeline Job -This section configures Jenkins to build and run the Docker container automatically. - -#### Step 1: Open Jenkins UI +### Open the Jenkins UI ```console http://:8080 ``` -#### Step 2: Create a new Pipeline job -Create a Jenkins job that defines the Docker-based CI workflow. +### Create a new pipeline job -* Open Jenkins UI - +* Open the Jenkins UI * Click **New Item** - -* Job name: `docker-Arm-ci` - +* Job name: `docker-arm-ci` * Select **Pipeline** - * Click **OK** -![ Jenkins UI alt-text#center](images/new-item.png "Figure 1: Create Item") +![ Jenkins UI alt-text#center](images/new-item.png "Figure 1: Create new item") -#### Step 3: Jenkins Pipeline Script (Docker Arm Validation) -This pipeline checks the system architecture, builds an Arm64 Docker image, and runs the container. +### Add the pipeline script -* Scroll to the **Pipeline** section and select: +Scroll to the **Pipeline** section: * **Definition:** Pipeline script Paste the following into the Pipeline script section: +{{% notice Note %}} +Update "/home/gcpuser/docker-demo" in the script to reflect the actual location of your docker-demo directory. +{{% /notice %}} + ```groovy pipeline { agent any stages { stage('Environment Check') { - Steps { + steps { sh 'uname -m' sh 'docker version' } } stage('Build Docker Image') { - Steps { + steps { sh ''' + cd $WORKSPACE + cp -r /home/gcpuser/docker-demo . cd docker-demo - docker build -t Arm64-docker-test . + docker build -t arm64-docker-test . ''' } } stage('Run Docker Container') { - Steps { + steps { sh ''' - docker run --rm Arm64-docker-test + docker run --rm arm64-docker-test ''' } } @@ -175,34 +180,34 @@ pipeline { Click **Save**. -![ Jenkins UI alt-text#center](images/docker-pipeline.png "Figure 2: Create Pipeline") +![ Jenkins UI alt-text#center](images/docker-pipeline.png "Figure 2: Create pipeline") -#### Step 4: Execute the Pipeline -Run the pipeline to verify Docker-based CI execution on Arm64. +### Execute the pipeline -* On the job page, click **Build Now** +Run the pipeline to verify Docker-based CI execution on Arm64: +* On the job page, click **Build Now** * Click the build number -![ Jenkins UI alt-text#center](images/docker-build.png "Figure 3: Execute Job") +![ Jenkins UI alt-text#center](images/docker-build.png "Figure 3: Execute pipeline") -#### Step 4: View console output -Review the logs to confirm that each pipeline stage completed successfully. +### View console output -* Click the build number (for example, `#1`) +Review the logs to confirm that each pipeline stage completed successfully: +* Click the build number (for example, `#1`) * Click **Console Output** -![ Jenkins UI alt-text#center](images/docker-output.png "Figure 3: Output") +![ Jenkins UI alt-text#center](images/docker-output.png "Figure 4: Console output") + +## What you've accomplished and what's next -### The output confirms +You've successfully validated Docker-based CI pipelines using Jenkins on your GCP SUSE Arm64 virtual machine. The output confirms: - Jenkins is running on Arm64 - Docker is Arm-native - Jenkins can build and run containers - End-to-end Docker CI works on Arm -### Use Case Summary - -This use case validates Docker-based CI pipelines using Jenkins on a GCP SUSE Arm64 VM. Docker installation, Jenkins–Docker integration, Arm-native image builds, and container execution are successfully verified. The system is now ready for Arm-native containerized CI/CD workloads. +Your system is now ready for Arm-native containerized CI/CD workloads.