Drop puppet3 support
Puppet 3 was EOL as of December 31, 2016. Since we don't use it in the gate for Pike, let's drop the configuration bits in p-o-i for it. This change leaves the PUPPET_MAJ_VERSION support on the off chance we need it in the future but basically 4 is currently the only supported version. Change-Id: I0f04a3cb194ec2225010fb4e062703195b79baf1
This commit is contained in:
parent
aefb4761cd
commit
7f9907baa6
21
functions
21
functions
@ -145,20 +145,17 @@ install_puppet() {
|
||||
if uses_debs; then
|
||||
print_header 'Setup (Debian based)'
|
||||
# Puppetlabs packaging:
|
||||
# - trusty: puppet3 and puppet4
|
||||
# - xenial: puppet4 only
|
||||
if [[ ${DISTRO} == "trusty" ]] || [[ ${DISTRO} == "xenial" && ${PUPPET_MAJ_VERSION} == 4 ]]; then
|
||||
if dpkg -l $PUPPET_RELEASE_FILE >/dev/null 2>&1; then
|
||||
$SUDO apt-get purge -y $PUPPET_RELEASE_FILE
|
||||
fi
|
||||
$SUDO rm -f /tmp/puppet.deb
|
||||
wget http://apt.puppetlabs.com/${PUPPET_RELEASE_FILE}-${DISTRO}.deb -O /tmp/puppet.deb
|
||||
$SUDO dpkg -i /tmp/puppet.deb
|
||||
# TODO(emilien): figure what installed /etc/default/puppet on the xenial nodepool image
|
||||
# We have no problem on Trusty but on Xenial we need to remove /etc/default/puppet before
|
||||
# trying to deploy puppet-agent from puppetlabs.com.
|
||||
$SUDO rm -rf /etc/default/puppet
|
||||
if dpkg -l $PUPPET_RELEASE_FILE >/dev/null 2>&1; then
|
||||
$SUDO apt-get purge -y $PUPPET_RELEASE_FILE
|
||||
fi
|
||||
$SUDO rm -f /tmp/puppet.deb
|
||||
wget http://apt.puppetlabs.com/${PUPPET_RELEASE_FILE}-${DISTRO}.deb -O /tmp/puppet.deb
|
||||
$SUDO dpkg -i /tmp/puppet.deb
|
||||
# TODO(emilien): figure what installed /etc/default/puppet on the xenial nodepool image
|
||||
# We have no problem on Trusty but on Xenial we need to remove /etc/default/puppet before
|
||||
# trying to deploy puppet-agent from puppetlabs.com.
|
||||
$SUDO rm -rf /etc/default/puppet
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y ${PUPPET_PKG}
|
||||
elif is_fedora; then
|
||||
|
@ -10,14 +10,10 @@ fi
|
||||
# NOTE(aschultz): since puppet 3 is now EOL, and beaker-puppet_install_helper
|
||||
# version 0.6.0 has made the agent version the default, we need to symlink
|
||||
# puppet to the /opt/puppetlabs version when specifically not version 3.
|
||||
if [ "${PUPPET_MAJ_VERSION}" = 3 ]; then
|
||||
export PUPPET_BASE_PATH=/etc/puppet
|
||||
else
|
||||
export PUPPET_BASE_PATH=/etc/puppetlabs/code
|
||||
export PATH=${PATH}:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin
|
||||
# Workaround to deploy puppet for beaker jobs
|
||||
sudo -E ln -sfn /opt/puppetlabs/bin/puppet /usr/sbin/puppet
|
||||
fi
|
||||
export PUPPET_BASE_PATH=/etc/puppetlabs/code
|
||||
export PATH=${PATH}:/opt/puppetlabs/bin:/opt/puppetlabs/puppet/bin
|
||||
# Workaround to deploy puppet for beaker jobs
|
||||
sudo -E ln -sfn /opt/puppetlabs/bin/puppet /usr/sbin/puppet
|
||||
|
||||
export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
|
||||
export PUPPETFILE_DIR=${PUPPETFILE_DIR:-${PUPPET_BASE_PATH}/modules}
|
||||
|
@ -17,7 +17,7 @@ export SCRIPT_DIR=$(cd `dirname $0` && pwd -P)
|
||||
source ${SCRIPT_DIR}/functions
|
||||
|
||||
export WORKSPACE=${WORKSPACE:-/tmp}
|
||||
export PUPPET_MAJ_VERSION=${PUPPET_MAJ_VERSION:-3}
|
||||
export PUPPET_MAJ_VERSION=${PUPPET_MAJ_VERSION:-4}
|
||||
export SCENARIO=${SCENARIO:-scenario001}
|
||||
export MANAGE_PUPPET_MODULES=${MANAGE_PUPPET_MODULES:-true}
|
||||
export MANAGE_REPOS=${MANAGE_REPOS:-true}
|
||||
@ -71,10 +71,6 @@ if [ $PUPPET_MAJ_VERSION == 4 ]; then
|
||||
export PUPPET_RELEASE_FILE=puppetlabs-release-pc1
|
||||
export PUPPET_BASE_PATH=/etc/puppetlabs/code
|
||||
export PUPPET_PKG=puppet-agent
|
||||
else
|
||||
export PUPPET_RELEASE_FILE=puppetlabs-release
|
||||
export PUPPET_BASE_PATH=/etc/puppet
|
||||
export PUPPET_PKG=puppet
|
||||
fi
|
||||
|
||||
print_header 'Start (run_tests.sh)'
|
||||
|
Loading…
x
Reference in New Issue
Block a user