# 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__ 
__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__ {
  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
  }
}
```

### Check the architecture:
```
facter architecture
```
The output is:
```
__output__ aarch64
```

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

## 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.
