Skip to content

Instantly share code, notes, and snippets.

@Magisus
Last active August 6, 2020 20:29
Show Gist options
  • Save Magisus/069381454d543f84b441b9fdb280089f to your computer and use it in GitHub Desktop.
Save Magisus/069381454d543f84b441b9fdb280089f to your computer and use it in GitHub Desktop.
Test dujour setup
# On a Centos 7 pooler VM
# Install PE
latest_pe=$(curl https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/master/ci-ready/LATEST)
curl -O "https://artifactory.delivery.puppetlabs.net/artifactory/generic_enterprise__local/master/ci-ready/puppet-enterprise-${latest_pe}-el-7-x86_64.tar"
tar xvf "puppet-enterprise-${latest_pe}-el-7-x86_64.tar"
pushd "puppet-enterprise-${latest_pe}-el-7-x86_64"
# This will prompt you with the normal installer prompts
./puppet-enterprise-installer
puppet agent -t
popd
# Install docker
yum install -y yum-utils \
device-mapper-persistent-data \
lvm2
yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo
yum install -y docker-ce docker-ce-cli containerd.io
systemctl start docker
# Install docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.26.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
yum install -y git
# This will prompt you for you GH credentials
git clone https://github.com/puppetlabs/dujour.git
# Grab the fork with the dujour changes
git remote add magisus https://github.com/magisus/dujour.git
# This will prompt you for you GH credentials
git fetch magisus
# checkout the updated branch
git checkout remove-keys
mkdir dujour/dev-resources/credentials
# Then, copy your GCP credentials file into dujour/dev-resources/credentials
# and use `docker-compose up -d` to start the dujour container.
# Find the container's mapping for port 80 with `docker inspect dujour_dujour_1`
# Update puppetserver's config to contain:
# product: { update-server-url: "http://localhost:<container's mapping for port 80>"
# version-path: "/opt/puppetlabs/server/pe_version"
# name: { artifact-id: "pe-master", group-id: "puppetlabs.packages" } }
# Install an uberjar of pe-puppetserver with:
# 1) your branch of pe-pse
# 2) my analytics PR, https://github.com/puppetlabs/analytics/pull/22
# Restart pe-puppetserver.
# Run `docker-compose logs` to see if Dujour successfully submitted analytics
# If the submission is missing snapshot data, use
# `curl -k -X POST https://localhost:8140/analytics/v1/commands/send` to try again,
# picking up any snapshot that was submitted after the analytics service started.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment