-
Notifications
You must be signed in to change notification settings - Fork 56
Building Puppet
Below versions of Puppet are available in respective distributions at the time of creation of these build instructions:
- RHEL (8.8, 8.10) have
6.26.0
- RHEL (9.2, 9.4) have
7.27.0
- Ubuntu 20.04 has
5.5.10
- Ubuntu 22.04 has
5.5.22
- Ubuntu 24.04 has
8.4.0
Open source Puppet is made up of puppet-agent
and puppetserver
. Latest Puppet version, 8.9.0
, includes Puppet Server version 8.6.3
and Puppet Agent version 8.9.0
. For details, see Puppet packages and versions.
The instructions provided below specify the steps to build Puppet Server 8.6.3 on Linux on IBM Z for the following distributions
- RHEL (8.8, 8.10, 9.2, 9.4)
- Ubuntu (20.04, 22.04, 24.04)
- SLES (12 SP5, 15 SP5, 15 SP6)
The instructions provided in Step 3 specify the steps to build Puppet Agent 8.9.0 on Linux on IBM Z for the following distributions
- RHEL (8.8, 8.10, 9.2, 9.4)
- Ubuntu (20.04, 22.04, 24.04)
- SLES (12 SP5, 15 SP5, 15 SP6)
General Notes:
-
When following the steps below please use a standard permission user unless otherwise specified.
-
A directory
/<source_root>/
will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.
If you want to build Puppet Server using manual steps, go to STEP 2. If you want to build Puppet Agent using manual steps, go to STEP 3.
Use the following commands to build Puppet using the build script. Please make sure you have wget installed.
wget -q https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Puppet/8.9.0/build_puppet.sh
# Build Puppet Server
bash build_puppet.sh -s server [-j Java to be used from {Eclipse_Adoptium_Temurin_runtime_11, Eclipse_Adoptium_Temurin_runtime_17, OpenJDK11, OpenJDK17, SemeruJDK11, SemeruJDK17}]
# Build Puppet Agent
bash build_puppet.sh -s agent
If the build completes successfully for server installation, continue to STEP 2.10 and update puppet.conf
. In case of error, check logs for more details or go to STEP 2 to follow manual build steps.
If the build completes successfully for agent installation, continue to STEP 3.4 and update puppet.conf
. In case of error, check logs for more details or go to STEP 3 to follow manual build steps.
export SOURCE_ROOT=/<source_root>/
-
RHEL (8.8, 8.10, 9.2, 9.4)
sudo yum install -y gcc-c++ tar unzip openssl-devel make git wget zip gzip gawk zlib-devel bison flex readline-devel gdbm-devel libyaml-devel libffi-devel
-
Ubuntu (20.04, 22.04, 24.04)
sudo apt-get update sudo apt-get install -y g++ tar git make wget locales locales-all unzip zip gzip gawk zlib1g zlib1g-dev openssl libssl-dev bison flex libdb-dev libgdbm-dev libreadline-dev libyaml-dev libffi-dev
-
SLES 12 SP5
sudo zypper install -y gcc7-c++ tar unzip libopenssl-devel make git wget zip gzip gawk zlib-devel bison flex readline-devel gdbm-devel libyaml-devel libffi-devel sudo ln -sf /usr/bin/gcc-7 /usr/bin/gcc sudo ln -sf /usr/bin/gcc /usr/bin/cc
-
SLES (15 SP5, 15 SP6)
sudo zypper install -y gcc-c++ tar unzip libopenssl-devel make git wget zip gzip gawk zlib-devel bison flex readline-devel gdbm-devel libyaml-devel libffi-devel
- RHEL (8.8, 8.10, 9.2, 9.4)
-
With Eclipse Adoptium Temurin Runtime
- Download and install Eclipse Adoptium Temurin Runtime (Java 11, 17) from here.
-
With IBM Semeru Runtime
- Download and install IBM Semeru Runtime (Java 11, 17) from here.
-
With OpenJDK 11
sudo yum install -y java-11-openjdk-devel
-
With OpenJDK 17
sudo yum install -y java-17-openjdk-devel
-
- SLES (12 SP5, 15 SP5, 15 SP6)
-
With Eclipse Adoptium Temurin Runtime
- Download and install Eclipse Adoptium Temurin Runtime (Java 11, 17) from here.
-
With IBM Semeru Runtime
- Download and install IBM Semeru Runtime (Java 11, 17) from here.
-
With OpenJDK 11
sudo zypper install -y java-11-openjdk-devel
-
With OpenJDK 17 (Only for SLES 15.x)
sudo zypper install -y java-17-openjdk-devel
-
- Ubuntu (20.04, 22.04, 24.04)
-
With Eclipse Adoptium Temurin Runtime
- Download and install Eclipse Adoptium Temurin Runtime (Java 11, 17) from here.
-
With IBM Semeru Runtime
-
Download and install IBM Semeru Runtime (Java 11, 17) from here.
-
With OpenJDK 11
sudo apt-get update sudo apt-get install -y openjdk-11-jdk
-
With OpenJDK 17
sudo apt-get update sudo apt-get install -y openjdk-17-jdk
-
Note: Eclipse Adoptium Temurin Runtime version Temurin-11.0.24+8
and Temurin-17.0.12+7
IBMSemeru versions 11.0.24.1
and 17.0.12.7
OpenJDK versions 11.0.24.1
and 17.0.12.7
was used while verifying these instructions.
export JAVA_HOME=<path to java>
export PATH=$JAVA_HOME/bin:$PATH
cd $SOURCE_ROOT
wget https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.5.tar.gz
tar -xzf ruby-3.3.5.tar.gz
cd ruby-3.3.5
./configure && make
sudo make install # For Ubuntu
sudo -E env PATH="$PATH" make install # For RHEL 8.x, 9.x, SLES
sudo gem install bundler rake-compiler # Ubuntu
sudo -E env PATH="$PATH" gem install bundler rake-compiler # For RHEL 8.x, 9.x, SLES
cd $SOURCE_ROOT
wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
chmod +x lein
sudo mv lein /usr/bin/
cd $SOURCE_ROOT
git clone --recursive --branch 8.6.3 https://github.com/puppetlabs/puppetserver
cd puppetserver
- Run
dev-setup
export LANG="en_US.UTF-8" ./dev-setup
cd $SOURCE_ROOT/puppetserver
PUPPETSERVER_HEAP_SIZE=6G lein test # to run the clojure test suite
Note: This command uses a heap size of 6GB. Please ensure that adequate system memory is available. See https://puppet.com/docs/puppet/8/server/dev_running_from_source.html#running-tests for more information about running the tests.
Note: Following test case errors are observed both on s390x and amd64
- Tests which are failing on RHEL 8.x, 9.x and SLES 12.x, 15.x and Ubuntu consistently
-
puppetlabs.services.certificate-authority.certificate-authority-int-test/double-encoded-request-not-allowed
: This test case error is related to using an untrusted SSL certificate.
-
- Tests which are failing only on Ubuntu and RHEL 8.x, 9.x consistently
-
lein test puppetlabs.services.master.master-core-test/valid-env-name
: This test case Error 400 on SERVER at /v4/catalog is due to Invalid input: {"environment"}
-
- Tests which are failing only on RHEL 8.x, 9.x consistently
-
petlabs.puppetserver.certificate-authority-test/autosign-csr?-ruby-exe-test
: This test cases fail in ca/autosign-csr executable "test-agent" ruby-load-path. -
puppetlabs.services.ca.certificate-authority-core-test/handle-put-certificate-request!-test
: This test case fails when autosign results in true it signs the CSR, writes the certificate to disk, and returns a 200 response with empty plaintext body.
-
Note: With the IBM Semeru Runtime you may see an OutOfMemory error in the test logs. You can try increasing the JVM Heap Size when running the tests by setting the environment variable named PUPPETSERVER_HEAP_SIZE to a larger size. See: https://puppet.com/docs/puppet/8/server/dev_running_from_source.html#running-tests
The Puppet server runs on TCP port 8140. This port needs to be open on your server firewall (and any intervening firewalls and network devices), and your agent must be able to route and connect to the server.
Start puppet server using the development configuration file.
cd $SOURCE_ROOT/puppetserver
lein run -c dev/puppetserver.conf
The output should contain logs similar to:
INFO [async-dispatch-2] [p.t.s.s.status-service] Registering status callback function for service 'master', version 8.6.3
INFO [async-dispatch-2] [p.t.s.s.status-service] Registering status callback function for service 'server', version 8.6.3
See https://puppet.com/docs/puppet/8/server/configuration.html for more information about configuration options.
Note: You can set the autosign option to true
(puppet config set autosign true
) to allow the server to sign incoming certificates for testing purposes. This option should not be set to true
in production environments. See https://puppet.com/docs/puppet/8/configuration.html#autosign for more details.
-
RHEL (8.8, 8.10, 9.2, 9.4)
sudo yum install -y gcc-c++ tar make wget openssl-devel gzip gawk zlib-devel bison flex readline-devel gdbm-devel libyaml-devel libffi-devel
-
Ubuntu (20.04, 22.04, 24.04)
sudo apt-get update sudo apt-get install -y g++ tar make wget gzip gawk zlib1g zlib1g-dev openssl libssl-dev bison flex libdb-dev libgdbm-dev libreadline-dev libyaml-dev libffi-dev
-
SLES 12 SP5
sudo zypper install -y gcc7-c++ tar libopenssl-devel make wget gzip gawk zlib-devel bison flex readline-devel gdbm-devel libyaml-devel libffi-devel sudo ln -sf /usr/bin/gcc-7 /usr/bin/gcc sudo ln -sf /usr/bin/gcc /usr/bin/cc
-
SLES (15 SP5, 15 SP6)
sudo zypper install -y gcc-c++ tar make wget libopenssl-devel gzip gawk zlib-devel bison flex readline-devel gdbm-devel libyaml-devel libffi-devel
cd $SOURCE_ROOT
wget https://cache.ruby-lang.org/pub/ruby/3.3/ruby-3.3.5.tar.gz
tar -xzf ruby-3.3.5.tar.gz
cd ruby-3.3.5
./configure
make
sudo make install # For Ubuntu
sudo -E env PATH="$PATH" make install # For RHEL 8.x, 9.x, SLES
# For Ubuntu
sudo gem install bundler rake-compiler
sudo gem install puppet -v 8.9.0
# For RHEL 8.x, 9.x, SLES
sudo -E env PATH="$PATH" gem install bundler rake-compiler
sudo -E env PATH="$PATH" gem install puppet -v 8.9.0
In order to connect Puppet agent to the server it may be necessary to configure Puppet agent.
If you are running the server and agent separately, you may need to edit the puppet.conf
file on both nodes. In general, value of the server
attribute on the Puppet agent node should match either the certname
attribute or the dns_alt_names
attribute on the Puppet server node, value of the certname
attribute on the Puppet agent node is usually set to the node's fully-qualified domain name. It may also be necessary to generate and sign a certificate for the Puppet agent. See https://puppet.com/docs/puppet/8/install_agents.html#configure_server_setting, https://puppet.com/docs/puppet/7/config_file_main.html and https://puppet.com/docs/puppet/8/man/agent.html for instructions for how to do this.
If you are running both the server and agent on the same host for testing you may be able to skip this step. The server and agent should use the same certificate automatically.
Due to a known issue - https://github.com/ruby-concurrency/concurrent-ruby/issues/987 update concurrent-ruby
from default version to v1.1.10
.
sudo -E env PATH="$PATH" gem uninstall -I concurrent-ruby
sudo -E env PATH="$PATH" gem install concurrent-ruby -v 1.1.10
Verify Puppet agent installation:
puppet agent --version
The output should be: 8.9.0
The following command will run Puppet agent in test mode using the default configuration file. This test requires a Puppet server to connect to.
puppet agent -t
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.