Last active
May 21, 2018 18:45
-
-
Save jpadams/1545e9e37360ead131eeaa0b05827cd1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example install script for monolithic/all-in-one PE Master in the 2016 or 2017 or 2018 series | |
# This version for Enterprise Linux (CentOS, RHEL, etc). | |
# This script assumes that networking, hostname, DNS, etc are all working. | |
if [ $# -ne 2 ]; then | |
echo "Wrong number of arguments. Expected 2 and got $#" | |
echo "Usage: $0 [<PE Version>|latest] <PE GUI admin password>" | |
exit 3 | |
fi | |
requested_pe_version=$1 | |
pe_console_admin_password=$2 | |
install_dir=$(mktemp -d) | |
latest_pe_version=$(curl -s http://versions.puppet.com.s3-website-us-west-2.amazonaws.com/ | tail -n1) | |
if [ "${requested_pe_version}" != 'latest' ] | |
then | |
requested_pe_version=$(curl -s http://versions.puppet.com.s3-website-us-west-2.amazonaws.com/ | grep ${requested_pe_version} | grep -E "2016|2017|2018") | |
else | |
requested_pe_version=${latest_pe_version} | |
fi | |
pe_version=${requested_pe_version:-latest_pe_version} | |
cd ${install_dir} | |
curl -o puppet-enterprise-${pe_version}-el-7-x86_64.tar.gz https://s3.amazonaws.com/pe-builds/released/${pe_version}/puppet-enterprise-${pe_version}-el-7-x86_64.tar.gz | |
tar -zxvf puppet-enterprise-${pe_version}-el-7-x86_64.tar.gz | |
echo '{ | |
"console_admin_password": "'${pe_console_admin_password}'" | |
"puppet_enterprise::puppet_master_host": "%{::trusted.certname}" | |
}' | tee pe.conf | |
cd puppet-enterprise-${pe_version}-el-7-x86_64 | |
./puppet-enterprise-installer -c ${install_dir}/pe.conf -q -y | |
/opt/puppetlabs/puppet/bin/puppet agent --onetime --no-daemonize --no-usecacheonfailure --no-splay --verbose | |
/opt/puppetlabs/puppet/bin/puppet agent --onetime --no-daemonize --no-usecacheonfailure --no-splay --verbose | |
/opt/puppetlabs/puppet/bin/puppet agent --onetime --no-daemonize --no-usecacheonfailure --no-splay --verbose |
PE Install Requirements: https://puppet.com/docs/pe/2017.3/installing/hardware_requirements.html
Good POC system is 2-4 CPUs, 6-16 GB of RAM, and enough disk for 100GB in /opt (PuppetDB) and 20GB in /var (logs).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example usage would be:
bash ./generic_el_pe_install.sh 2017.3.5 puppetlabs
or
bash ./generic_el_pe_install.sh latest puppetlabs
Where the PE version is '2017.3.5' or 'latest' and the password is for the 'admin' user in the PE GUI is 'puppetlabs'.