diff --git a/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/_index.md b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/_index.md new file mode 100644 index 0000000000..b5fae72028 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/_index.md @@ -0,0 +1,54 @@ +--- +title: Deploy Puppet on Google Cloud C4A (Arm-based Axion VMs) + +minutes_to_complete: 30 + +who_is_this_for: This learning path is intended for software developers deploying and optimizing Puppet workloads on Linux/Arm64 environments, specifically using Google Cloud C4A virtual machines powered by Axion processors. + +learning_objectives: + - Provision an Arm-based SUSE SLES virtual machine on Google Cloud (C4A with Axion processors) + - Install Puppet on a SUSE Arm64 (C4A) instance + - Verify Puppet by applying a test manifest and confirming successful resource creation on Arm64 + - Benchmark Puppet by measuring catalog compile time, apply speed, and resource usage on Arm64 + +prerequisites: + - A [Google Cloud Platform (GCP)](https://cloud.google.com/free) account with billing enabled + - Basic familiarity with [Puppet](https://www.puppet.com/) + +author: Pareena Verma + +##### Tags +skilllevels: Introductory +subjects: Performance and Architecture +cloud_service_providers: Google Cloud + +armips: + - Neoverse + +tools_software_languages: + - Puppet + - Ruby + - Facter + - Hiera + +operatingsystems: + - Linux + +# ================================================================================ +# FIXED, DO NOT MODIFY +# ================================================================================ +further_reading: + - resource: + title: Google Cloud documentation + link: https://cloud.google.com/docs + type: documentation + + - resource: + title: Puppet documentation + link: https://www.puppet.com/docs/index.html + type: documentation + +weight: 1 +layout: "learningpathall" +learning_path_main_page: "yes" +--- diff --git a/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/_next-steps.md b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/_next-steps.md new file mode 100644 index 0000000000..c3db0de5a2 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/_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/puppet-on-gcp/background.md b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/background.md new file mode 100644 index 0000000000..a83fa26d68 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/background.md @@ -0,0 +1,27 @@ +--- +title: Getting started with Puppet on Google Axion C4A (Arm Neoverse-V2) + +weight: 2 + +layout: "learningpathall" +--- + +## 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 provides a cost-effective alternative to x86 virtual machines while leveraging the scalability and performance benefits of the Arm architecture in Google Cloud. + +To learn more about Google Axion, refer to the [Introducing Google Axion Processors, our new Arm-based CPUs](https://cloud.google.com/blog/products/compute/introducing-googles-new-arm-based-cpu) blog. + +## Puppet + +[Puppet](https://puppet.com/) is an **open-source configuration management and automation tool** designed to help system administrators and DevOps teams **manage infrastructure as code**. Developed by [Puppet Labs](https://puppet.com/company/), it automates the provisioning, configuration, and management of servers and services across large-scale environments. + +Puppet uses a **declarative language** to define system configurations, ensuring that every machine’s state matches the desired setup described in its manifests. It supports both **agent-based** and **agentless** architectures, making it flexible for diverse deployment needs. + +Known for its **scalability**, **reliability**, and **idempotent behavior**, Puppet continuously enforces configurations, reducing manual effort and configuration drift. It integrates well with major platforms like **Linux**, **Windows**, **macOS**, and cloud providers such as **AWS**, **Azure**, and **GCP**. + +Common use cases include **automating server configuration**, **applying security policies**, **software installation**, and **infrastructure auditing**. Puppet is widely used in enterprises for managing **hybrid and multi-cloud environments** efficiently. + +To learn more, visit the [official Puppet website](https://puppet.com/). diff --git a/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/baseline.md b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/baseline.md new file mode 100644 index 0000000000..d518d9906e --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/baseline.md @@ -0,0 +1,151 @@ +--- +title: Puppet Baseline Testing on Google Axion C4A Arm Virtual Machine +weight: 5 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Puppet Baseline Testing on GCP SUSE VMs +In this guide, you will perform baseline testing of Puppet on a GCP SUSE Arm64 VM to verify that the installation works correctly. You will check Puppet and Facter versions, run basic Puppet commands, apply a simple manifest, and confirm that system facts are collected accurately. + +### Verify Puppet Installation +Verify that Puppet and Facter are correctly installed and respond to version checks: + +```console +puppet --version +facter --version +ruby -v +``` +### Run a Simple Puppet Command +Check that Puppet responds to commands by running puppet help. If the help menu appears, Puppet is working correctly. + +```console +puppet help +``` + +Output: + +```console +Usage: puppet [options] [options] + +Available subcommands: + + Common: + agent The puppet agent daemon + apply Apply Puppet manifests locally + config Interact with Puppet's settings. + help Display Puppet help. + lookup Interactive Hiera lookup + module Creates, installs and searches for modules on the Puppet Forge. + resource The resource abstraction layer shell + + + Specialized: + catalog Compile, save, view, and convert catalogs. + describe Display help about resource types + device Manage remote network devices + doc Generate Puppet references + epp Interact directly with the EPP template parser/renderer. + facts Retrieve and store facts. + filebucket Store and retrieve files in a filebucket + generate Generates Puppet code from Ruby definitions. + node View and manage node definitions. + parser Interact directly with the parser. + plugin Interact with the Puppet plugin system. + script Run a puppet manifests as a script without compiling a catalog + ssl Manage SSL keys and certificates for puppet SSL clients + +See 'puppet help ' for help on a specific subcommand action. +See 'puppet help ' for help on a specific subcommand. +Puppet v8.10.0 +``` + +### Test a Simple Puppet Manifest +Create and run a basic Puppet script to make sure Puppet can apply configurations. If it successfully creates the test file, your Puppet agent functions as expected. + +```bash +cat < test.pp +file { '/tmp/puppet_test.txt': + ensure => file, + content => "Hello from Puppet on SUSE ARM64!\n", +} +EOF +``` +```console +puppet apply test.pp +``` + +You should see an output similar to: +```output +Notice: Compiled catalog for lpprojectsusearm64.c.imperial-time-463411-q5.internal in environment production in 0.01 seconds +Notice: Applied catalog in 0.01 seconds +``` + +**Then verify:** + +Open the file created by Puppet to confirm the content matches your script. This step validates that Puppet executed your manifest correctly. + +```console +cat /tmp/puppet_test.txt +``` + +Output: +```output +Hello from Puppet on SUSE ARM64! +``` + +### Check Facter Integration +Run `facter` commands to verify that it collects accurate system details like OS and CPU type. This ensures Puppet can gather the facts it needs for automation decisions. + +```console +facter os +facter architecture +facter processors +``` + +Output: +```output +{ + architecture => "aarch64", + distro => { + codename => "n/a", + description => "SUSE Linux Enterprise Server 15 SP6", + id => "SUSE", + release => { + full => "15.6", + major => "15", + minor => "6" + } + }, + family => "Suse", + hardware => "aarch64", + name => "SLES", + release => { + full => "15.6", + major => "15", + minor => "6" + }, + selinux => { + enabled => false + } +} +$ facter architecture +aarch64 +$facter processors +{ + cores => 4, + count => 4, + extensions => [ + "aarch64" + ], + isa => "aarch64", + models => [ + + ], + physicalcount => 1, + threads => 1 +} +``` + +With these checks complete, proceed to the Puppet benchmarking section to run workload‑focused tests on the GCP SUSE VMs. diff --git a/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/benchmarking.md b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/benchmarking.md new file mode 100644 index 0000000000..ce9dad7aa8 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/benchmarking.md @@ -0,0 +1,104 @@ +--- +title: Puppet Benchmarking +weight: 6 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + + +## Puppet Benchmark on GCP SUSE Arm64 VM + +This guide explains how to perform a **Puppet standalone benchmark** on a **Google Cloud Platform (GCP) SUSE Linux Arm64 VM**. +It measures Puppet’s local execution performance without requiring a Puppet Master. + + +### Prerequisites +Ensure that Puppet is installed and functioning correctly: + +```console +puppet --version +``` + +### Create a Benchmark Manifest +Create a directory and a simple manifest file: + +```console +mkdir -p ~/puppet-benchmark +cd ~/puppet-benchmark +vi benchmark.pp +``` + +Add the following content to the `benchmark.pp`: + +```puppet +notify { 'Benchmark Test': + message => 'Running Puppet standalone benchmark.', +} +``` + +- **notify** is a built-in Puppet resource type that displays a message during catalog application (like a print or log message). +- **'Benchmark Test'** is the title of the resource — a unique identifier for this notify action. +- **message => 'Running Puppet standalone benchmark.'** specifies the text message Puppet will print when applying the manifest. + +### Run the Benchmark Command +This step runs Puppet in standalone mode using the `apply` command to execute the benchmark manifest locally while measuring execution time and performance statistics. + +```console +time puppet apply benchmark.pp --verbose +``` +This executes the manifest locally and outputs timing statistics. + +You should see an output similar to: +```output +Notice: Compiled catalog for ########arm64.c.imperial-time-463411-q5.internal in environment production in 0.01 seconds +Info: Using environment 'production' +Info: Applying configuration version '1762160712' +Notice: Running Puppet standalone benchmark. +Notice: /Stage[main]/Main/Notify[Benchmark Test]/message: defined 'message' as 'Running Puppet standalone benchmark.' +Notice: Applied catalog in 0.01 seconds + +real 0m1.175s +user 0m0.779s +sys 0m0.385s +``` + +### Benchmark Metrics Explanation + +- **Compiled catalog** → Puppet compiled your manifest into an execution plan. +- **Applied catalog** → Puppet executed the plan on your system. +- **real** → Total elapsed wall time (includes CPU + I/O). +- **user** → CPU time spent in user-space. +- **sys** → CPU time spent in system calls. + +### Benchmark summary on x86_64 +To compare the benchmark results, the following results were collected by running the same benchmark on a `x86 - c4-standard-4` (4 vCPUs, 15 GB Memory) x86_64 VM in GCP, running SUSE: + +| Metric | Result | +|---------|---------| +| Compiled catalog | 0.01 seconds | +| Environment | production | +| Applied catalog | 0.01 seconds | +| real | 0m1.072s | +| user | 0m0.834s | +| sys | 0m0.213s | + +### Benchmark summary on Arm64 +Results from the earlier run on the `c4a-standard-4` (4 vCPU, 16 GB memory) Arm64 VM in GCP (SUSE): + +| **Metric / Log** | **Output** | +|-------------------|------------| +| Compiled catalog | 0.01 seconds | +| Environment | production | +| Applied catalog | 0.01 seconds | +| real | 0m1.175s | +| user | 0m0.779s | +| sys | 0m0.385s | + +### Puppet benchmarking comparison on Arm64 and x86_64 + +- **Catalog compilation:** Completed in just **0.01 seconds**, showing excellent processing speed on **Arm64**. +- **Environment:** Executed smoothly under the **production** environment. +- **Configuration version:** Recorded as **1762160712**, confirming successful version tracking. +- **Catalog application:** Finished in **0.01 seconds**, demonstrating very low execution latency. +- **Real time:** Total runtime of **1.175 seconds**, reflecting efficient end. diff --git a/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/images/gcp-vm.png b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/images/gcp-vm.png new file mode 100644 index 0000000000..0d1072e20d Binary files /dev/null and b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/images/gcp-vm.png differ diff --git a/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/installation.md b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/installation.md new file mode 100644 index 0000000000..c63298bab8 --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/installation.md @@ -0,0 +1,82 @@ +--- +title: Install Puppet +weight: 4 + +### FIXED, DO NOT MODIFY +layout: learningpathall +--- + +## Install Puppet on GCP VM +This guide walks you through installing Puppet on a **Google Cloud Platform (GCP) SUSE Linux Arm64 VM**, including all dependencies, Ruby setup, and environment preparation. + +### Install build dependencies and Ruby from source +Installs all required tools and builds Ruby 3.1.4 from source to ensure compatibility with Puppet. + +```console +sudo zypper install -y gcc make openssl-devel libyaml-devel zlib-devel readline-devel gdbm-devel ncurses-devel +cd /usr/local/src +sudo wget https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.4.tar.gz +sudo tar -xzf ruby-3.1.4.tar.gz +cd ruby-3.1.4 +sudo ./configure +sudo make && sudo make install +``` + +### Verify Ruby +Checks that Ruby is correctly installed and available in your system path. + +```console +ruby -v +which ruby +``` + +```output +ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [aarch64-linux] +/usr/local/bin/ruby +``` + +### Install Puppet dependencies +Installs essential Puppet libraries (`semantic_puppet, facter, hiera`) needed for automation tasks. + +- **semantic_puppet** – Provides tools for handling Puppet-specific versioning, modules, and dependency constraints. +- **facter** – Collects system information (facts) such as OS, IP, and hardware details for Puppet to use in configuration decisions. +- **hiera** – Key-value lookup tool that manages configuration data outside of Puppet manifests for flexible data separation. + +```console +wget https://github.com/puppetlabs/puppet/archive/refs/tags/8.10.0.tar.gz +tar -xvf 8.10.0.tar.gz +cd ~/puppet-8.10.0 +sudo /usr/local/bin/gem install semantic_puppet -v "~> 1.0" +sudo gem install facter -v "~> 4.0" +sudo gem install hiera +``` + +{{% notice Note %}} +Puppet 8.8.1 version expands official support for Arm and AArch64, with new agent compatibility for AlmaLinux 9 (AARCH64), Rocky Linux 9 (AARCH64), and Ubuntu 24.04 (ARM). The release ensures compatibility with Ruby 3.3 and resolves multiple agent and catalog-related issues. Security is enhanced with an OpenSSL 3.0.14 upgrade, addressing CVE-2024-4603 and CVE-2024-2511 vulnerabilities. +You can view [this release note](https://help.puppet.com/osp/current/Content/PuppetCore/PuppetReleaseNotes/release_notes_puppet_x-8-8-1.htm) + +The [Arm Ecosystem Dashboard](https://developer.arm.com/ecosystem-dashboard/) recommends Puppet version 8.8.1, the minimum recommended on the Arm platforms. +{{% /notice %}} + +### Build and install the Puppet gem +The **Puppet gem** provides the core Puppet framework, including its CLI, manifest parser, and resource management engine. + +Build and install the Puppet 8.10.0 package from source into your Ruby environment. + +```console +sudo gem build puppet.gemspec +sudo /usr/local/bin/gem install puppet-8.10.0.gem +``` + +### Verification +Confirm Puppet is successfully installed and ready to use on the system. + +```console +puppet --version +``` + +Output: +```output +8.10.0 +``` +Puppet installation is complete. You can now go ahead with the baseline testing of Puppet in the next section. diff --git a/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/instance.md b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/instance.md new file mode 100644 index 0000000000..2b93bc950d --- /dev/null +++ b/content/learning-paths/servers-and-cloud-computing/puppet-on-gcp/instance.md @@ -0,0 +1,31 @@ +--- +title: Create a Google Axion C4A Arm virtual machine on GCP +weight: 3 + +### 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. + +{{% 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.