# Perform Puppet baseline testing

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/puppet-on-gcp/)
- [Get started with Arm-based Google Axion and Puppet](https://learn.arm.com/learning-paths/servers-and-cloud-computing/puppet-on-gcp/background/)
- [Create a Google Axion C4A Arm virtual machine on GCP](https://learn.arm.com/learning-paths/servers-and-cloud-computing/puppet-on-gcp/instance/)
- [Install Puppet on a GCP VM](https://learn.arm.com/learning-paths/servers-and-cloud-computing/puppet-on-gcp/installation/)
- [Perform Puppet baseline testing](https://learn.arm.com/learning-paths/servers-and-cloud-computing/puppet-on-gcp/baseline/)
- [Benchmark Puppet](https://learn.arm.com/learning-paths/servers-and-cloud-computing/puppet-on-gcp/benchmarking/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/puppet-on-gcp/_next-steps/)

## Overview
You can perform baseline testing of Puppet on a GCP SUSE Arm64 VM to make sure your installation works as expected. In this Learning Path, you’ll verify Puppet and Facter versions, run basic Puppet commands, apply a simple manifest, and confirm that system facts are collected correctly. These steps help you validate your setup before moving on to advanced Puppet tasks.

## Verify the Puppet installation
Verify that Puppet and Facter are correctly installed and respond to version checks.

Check the Puppet version:
```
puppet --version
```
The output shows the installed version:
```
__output__8.10.0
```

Check the Facter version:
```
facter --version
```
The output shows the Facter version:
```
__output__4.10.0
```

Check the Ruby version, which is a dependency for Puppet:
```
ruby -v
```
The output confirms the Ruby version and architecture:
```
__output__ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [aarch64-linux]
```

## Run a simple Puppet command
Check that Puppet responds to commands by running `puppet help`. If the help menu appears, Puppet is working correctly.

Run the `puppet help` command:
```
puppet help
```
The output displays the help menu, confirming Puppet is operational:
```
__output__Usage: puppet <subcommand> [options] <action> [options]
__output__
__output__Available subcommands:
__output__
__output__  Common:
__output__    agent             The puppet agent daemon
__output__    apply             Apply Puppet manifests locally
__output__    config            Interact with Puppet's settings.
__output__    help              Display Puppet help.
__output__    lookup            Interactive Hiera lookup
__output__    module            Creates, installs and searches for modules on the Puppet Forge.
__output__    resource          The resource abstraction layer shell
__output__
__output__  Specialized:
__output__    catalog           Compile, save, view, and convert catalogs.
__output__    describe          Display help about resource types
__output__    device            Manage remote network devices
__output__    doc               Generate Puppet references
__output__    epp               Interact directly with the EPP template parser/renderer.
__output__    facts             Retrieve and store facts.
__output__    filebucket        Store and retrieve files in a filebucket
__output__    generate          Generates Puppet code from Ruby definitions.
__output__    node              View and manage node definitions.
__output__    parser            Interact directly with the parser.
__output__    plugin            Interact with the Puppet plugin system.
__output__    script            Run a puppet manifests as a script without compiling a catalog
__output__    ssl               Manage SSL keys and certificates for puppet SSL clients
__output__
__output__See 'puppet help <subcommand> <action>' for help on a specific subcommand action.
__output__See 'puppet help <subcommand>' for help on a specific subcommand.
__output__Puppet v8.10.0
```

## Test a simple Puppet manifest
Create a basic Puppet script to make sure Puppet can apply configurations. The purpose of this script is to verify that Puppet can successfully apply configurations on your system. If the script runs and creates the specified test file, it confirms that your Puppet agent is functioning correctly:
```
cd ~
cat <<EOF > test.pp
file { '/tmp/puppet_test.txt':
  ensure  => file,
  content => "Hello from Puppet on SUSE ARM64!\n",
}
EOF
```
Run the script:
```
puppet apply test.pp
```
You should see an output similar to:
```
__output__Notice: Compiled catalog for danson-puppet-2.c.arm-deveco-stedvsl-prd.internal in environment production in 0.01 seconds
__output__Notice: /Stage[main]/Main/File[/tmp/puppet_test.txt]/ensure: defined content as '{sha256}bcf972b61979afe69626549b3f3f30798aeb50b359e76603a36e96b2abbe73c0'
__output__Notice: Applied catalog in 0.01 seconds
```
Open the file created by Puppet to confirm the content matches your script. This step validates that Puppet executed your manifest correctly:
```
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, such as the OS and CPU type. This ensures Puppet can gather the facts it needs for automation decisions.

Check the OS:
```
facter os
```
The output is similar to the following:
```
__output__{
__output__  architecture => "aarch64",
__output__  distro => {
__output__    codename => "n/a",
__output__    description => "SUSE Linux Enterprise Server 15 SP6",
__output__    id => "SUSE",
__output__    release => {
__output__      full => "15.6",
__output__      major => "15",
__output__      minor => "6"
__output__    }
__output__  },
__output__  family => "Suse",
__output__  hardware => "aarch64",
__output__  name => "SLES",
__output__  release => {
__output__    full => "15.6",
__output__    major => "15",
__output__    minor => "6"
__output__  },
__output__  selinux => {
__output__    enabled => false
__output__  }
__output__}
```

Check the architecture:
```
facter architecture
```
The output is:
```
__output__aarch64
```

Check the processors:
```
facter processors
```
The output is similar to the following:
```
__output__{
__output__  cores => 4,
__output__  count => 4,
__output__  extensions => [
__output__    "aarch64"
__output__  ],
__output__  isa => "aarch64",
__output__  models => [
__output__  ],
__output__  physicalcount => 1,
__output__  threads => 1
__output__}
```

## What you’ve accomplished and what’s next
You’ve completed the essential baseline checks for Puppet on your GCP SUSE Arm64 VM. At this point, you’ve:
- Verified that Puppet, Facter, and Ruby are installed and working
- Confirmed Puppet responds to commands and applies manifests
- Validated that Facter collects accurate system facts

This progress means your environment is ready for more advanced testing. Next, you’ll move on to Puppet benchmarking, where you’ll run workload-focused tests to measure performance on your GCP SUSE VM.
