diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/_index.md b/content/learning-paths/servers-and-cloud-computing/jenkins/_index.md new file mode 100644 index 0000000000..fe97d4afc3 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/_index.md @@ -0,0 +1,64 @@ +--- +title: Deploy Jenkins on Arm64 Cloud Platforms (Azure & GCP) + +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. + +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 + - 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 + +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/). + +author: Pareena Verma + +##### Tags +skilllevels: Advanced +subjects: CI-CD + +armips: + - Neoverse + +tools_software_languages: + - Jenkins + - OpenJDK 17 + - Docker + - Groovy (Jenkins Pipeline) + +operatingsystems: + - Linux + +further_reading: + - resource: + title: Jenkins Official Documentation + link: https://www.jenkins.io/doc/ + type: documentation + - resource: + title: Jenkins Pipeline Syntax + link: https://www.jenkins.io/doc/book/pipeline/syntax/ + type: documentation + - resource: + title: Jenkins on Azure + link: https://learn.microsoft.com/en-us/azure/developer/jenkins/ + type: documentation + - resource: + title: Jenkins on Google Cloud + link: https://cloud.google.com/jenkins + type: documentation + +# ================================================================================ +# FIXED, DO NOT MODIFY +# ================================================================================ +weight: 1 +layout: "learningpathall" +learning_path_main_page: "yes" +--- diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/_next-steps.md b/content/learning-paths/servers-and-cloud-computing/jenkins/_next-steps.md new file mode 100644 index 0000000000..c3db0de5a2 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/_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/jenkins/azure-installation.md b/content/learning-paths/servers-and-cloud-computing/jenkins/azure-installation.md new file mode 100644 index 0000000000..9df0fe3c8c --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/azure-installation.md @@ -0,0 +1,113 @@ +--- +title: Install Jenkins on Azure Ubuntu Arm64 VM +weight: 5 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + + +## 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: + +* Installed and running as a system service +* Accessible on **port 8080** +* Verified on **Arm64 (aarch64)** with **Java 17** + +### System Preparation +Updates the OS and installs basic tools required 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 (Required) +Install the supported Java runtime required for running Jenkins LTS reliably. +Jenkins LTS officially supports **Java 17**. + +```console +sudo apt install -y openjdk-17-jdk +``` + +### Verify Java Installation +Confirms that Java 17 is installed correctly and available in the system PATH. + +```console +java -version +``` + +You should see an output 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. + +```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. + +```console +echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ +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. + +```console +sudo apt update +sudo apt install -y jenkins +``` + +This installs the **latest Jenkins LTS available** at install time. + +### Start and Enable Jenkins Service +Starts Jenkins immediately and enables 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. + +```console +sudo systemctl status jenkins +``` + +You should see an output similar to: +```output +Active: active (running) +``` + +### Verify Jenkins Version +Validates the installed Jenkins LTS version to ensure correct deployment on Arm64. + +```console +jenkins --version +``` + +You should see an output 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. 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 new file mode 100644 index 0000000000..4077c4a57d --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/azure-instance.md @@ -0,0 +1,50 @@ +--- +title: Create an Arm based cloud virtual machine using Microsoft Cobalt 100 CPU +weight: 3 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Introduction + +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. + +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 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 + +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. + +![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. + +![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: + +![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. + +![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. + +![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). + +{{% /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 new file mode 100644 index 0000000000..ecb479b525 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/azure_firewall.md @@ -0,0 +1,40 @@ +--- +title: Create a Firewall Rule on Azure +weight: 4 + + +### FIXED, DO NOT MODIFY +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. + +{{% 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/). +{{% /notice %}} + + +### 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**. + +![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. + +![Create a firewall rule alt-text#center](images/networking.png "Network settings") + +Now, navigate to **Create port rule**, 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. + +![Create a firewall rule alt-text#center](images/inbound_rule.png "Network settings") + +The network firewall rule has now been 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 new file mode 100644 index 0000000000..c5d0278135 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/background.md @@ -0,0 +1,26 @@ +--- +title: Technology Stack Overview + +weight: 2 + +layout: "learningpathall" +--- + +## Cobalt 100 Arm-based 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. + +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). + +## Google Axion C4A Arm instances in Google Cloud + +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 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. + +## 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/). diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/baseline.md b/content/learning-paths/servers-and-cloud-computing/jenkins/baseline.md new file mode 100644 index 0000000000..90714138fc --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/baseline.md @@ -0,0 +1,204 @@ +--- +title: Jenkins Baseline Testing +weight: 6 + +### 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**. + +### Network Verification +This section verifies that Jenkins is reachable over the network and properly exposed on the expected port. + +Ensure Jenkins is listening on port **8080** and that the port is allowed at both the Azure and VM levels. + +#### Verify Jenkins is listening on port 8080 +Confirm that the Jenkins service is actively listening on port 8080 on the VM. + +```console +ss -lntp | grep 8080 +``` + +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. + +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. + +```console +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. + +```console +id jenkins +ls -ld /var/lib/jenkins +``` + +You should see an output 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. + +```console +ps -ef | grep jenkins +``` + +You should see an output 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. + +```console +uname -m +``` + +You should see an output similar to: +```text +aarch64 +``` + +### Access Jenkins UI +This step confirms browser-based access to the Jenkins web interface. + +**Open Jenkins in a local browser:** + +```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 UI alt-text#center](images/jenkins-plugins.png "Figure 2: New Item") + +3. Create an admin user + +![ Jenkins UI alt-text#center](images/jenkins-admin.png "Figure 3: Install Plugins") + +4. Finish setup and reach the Jenkins dashboard + +### Execute First Jenkins Pipeline +This section confirms Jenkins can run jobs successfully on Arm. + +#### Step 1: Open Jenkins Dashboard +Navigate to the Jenkins dashboard and authenticate using the configured credentials. + +```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. + +1. Click **New Item** (left sidebar) + +2. Enter item name: + +```text +armbaseline-pipeline +``` + +3. Select **Pipeline** + +4. Click **OK** + +![ Jenkins UI alt-text#center](images/jenkins-item.png "Figure 5: New Item") + +#### Step 3: Add the Pipeline Script +Configure a simple pipeline to validate ARM architecture and Java availability. + +Scroll to the **Pipeline** section. + +* **Definition**: Pipeline script + +Paste the following script: + +```groovy +pipeline { + agent any + + stages { + stage('ARM Validation') { + steps { + sh 'echo "Architecture:"' + sh 'uname -m' + + sh 'echo "Java Version:"' + sh 'java -version' + } + } + } +} +``` + +Click **Save**. + +![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. + +1. On the job page, click **Build Now** + +2. A build number will appear under **Build History** + +![ 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. + +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 ") + +### Baseline Validation Result + +Successful execution confirms: + +* Jenkins LTS is running correctly +* Java 17 is properly configured +* Jenkins jobs execute natively on ARM64 + +### Baseline Summary + +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. diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installtion.md b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installtion.md new file mode 100644 index 0000000000..423f8755cc --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-installtion.md @@ -0,0 +1,95 @@ +--- +title: Install Jenkins GCP SUSE Arm64 VM +weight: 9 + +### 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. + +### System Preparation +Update the system and install required utilities. + +```console +sudo zypper refresh +sudo zypper update -y +sudo zypper install -y curl wget ca-certificates gnupg +``` + +### Install Java 17 (Required) +Jenkins LTS officially requires Java 17. + +```console +sudo zypper install -y java-17-openjdk java-17-openjdk-devel +``` + +Verify Java installation: + +```console +java -version +``` + +You should see an output 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) +Import the Jenkins repository signing key: + +```console +sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io-2023.key +``` + +Add the Jenkins stable repository: + +```console +sudo zypper addrepo https://pkg.jenkins.io/redhat-stable/ jenkins +sudo zypper refresh +``` + +### Install Jenkins (Latest Stable LTS) + +```console +sudo zypper install -y jenkins +``` + +This installs the **latest Jenkins LTS** available at install time. + +### Start and Enable Jenkins Service +Enable Jenkins to start automatically on boot and start the service. + +```console +sudo systemctl enable jenkins +sudo systemctl start jenkins +``` + +Verify service status: + +```console +sudo systemctl status jenkins +``` + +You should see an output 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 + +```console +jenkins --version +``` + +You should see an output 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. 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 new file mode 100644 index 0000000000..707f125187 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp-instance.md @@ -0,0 +1,32 @@ +--- +title: Create a Google Axion C4A Arm virtual machine on GCP +weight: 8 + +### 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. + +{{% 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/). +{{% /notice %}} + +## Provision a Google Axion C4A Arm VM in Google Cloud Console + +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**. +- Under **Machine configuration**: + - Populate fields such as **Instance name**, **Region**, and **Zone**. + - Set **Series** to `C4A`. + - Select `c4a-standard-4` for machine type. + + ![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") + +- 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. 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 new file mode 100644 index 0000000000..beaf2ad41e --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/gcp_firewall.md @@ -0,0 +1,40 @@ +--- +title: Create a Firewall Rule on GCP +weight: 7 + +### 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. + +{{% 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/). +{{% /notice %}} + +## Create a Firewall Rule in GCP + +To expose the TCP port 8080, create a firewall rule. + +Navigate to the [Google Cloud Console](https://console.cloud.google.com/), go to **VPC Network > Firewall**, and select **Create firewall rule**. + +![Create a firewall rule alt-text#center](images/firewall-rule1.png "Create a firewall rule") + +Next, create the firewall rule that exposes the TCP port 8080. +Set the **Name** of the new rule to "allow-tcp-8080". Select your network that you intend to bind to your VM (default is "autoscaling-net", but your organization might have others). + +Set **Direction of traffic** to "Ingress". Set **Allow on match** to "Allow" and **Targets** to "Specified target tags". + +![Create a firewall rule alt-text#center](images/network-rule2.png "Creating the TCP/8080 firewall rule") + +Next, enter "allow-tcp-8080" in the **Target tags** text field. Set **Source IPv4 ranges** to "0.0.0.0/0". + +![Create a firewall rule alt-text#center](images/network-rule3.png "Creating the TCP/8080 firewall rule") + +Finally, select **Specified protocols and ports** under the **Protocols and ports** section. Select the **TCP** checkbox, enter "8080" in the **Ports** text field, and select **Create**. + +![Specifying the TCP port to expose alt-text#center](images/network-port.png "Specifying the TCP port to expose") + +The network firewall rule is now created, and you can continue with the VM creation. diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-build.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-build.png new file mode 100644 index 0000000000..343ab971a6 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-build.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-output.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-output.png new file mode 100644 index 0000000000..6555869216 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-output.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-pipeline.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-pipeline.png new file mode 100644 index 0000000000..9d7fe54f06 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/docker-pipeline.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/final-vm.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/final-vm.png new file mode 100644 index 0000000000..5207abfb41 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/final-vm.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/firewall-rule1.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/firewall-rule1.png new file mode 100644 index 0000000000..e1ab8aecb5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/firewall-rule1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-vm.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-vm.png new file mode 100644 index 0000000000..0d1072e20d Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/gcp-vm.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-build.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-build.png new file mode 100644 index 0000000000..d0456030b1 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-build.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-output.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-output.png new file mode 100644 index 0000000000..13c337ab8d Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-output.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-pipeline.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-pipeline.png new file mode 100644 index 0000000000..53ab8b2f8f Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/go-pipeline.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/inbound_rule.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/inbound_rule.png new file mode 100644 index 0000000000..948d864e88 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/inbound_rule.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/initial-setup.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/initial-setup.png new file mode 100644 index 0000000000..1cc323eca4 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/initial-setup.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance.png new file mode 100644 index 0000000000..285cd764a5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance1.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance1.png new file mode 100644 index 0000000000..b9d22c352d Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance1.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance4.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance4.png new file mode 100644 index 0000000000..2a0ff1e3b0 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/instance4.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-admin.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-admin.png new file mode 100644 index 0000000000..3d40321025 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-admin.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-go.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-go.png new file mode 100644 index 0000000000..0c9efe2734 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-go.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-item.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-item.png new file mode 100644 index 0000000000..cf0484b1e7 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-item.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-job.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-job.png new file mode 100644 index 0000000000..4a0c6e4d83 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-job.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-login-page.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-login-page.png new file mode 100644 index 0000000000..c51fffa504 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-login-page.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-output.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-output.png new file mode 100644 index 0000000000..da63cf4b24 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-output.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-pipeline.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-pipeline.png new file mode 100644 index 0000000000..9154aebc8a Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-pipeline.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-plugins.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-plugins.png new file mode 100644 index 0000000000..1179865b27 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/jenkins-plugins.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-port.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-port.png new file mode 100644 index 0000000000..4c9180b44a Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-port.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-rule2.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-rule2.png new file mode 100644 index 0000000000..4901590c80 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-rule2.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-rule3.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-rule3.png new file mode 100644 index 0000000000..4f1f75cd84 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/network-rule3.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/networking.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/networking.png new file mode 100644 index 0000000000..9d6d15f8a3 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/networking.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/new-item.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/new-item.png new file mode 100644 index 0000000000..b63a8af6e5 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/new-item.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/port_rule.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/port_rule.png new file mode 100644 index 0000000000..681dc71aa1 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/port_rule.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/ubuntu-pro.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/ubuntu-pro.png new file mode 100644 index 0000000000..d54bd75ca6 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/ubuntu-pro.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/jenkins/images/virtual_machine.png b/content/learning-paths/servers-and-cloud-computing/jenkins/images/virtual_machine.png new file mode 100644 index 0000000000..cf6704fcc6 Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/jenkins/images/virtual_machine.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 new file mode 100644 index 0000000000..e4783f04aa --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/use_case1_gcp.md @@ -0,0 +1,214 @@ +--- +title: Jenkins Use Case 1 – Arm-Native Go CI Pipeline on Jenkins (GCP SUSE Arm64) +weight: 10 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + + +## 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**. + +### Network Verification +Ensure Jenkins is listening on port **8080** and accessible. + +```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 UI alt-text#center](images/jenkins-plugins.png "Figure 2: New Item") + +3. Create an admin user + +![ Jenkins UI alt-text#center](images/jenkins-admin.png "Figure 3: Install Plugins") + +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. + +```console +sudo zypper install -y go +``` + +Verify Go installation: + +```console +go version +``` + +You should see an output similar to: +```output +go version go1.x.x linux/Arm64 +``` + +#### Create a Sample Go Application +Create a small Go program to use in the Jenkins pipeline. + +```console +mkdir -p ~/go-demo +cd ~/go-demo +``` + +Create `main.go`: + +```console +cat < main.go +package main + +import "fmt" + +func main() { + fmt.Println("Hello from Go on Arm64 via Jenkins") +} +EOF +``` + +**Initialize the Go module:** + +```console +go mod init go-demo +``` + +Test the application locally to ensure it works: + +```console +go run main.go +``` + +### Create Jenkins Pipeline Job +This section creates a Jenkins pipeline to build and run the Go application automatically. + +#### Step 1: Create New Job +Create a new Jenkins pipeline job. + +* Open 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") + +#### Step 2: Configure Pipeline Script +Define the steps Jenkins will execute during the build. + +In the **Pipeline** section: + +* Set **Definition** to **Pipeline script** + +* Paste the following script: + +```groovy +pipeline { + agent any + + stages { + stage('Environment Check') { + steps { + sh 'uname -m' + sh 'go version' + } + } + + stage('Build Go App') { + steps { + sh ''' + cd $WORKSPACE + cp -r /home/gcpuser/go-demo . + cd go-demo + go build -o app + ''' + } + } + + stage('Run Binary') { + steps { + sh ''' + cd $WORKSPACE/go-demo + ./app + ''' + } + } + } +} +``` + +Click **Save**. + +![ Jenkins UI alt-text#center](images/go-pipeline.png "Figure 5: Create Job") + +#### Step 3: Run the Pipeline +Trigger the pipeline to verify execution. + +* On the job page, click **Build Now** + +* Click the build number + +![ Jenkins UI alt-text#center](images/go-build.png "Figure 6: Run Job") + +#### Step 4: View Console Output +Review the console logs to confirm that 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 ") + + +### Validation Criteria + +This use case confirms: + +* Jenkins jobs execute successfully on Arm64 +* Go toolchain runs natively on aarch64 +* Jenkins workspace and filesystem handling are correct +* 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. 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 new file mode 100644 index 0000000000..5d4879fdcc --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/jenkins/use_case2-gcp.md @@ -0,0 +1,208 @@ +--- +title: Jenkins Use Case 2 – 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. + +### Prerequisites +Before starting, ensure the following components are already available and working: + +* Jenkins is installed and running on a GCP SUSE Arm64 VM + +* Jenkins web UI is accessible + +* Docker installed on the VM + +* 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. + +```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. + +```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. + +**Add Jenkins user to Docker group:** + +```console +sudo usermod -aG docker jenkins +``` + +### Restart services +Restarting services ensures 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. + +```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 + +```console +sudo -u jenkins bash +``` + +### 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 +``` + +`docker-Arm-ci` must match your Jenkins job name. + +### Create Docker demo directory +This directory will hold the Dockerfile used in the pipeline. + +```console +mkdir docker-demo +cd docker-demo +``` + +### Create Arm64 Dockerfile +This Dockerfile uses an Arm64-native base image and prints a message when the container runs. + +```bash +cat < Dockerfile +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 + +### Exit Jenkins shell +Return to your normal user account after preparing the workspace. + +```console +exit +``` + +### Create Jenkins Pipeline Job +This section configures Jenkins to build and run the Docker container automatically. + +#### Step 1: Open Jenkins UI + +```console +http://:8080 +``` + +#### Step 2: Create a new Pipeline job +Create a Jenkins job that defines the Docker-based CI workflow. + +* Open Jenkins UI + +* Click **New Item** + +* Job name: `docker-Arm-ci` + +* Select **Pipeline** + +* Click **OK** + +![ Jenkins UI alt-text#center](images/new-item.png "Figure 1: Create Item") + +#### Step 3: Jenkins Pipeline Script (Docker Arm Validation) +This pipeline checks the system architecture, builds an Arm64 Docker image, and runs the container. + +* Scroll to the **Pipeline** section and select: + +* **Definition:** Pipeline script + +Paste the following into the Pipeline script section: + +```groovy +pipeline { + agent any + + stages { + stage('Environment Check') { + Steps { + sh 'uname -m' + sh 'docker version' + } + } + + stage('Build Docker Image') { + Steps { + sh ''' + cd docker-demo + docker build -t Arm64-docker-test . + ''' + } + } + + stage('Run Docker Container') { + Steps { + sh ''' + docker run --rm Arm64-docker-test + ''' + } + } + } +} +``` + +Click **Save**. + +![ 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. + +* On the job page, click **Build Now** + +* Click the build number + +![ Jenkins UI alt-text#center](images/docker-build.png "Figure 3: Execute Job") + +#### Step 4: View console output +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") + +### 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.