Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 14 additions & 13 deletions .github/workflows/install_puppet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,26 @@ on:

jobs:
install-puppet:
name: ${{ matrix.collection }} / ${{ matrix.os.name }}
runs-on: ubuntu-latest
name: ${{ matrix.collection }} / ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
collection: [ puppet7, puppet8 ]
os: [
{ name: "Debian 10", image: "litmusimage/debian:10" },
{ name: "Debian 11", image: "litmusimage/debian:11" },
{ name: "Debian 12", image: "litmusimage/debian:12" },
{ name: "Ubuntu 20.04", image: "litmusimage/ubuntu:20.04" },
{ name: "Ubuntu 22.04", image: "litmusimage/ubuntu:22.04" },
]
container:
image: ${{ matrix.os.image }}
os: ['macos-14', 'ubuntu-24.04']
collection: [ puppet8, puppetcore8, puppetcore9 ]
include:
- collection: puppetcore8
version: "8.21.0"
- collection: puppetcore9
version: "9.0.0"
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current PR
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install puppet-agent from ${{ matrix.collection }} collection
run: bash -x test_install.sh -c ${{ matrix.collection }}
if: ${{ contains(matrix.collection, 'core') }}
run: sudo bash -x test_install.sh -v ${{ matrix.version }} -c ${{ matrix.collection }} -p ${{ secrets.PUPPET_FORGE_TOKEN_PUBLIC }}
- name: Install puppet-agent from ${{ matrix.collection }} collection (pre Puppet Core)
if: ${{ !contains(matrix.collection, 'core') }}
run: sudo bash -x test_install.sh -v 8.10.0 -c ${{ matrix.collection }}
36 changes: 36 additions & 0 deletions .github/workflows/install_puppet_nightly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Install Puppet (Nightly)
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
install-puppet-nightly:
name: ${{ matrix.collection }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
collection: [ puppetcore8-nightly, puppetcore9-nightly ]
steps:
- name: Checkout current PR
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Connect Twingate
uses: twingate/github-action@v1.5
with:
service-key: ${{ secrets.TWINGATE_PUBLIC_REPO_KEY }}

- name: Fix DNS for Twingate
run: |
sudo resolvectl dns eth0 ""
sudo resolvectl dns sdwan0 100.95.0.251 100.95.0.252
sudo resolvectl domain sdwan0 delivery.puppetlabs.net
sudo resolvectl flush-caches

- name: Install puppet-agent from ${{ matrix.collection }} collection
run: sudo bash -x test_install.sh -c ${{ matrix.collection }}
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ before executing it.

### Script arguments

If run with no arguments, the script will install the latest stable version of puppet-agent.

You can install a specific version using:
To pass flags via the curl-pipe pattern:
```sh
curl -sSL https://raw.githubusercontent.com/puppetlabs/install-puppet/main/install.sh | bash -s -- -v 6.24.0
```
Expand All @@ -55,9 +53,37 @@ Below is the full list of configurable options:

* `-v`/`--version` - install a specific puppet-agent version
* `-c`/`--collection` - install a specific puppet-agent collection (e.g. puppet7)
* `-u`/`--username` - username for Puppet Core package downloads, paired with --password; defaults to `forge-key`
* `-p`/`--password` - Forge API key or PE License ID, paired with --username
* `-n`/`--noop` - do a dry run, do not change any files
* `--cleanup` - remove the puppetlabs repository after installation finishes

### Installing Puppet Core

Puppet 8.11.0 and later are distributed as **Puppet Core**, under `puppetcore*`
collections (e.g. `puppetcore9`), and require a Forge API key. The
`puppet`/`puppet7`/`puppet8` collections are still free, but are frozen at
their last pre-Core release (`puppet8` stopped at 8.10) - any 8.11+ release
only ships via `puppetcore8`.

To get a Forge API key:

1. Log in at [forge.puppet.com](https://forge.puppet.com).
2. Accept the Puppet Core EULA: profile menu → **Puppet** → **Puppet Core EULA**.
3. Enable MFA: profile → **Settings** → "Use Multifactor Authentication" (required before you can create a key).
4. Profile → **API Keys** → **Create a new key**, and copy it immediately - Forge only displays it once.

```sh
./install.sh -v 9.0.0 -c puppetcore9 -u forge-key -p <FORGE_KEY>
```

> **Using PE License ID**:
> You must use `forge-key` to download Puppet Core packages from `yum-puppetcore.puppet.com` or `apt-puppetcore.puppet.com`.
> However, either `forge-key` or `license-id` (associated with Puppet Enterprise) can be used to download artifacts from `artifacts-puppetcore.puppet.com` and Ruby gems from `rubygems-puppetcore.puppet.com`.
> ```sh
> ./install.sh -v 9.0.0 -c puppetcore9 -u license-id -p "$LICENSE_ID"
> ```

## Development

The Ruby script uses parts of the `bash.sh` task from the
Expand Down
6 changes: 5 additions & 1 deletion install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@
{
cat << HEREDOC

Usage: install.sh [--version VERSION] [--collection COLLECTION] [--cleanup] [--noop]
Usage: install.sh [--version VERSION] [--collection COLLECTION] [--username USERNAME] [--password PASSWORD] [--cleanup] [--noop]

optional arguments:
-h, --help show this help message and exit
-v, --version VERSION install a specific puppet-agent version
-c, --collection COLLECTION install a specific puppet-agent collection (e.g. puppet7)
-u, --username USERNAME username for Puppet Core package downloads, paired with --password; defaults to forge-key
-p, --password PASSWORD Forge API key or PE License ID, paired with --username
-n, --noop do a dry run, do not change any files
--cleanup remove the puppetlabs repository after installation finishes

Expand All @@ -45,6 +47,8 @@
PT_collection="puppet"
fi ;;
-c|--collection) PT_collection="$2"; shift ;;
-u|--username) PT_username="$2"; shift ;;
-p|--password) PT_password="$2"; shift ;;
--cleanup) PT_cleanup=true; shift ;;
-n|--noop) PT__noop=true; shift ;;
-h|--help) usage; exit ;;
Expand Down
Loading
Loading