Tools: Installing PDK on a Linux Workstation (Manual Edition)

Tools: Installing PDK on a Linux Workstation (Manual Edition)

Prerequisites

1. Gather Your Credentials

For Puppet Enterprise users:

For Puppet Core users:

2. Download and Setup the Repository File

3. Update and Install Getting PDK installed and updated can be a bit...weird these days, and after running into a few bumps I thought I'd share my compiled notes that streamlined a few different pages in the Puppet help documentation. Note: this is for manual setup. At some point I'll add the super fun Puppet version of this to make it simple and automated. First things first, let's get our credentials in order. The username is license-id. The password can be found via the PE console. Log into the console, click on License in the left side menus and then click Copy license id. The username is forge-key. The password can be found and/or created by logging into the Puppet Forge. Click on your account at the upper right corner and select View Profile. On the left side, select API Keys. Generate an API key and copy the key. That is your password. Make a note to save this for future use as once you leave that page you'll have to create a new one if you forget it. First, let's grab the repository. You can find the relevant RPM or DEB from either yum-puppetcore.puppet.com/public or apt-puppetcore.puppet.com/public. Once you've found the right one, let's download and install! Once you've done the above, you'll be able to edit the repo file at /etc/yum.repos.d/puppet8-release.repo. Let's take a look at the contents: It's pretty straightforward here. Remove the # from username and password, then copy your username and password from above into the <api_user> and <api_key> spaces, respectively. Save and quit editing the file. At this point we have our repo file, we have our credentials configured and we just need to update the repos and install pdk. a simple yum update followed by yum install pdk should get us there. That's all there is to it! As an added bonus, this is the same repo for Bolt and all the Puppet Core bits, so if you need the agent on your box it's as easy as another yum install. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse

Command
Add authentication here by uncommenting and filling in values #username= #password= [puppet8] name=Puppet 8 Repository el 8 - $basearch baseurl=https://yum-puppetcore.puppet.com/puppet8/el/8/$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release enabled=1 gpgcheck=1

Add authentication here by uncommenting and filling in values #username= #password= [puppet8] name=Puppet 8 Repository el 8 - $basearch baseurl=https://yum-puppetcore.puppet.com/puppet8/el/8/$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release enabled=1 gpgcheck=1

