Use mirrors to deploy Puppet from Puppetlabs
Change-Id: Ia832c1f8dd27bd1ec919f9156df38a67b4d51cc1
This commit is contained in:
parent
6575bb5f79
commit
83e2127db8
@ -25,8 +25,10 @@ if [ -f /etc/ci/mirror_info.sh ]; then
|
||||
DEPS_MIRROR_HOST="${NODEPOOL_RDO_PROXY}/centos7-master/deps/latest/"
|
||||
if uses_debs; then
|
||||
CEPH_MIRROR_HOST="${CENTOS_MIRROR_HOST}/ceph-deb-luminous"
|
||||
NODEPOOL_PUPPETLABS_MIRROR="http://${NODEPOOL_MIRROR_HOST}/apt-puppetlabs"
|
||||
else
|
||||
CEPH_MIRROR_HOST="${NODEPOOL_BUILDLOGS_CENTOS_PROXY}/centos/7/storage/x86_64/ceph-luminous/"
|
||||
NODEPOOL_PUPPETLABS_MIRROR="http://${NODEPOOL_MIRROR_HOST}/yum-puppetlabs/"
|
||||
fi
|
||||
else
|
||||
CENTOS_MIRROR_HOST='http://mirror.centos.org'
|
||||
@ -35,8 +37,10 @@ else
|
||||
NODEPOOL_UCA_MIRROR='http://ubuntu-cloud.archive.canonical.com/ubuntu'
|
||||
if uses_debs; then
|
||||
CEPH_MIRROR_HOST='https://download.ceph.com/debian-luminous'
|
||||
NODEPOOL_PUPPETLABS_MIRROR='https://apt.puppetlabs.com'
|
||||
else
|
||||
CEPH_MIRROR_HOST='https://buildlogs.centos.org/centos/7/storage/x86_64/ceph-luminous/'
|
||||
NODEPOOL_PUPPETLABS_MIRROR="https://yum.puppetlabs.com/"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
29
files/GPG-KEY-puppet
Normal file
29
files/GPG-KEY-puppet
Normal file
@ -0,0 +1,29 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFe2Iz4BEADqbv/nWmR26bsivTDOLqrfBEvRu9kSfDMzYh9Bmik1A8Z036Eg
|
||||
h5+TZD8Rrd5TErLQ6eZFmQXk9yKFoa9/C4aBjmsL/u0yeMmVb7/66i+x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io1O60slPLOW2XNhdWZJCRWkcXyuumRjoepz7WN
|
||||
1JgsLOTcB7rcQaBP3pDN0O/Om5dlDQ6oYitoJs/F0gfEgwK68Uy8k8sUR+FLLJqM
|
||||
o0CwOg6CeWU4ShAEd1xZxVYW6VOOKlz9x9dvjIVDn2SlTBDmLS99ySlQS57rjGPf
|
||||
GwlRUnuZP4OeSuoFNNJNb9PO6XFSP66eNHFbEpIoBU7phBzwWpTXNsW+kAcY8Rno
|
||||
8GzKR/2FRsxe5Nhfh8xy88U7BA0tqxWdqpk/ym+wDcgHBfSRt0dPFnbaHAiMRlgX
|
||||
J/NPHBQtkoEdQTKA+ICxcNTUMvsPDQgZcU1/ViLMN+6kZaGNDVcPeMgDvqxu0e/T
|
||||
b3uYiId38HYbHmD6rDrOQL/2VPPXbdGbxDGQUgX1DfdOuFXw1hSTilwI1KdXxUXD
|
||||
sCsZbchgliqGcI1l2En62+6pI2x5XQqqiJ7+
|
||||
=HpaX
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
77
files/GPG-KEY-puppetlabs
Normal file
77
files/GPG-KEY-puppetlabs
Normal file
@ -0,0 +1,77 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
Version: GnuPG v1
|
||||
|
||||
mQINBEw3u0ABEAC1+aJQpU59fwZ4mxFjqNCgfZgDhONDSYQFMRnYC1dzBpJHzI6b
|
||||
fUBQeaZ8rh6N4kZ+wq1eL86YDXkCt4sCvNTP0eF2XaOLbmxtV9bdpTIBep9bQiKg
|
||||
5iZaz+brUZlFk/MyJ0Yz//VQ68N1uvXccmD6uxQsVO+gx7rnarg/BGuCNaVtGwy+
|
||||
S98g8Begwxs9JmGa8pMCcSxtC7fAfAEZ02cYyrw5KfBvFI3cHDdBqrEJQKwKeLKY
|
||||
GHK3+H1TM4ZMxPsLuR/XKCbvTyl+OCPxU2OxPjufAxLlr8BWUzgJv6ztPe9imqpH
|
||||
Ppp3KuLFNorjPqWY5jSgKl94W/CO2x591e++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YVmITvsuOOhEQWUb20TJogBVILD+/KeD3BWjwicMXuPVUe5S56Hp677K8u
|
||||
NSsW6HcJU0dzHasQgXPH5fnrrRNttF8yDEulMySRvjDsNCMJSYVAPjIvNnNcDOMQ
|
||||
tz9OCwUZlzeXGjtS7PBfRkSbXlaOt1jC+0xTVMaOMjbp2CTbgrcpvY55ScLJtDWY
|
||||
vHqpXHRoV3bVt4pEb27dK2nwcdel8uH9rOdsJjklq85KE5eA2Crd/T9QiYuPK4W/
|
||||
bvHQdAXF9w==
|
||||
=t3lA
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
19
functions
19
functions
@ -129,9 +129,8 @@ install_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
|
||||
echo "deb ${NODEPOOL_PUPPETLABS_MIRROR} xenial PC1" | $SUDO tee /etc/apt/sources.list.d/puppetlabs.list
|
||||
$SUDO apt-key add files/GPG-KEY-puppetlabs
|
||||
# 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.
|
||||
@ -147,11 +146,19 @@ install_puppet() {
|
||||
if rpm --quiet -q epel-release; then
|
||||
$SUDO rpm -e epel-release
|
||||
fi
|
||||
$SUDO rm -f /tmp/puppet.rpm
|
||||
|
||||
if [ "${MANAGE_REPOS}" == "true" ] ; then
|
||||
wget http://yum.puppetlabs.com/${PUPPET_URL_SUFFIX}${PUPPET_RELEASE_FILE}-el-7.noarch.rpm -O /tmp/puppet.rpm
|
||||
$SUDO rpm -ivh /tmp/puppet.rpm
|
||||
$SUDO rpm --import files/GPG-KEY-puppetlabs
|
||||
$SUDO rpm --import files/GPG-KEY-puppet
|
||||
$SUDO bash -c "cat << EOF > /etc/yum.repos.d/puppetlabs.repo
|
||||
[puppetlabs-products]
|
||||
name=Puppet Labs Products El 7 - x86_64
|
||||
baseurl=${NODEPOOL_PUPPETLABS_MIRROR}/el/7/PC1/x86_64/
|
||||
gpgkey=file:///etc/pki/rpm-gpg/GPG-KEY-puppetlabs
|
||||
file:///etc/pki/rpm-gpg/GPG-KEY-puppet
|
||||
enabled=1
|
||||
gpgcheck=1
|
||||
EOF"
|
||||
fi
|
||||
$SUDO yum install -y ${PUPPET_PKG}
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user