Install PDK on macOS

To install PDK for macOS, download the PDK package and install it. PDK is stored in a protected repository, so to download it directly or via curl, you must authenticate using either your Puppet Core or Puppet Enterprise (PE) credentials.

For more information about Puppet Core credentials, see Purchasing Puppet Core and Accessing Puppet Core for limited use for testing or development.

By default, PDK installs to /opt/puppetlabs/pdk/.

Download PDK from the download page

On the PDK download page, click on the macOS package you want to download. In the Sign In window, enter either one of the following credentials to authenticate and download the PDK:

  • The string literal license-id as the Username and your PE License ID as the Password. You can find your PE License ID in your PE license file or in the PE console by selecting License from the navigation bar.

  • The string literal forge-key as the Username and the Puppet Forge API key associated with your Puppet Core free or paid user as the Password. For more information about the API key, see Purchasing Puppet Core and Accessing Puppet Core for limited use for testing or development.

Download PDK using curl

Directly curl the endpoints with credentials to download PDK using the following steps.

  1. Export either of the following sets of credentials, ensuring that you use either a Forge username and password or a PE username and password.

    • The string literal forge-key as the username and the Puppet Forge API key associated with your Puppet Core free or paid user as the password. For more information about the API key, see Purchasing Puppet Core and Accessing Puppet Core for limited use for testing or development.

    • The string literal license-id as the username and your PE License ID as the password. You can find your PE License ID in your PE license file or in the PE console by selecting License from the navigation bar.

    For example:

    export USERNAME=forge-key
    export PASSWORD=<API_KEY>
  2. Copy the URL for the package you want to download from the PDK download page. Click on the copy icon next to the package you want to download.

  3. Call the credentials from the URL, for example:

    curl -J -O -u forge-key:$PASSWORD "https://artifacts-puppetcore.puppet.com/v1/download?type=pdk&os_name=osx&os_version=14&os_arch=x86_64&version=latest"

Install the macOS PDK package

  1. To install the downloaded package, double-click on it.

  2. Open a terminal to re-source your shell profile and make PDK available to your PATH.

  3. Check that you successfully installed PDK. Run:

    pdk --version

    This returns the installed version of PDK. If the output returns something other than the version you installed, open a new terminal window and try the command again.