Add authentication here by uncommenting and filling in values #username= #password= root@choplifter:/home/matthew# yum update Updating and loading repositories: Puppet 8 Repository el 8 - x86_64 100% | 14.2 KiB/s | 14.1 KiB | 00m01s Repositories loaded. Nothing to do. root@choplifter:/home/matthew# yum install pdk Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: pdk x86_64 3.6.1.1-1.el9 puppet8 223.8 MiB Transaction Summary: Installing: 1 package Total size of inbound packages is 57 MiB. Need to download 57 MiB. After this operation, 224 MiB extra will be used (install 224 MiB, remove 0 B). Is this ok [y/N]: Y [1/1] pdk-0:3.6.1.1-1.el9.x86_64 100% | 15.8 MiB/s | 57.0 MiB | 00m04s -------------------------------------------------------------------------------------- [1/1] Total 100% | 15.8 MiB/s | 57.0 MiB | 00m04s Running transaction Importing OpenPGP key 0x9E61EF26: UserID : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) " Fingerprint: D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26 From : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release Is this ok [y/N]: Y The key was successfully imported. [1/3] Verify package files 100% | 5.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 3.0 B/s | 1.0 B | 00m00s [3/3] Installing pdk-0:3.6.1.1-1.el9.x86_64 100% | 72.0 MiB/s | 228.5 MiB | 00m03s Complete! root@choplifter:/home/matthew# pdk --version 3.6.1 root@choplifter:/home/matthew# yum update Updating and loading repositories: Puppet 8 Repository el 8 - x86_64 100% | 14.2 KiB/s | 14.1 KiB | 00m01s Repositories loaded. Nothing to do. root@choplifter:/home/matthew# yum install pdk Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: pdk x86_64 3.6.1.1-1.el9 puppet8 223.8 MiB Transaction Summary: Installing: 1 package Total size of inbound packages is 57 MiB. Need to download 57 MiB. After this operation, 224 MiB extra will be used (install 224 MiB, remove 0 B). Is this ok [y/N]: Y [1/1] pdk-0:3.6.1.1-1.el9.x86_64 100% | 15.8 MiB/s | 57.0 MiB | 00m04s -------------------------------------------------------------------------------------- [1/1] Total 100% | 15.8 MiB/s | 57.0 MiB | 00m04s Running transaction Importing OpenPGP key 0x9E61EF26: UserID : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) " Fingerprint: D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26 From : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release Is this ok [y/N]: Y The key was successfully imported. [1/3] Verify package files 100% | 5.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 3.0 B/s | 1.0 B | 00m00s [3/3] Installing pdk-0:3.6.1.1-1.el9.x86_64 100% | 72.0 MiB/s | 228.5 MiB | 00m03s Complete! root@choplifter:/home/matthew# pdk --version 3.6.1 root@choplifter:/home/matthew# yum update Updating and loading repositories: Puppet 8 Repository el 8 - x86_64 100% | 14.2 KiB/s | 14.1 KiB | 00m01s Repositories loaded. Nothing to do. root@choplifter:/home/matthew# yum install pdk Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: pdk x86_64 3.6.1.1-1.el9 puppet8 223.8 MiB Transaction Summary: Installing: 1 package Total size of inbound packages is 57 MiB. Need to download 57 MiB. After this operation, 224 MiB extra will be used (install 224 MiB, remove 0 B). Is this ok [y/N]: Y [1/1] pdk-0:3.6.1.1-1.el9.x86_64 100% | 15.8 MiB/s | 57.0 MiB | 00m04s -------------------------------------------------------------------------------------- [1/1] Total 100% | 15.8 MiB/s | 57.0 MiB | 00m04s Running transaction Importing OpenPGP key 0x9E61EF26: UserID : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) " Fingerprint: D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26 From : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release Is this ok [y/N]: Y The key was successfully imported. [1/3] Verify package files 100% | 5.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 3.0 B/s | 1.0 B | 00m00s [3/3] Installing pdk-0:3.6.1.1-1.el9.x86_64 100% | 72.0 MiB/s | 228.5 MiB | 00m03s Complete! root@choplifter:/home/matthew# pdk --version 3.6.1 - One of the following: a Puppet Core license, a Puppet Enterprise License, a Puppet Core development license. - a Linux workstation. In this example I'm working with Fedora 33." style="background: linear-gradient(135deg, #6a5acd 0%, #5a4abd 100%); color: #fff; border: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 600; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 12px rgba(106, 90, 205, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1); position: relative; overflow: hidden;">

Copy

$ -weight: 500;">wget https://-weight: 500;">yum-puppetcore.puppet.com/public/puppet8-release-el-9.noarch.rpm -weight: 600;">sudo rpm -ivh puppet8-release-el-8-noarch.rpm -weight: 500;">wget https://-weight: 500;">yum-puppetcore.puppet.com/public/puppet8-release-el-9.noarch.rpm -weight: 600;">sudo rpm -ivh puppet8-release-el-8-noarch.rpm -weight: 500;">wget https://-weight: 500;">yum-puppetcore.puppet.com/public/puppet8-release-el-9.noarch.rpm -weight: 600;">sudo rpm -ivh puppet8-release-el-8-noarch.rpm [puppet8] name=Puppet 8 Repository el 8 - $basearch baseurl=https://-weight: 500;">yum-puppetcore.puppet.com/puppet8/el/8/$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release enabled=1 gpgcheck=1

Add authentication here by uncommenting and filling in values #username=<api_user> #password=<api_key> [puppet8] name=Puppet 8 Repository el 8 - $basearch baseurl=https://-weight: 500;">yum-puppetcore.puppet.com/puppet8/el/8/$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release enabled=1 gpgcheck=1

Add authentication here by uncommenting and filling in values #username=<api_user> #password=<api_key> [puppet8] name=Puppet 8 Repository el 8 - $basearch baseurl=https://-weight: 500;">yum-puppetcore.puppet.com/puppet8/el/8/$basearch gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release enabled=1 gpgcheck=1

Add authentication here by uncommenting and filling in values #username=<api_user> #password=<api_key> root@choplifter:/home/matthew# -weight: 500;">yum -weight: 500;">update Updating and loading repositories: Puppet 8 Repository el 8 - x86_64 100% | 14.2 KiB/s | 14.1 KiB | 00m01s Repositories loaded. Nothing to do. root@choplifter:/home/matthew# -weight: 500;">yum -weight: 500;">install pdk Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: pdk x86_64 3.6.1.1-1.el9 puppet8 223.8 MiB Transaction Summary: Installing: 1 package Total size of inbound packages is 57 MiB. Need to download 57 MiB. After this operation, 224 MiB extra will be used (-weight: 500;">install 224 MiB, -weight: 500;">remove 0 B). Is this ok [y/N]: Y [1/1] pdk-0:3.6.1.1-1.el9.x86_64 100% | 15.8 MiB/s | 57.0 MiB | 00m04s -------------------------------------------------------------------------------------- [1/1] Total 100% | 15.8 MiB/s | 57.0 MiB | 00m04s Running transaction Importing OpenPGP key 0x9E61EF26: UserID : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <[email protected]>" Fingerprint: D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26 From : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release Is this ok [y/N]: Y The key was successfully imported. [1/3] Verify package files 100% | 5.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 3.0 B/s | 1.0 B | 00m00s [3/3] Installing pdk-0:3.6.1.1-1.el9.x86_64 100% | 72.0 MiB/s | 228.5 MiB | 00m03s Complete! root@choplifter:/home/matthew# pdk --version 3.6.1 root@choplifter:/home/matthew# -weight: 500;">yum -weight: 500;">update Updating and loading repositories: Puppet 8 Repository el 8 - x86_64 100% | 14.2 KiB/s | 14.1 KiB | 00m01s Repositories loaded. Nothing to do. root@choplifter:/home/matthew# -weight: 500;">yum -weight: 500;">install pdk Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: pdk x86_64 3.6.1.1-1.el9 puppet8 223.8 MiB Transaction Summary: Installing: 1 package Total size of inbound packages is 57 MiB. Need to download 57 MiB. After this operation, 224 MiB extra will be used (-weight: 500;">install 224 MiB, -weight: 500;">remove 0 B). Is this ok [y/N]: Y [1/1] pdk-0:3.6.1.1-1.el9.x86_64 100% | 15.8 MiB/s | 57.0 MiB | 00m04s -------------------------------------------------------------------------------------- [1/1] Total 100% | 15.8 MiB/s | 57.0 MiB | 00m04s Running transaction Importing OpenPGP key 0x9E61EF26: UserID : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <[email protected]>" Fingerprint: D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26 From : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release Is this ok [y/N]: Y The key was successfully imported. [1/3] Verify package files 100% | 5.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 3.0 B/s | 1.0 B | 00m00s [3/3] Installing pdk-0:3.6.1.1-1.el9.x86_64 100% | 72.0 MiB/s | 228.5 MiB | 00m03s Complete! root@choplifter:/home/matthew# pdk --version 3.6.1 root@choplifter:/home/matthew# -weight: 500;">yum -weight: 500;">update Updating and loading repositories: Puppet 8 Repository el 8 - x86_64 100% | 14.2 KiB/s | 14.1 KiB | 00m01s Repositories loaded. Nothing to do. root@choplifter:/home/matthew# -weight: 500;">yum -weight: 500;">install pdk Updating and loading repositories: Repositories loaded. Package Arch Version Repository Size Installing: pdk x86_64 3.6.1.1-1.el9 puppet8 223.8 MiB Transaction Summary: Installing: 1 package Total size of inbound packages is 57 MiB. Need to download 57 MiB. After this operation, 224 MiB extra will be used (-weight: 500;">install 224 MiB, -weight: 500;">remove 0 B). Is this ok [y/N]: Y [1/1] pdk-0:3.6.1.1-1.el9.x86_64 100% | 15.8 MiB/s | 57.0 MiB | 00m04s -------------------------------------------------------------------------------------- [1/1] Total 100% | 15.8 MiB/s | 57.0 MiB | 00m04s Running transaction Importing OpenPGP key 0x9E61EF26: UserID : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <[email protected]>" Fingerprint: D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26 From : file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet8-release Is this ok [y/N]: Y The key was successfully imported. [1/3] Verify package files 100% | 5.0 B/s | 1.0 B | 00m00s [2/3] Prepare transaction 100% | 3.0 B/s | 1.0 B | 00m00s [3/3] Installing pdk-0:3.6.1.1-1.el9.x86_64 100% | 72.0 MiB/s | 228.5 MiB | 00m03s Complete! root@choplifter:/home/matthew# pdk --version 3.6.1 - One of the following: a Puppet Core license, a Puppet Enterprise License, a Puppet Core development license. - a Linux workstation. In this example I'm working with Fedora 33.