Stop installing and running puppet in node builds
Move non-puppet-related parts of the puppet element into other elements, remove the puppet element, and stop running the prepare-node script. \o/ Change-Id: Ib241ea976ca0a3d661599f36e3f5a2d4eb023c08
This commit is contained in:
parent
b0e55c306b
commit
0d55fc765d
@ -17,7 +17,6 @@ rsyslog:
|
||||
git:
|
||||
rsync:
|
||||
parted:
|
||||
puppet:
|
||||
wget:
|
||||
iputils-ping:
|
||||
dnsutils:
|
||||
@ -26,3 +25,4 @@ iptables:
|
||||
centos-release-openstack-ocata:
|
||||
redhat-rpm-config:
|
||||
redhat-lsb-core:
|
||||
curl:
|
||||
|
@ -10,6 +10,7 @@
|
||||
"gentoo": {
|
||||
"build-essential": "",
|
||||
"cron": "sys-process/cronie",
|
||||
"curl": "net-misc/curl",
|
||||
"ntp": "net-misc/ntp",
|
||||
"python-dev": "",
|
||||
"python3-dev": "",
|
||||
@ -38,7 +39,6 @@
|
||||
"git": "git-core",
|
||||
"iputils-ping": "iputils",
|
||||
"ntpdate": "",
|
||||
"puppet": "ruby2.1-rubygem-puppet",
|
||||
"python-dev": "python-devel",
|
||||
"python3-dev": "python3-devel",
|
||||
"iptables": "iptables SuSEfirewall2",
|
||||
@ -46,6 +46,7 @@
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"curl": "curl",
|
||||
"iptables": "iptables-persistent",
|
||||
"gentoolkit": "",
|
||||
"centos-release-openstack-ocata": "",
|
||||
|
@ -1,5 +1,4 @@
|
||||
jenkins-slave
|
||||
package-installs
|
||||
pip-and-virtualenv
|
||||
puppet
|
||||
zuul-worker
|
||||
|
@ -1,4 +1,3 @@
|
||||
cache-url
|
||||
prepare-node
|
||||
puppet
|
||||
source-repositories
|
||||
|
@ -1,2 +1 @@
|
||||
nodepool-base
|
||||
puppet
|
||||
|
@ -21,9 +21,5 @@ if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||
fi
|
||||
set -e
|
||||
|
||||
export SUDO='true'
|
||||
|
||||
prepare-node
|
||||
|
||||
mkdir -p ~jenkins/cache/files
|
||||
mkdir -p ~jenkins/cache/pip
|
||||
|
@ -1 +0,0 @@
|
||||
Bootstrap puppet on a node
|
@ -1,59 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2011-2013 OpenStack Foundation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
#
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# dib-lint: disable=setu setpipefail dibdebugtrace indent
|
||||
set -e
|
||||
|
||||
SUDO=${SUDO:-true}
|
||||
|
||||
if [ -n "$NODEPOOL_SSH_KEY" ] ; then
|
||||
puppet_ssh_key="ssh_key => '$NODEPOOL_SSH_KEY',"
|
||||
else
|
||||
puppet_ssh_key=""
|
||||
fi
|
||||
|
||||
export FACTER_in_chroot=true
|
||||
cat >/tmp/local.pp <<EOF
|
||||
Service {
|
||||
start => '/bin/true',
|
||||
stop => '/bin/true',
|
||||
status => '/bin/true',
|
||||
restart => '/bin/true'
|
||||
}
|
||||
class {'openstack_project::single_use_slave':
|
||||
sudo => $SUDO,
|
||||
$puppet_ssh_key
|
||||
}
|
||||
EOF
|
||||
|
||||
# Puppet doesn't return nonzero if some things fail by default.
|
||||
# Use detailed exit codes to get that info and determine whether
|
||||
# the return code indicates failure.
|
||||
set +e
|
||||
puppet apply --detailed-exitcodes --color=false \
|
||||
--modulepath=/opt/build_git/openstack-infra/system-config/modules:/etc/puppet/modules \
|
||||
/tmp/local.pp
|
||||
PUPPET_RETURN=$?
|
||||
if [ "$PUPPET_RETURN" -eq 4 ] || [ "$PUPPET_RETURN" -eq 6 ] ; then
|
||||
exit $PUPPET_RETURN
|
||||
fi
|
||||
set -e
|
||||
|
||||
# Make sure resolv.conf settings don't break dib
|
||||
if [ -n "$NODEPOOL_STATIC_NAMESERVER_V4" ] ; then
|
||||
echo "nameserver $NODEPOOL_STATIC_NAMESERVER_V4"> /etc/resolv.conf
|
||||
fi
|
@ -1,4 +0,0 @@
|
||||
cache-url
|
||||
openstack-repos
|
||||
package-installs
|
||||
source-repositories
|
@ -1,30 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2011-2013 OpenStack Foundation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
#
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# dib-lint: disable=setu setpipefail
|
||||
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
# Unset the download cache for this invocation to prevent bleed from build host
|
||||
unset PIP_DOWNLOAD_CACHE
|
||||
|
||||
SETUP_PIP=false /bin/bash /opt/build_git/openstack-infra/system-config/install_puppet.sh
|
||||
/bin/bash /opt/build_git/openstack-infra/system-config/install_modules.sh
|
||||
|
||||
install -m 0755 -o root -g root $(dirname $0)/../bin/prepare-node /usr/local/bin
|
@ -1,60 +0,0 @@
|
||||
#!/bin/bash
|
||||
# Copyright (C) 2011-2013 OpenStack Foundation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
#
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Remove additional sources used to install puppet or special version of pypi.
|
||||
# We do this because leaving these sources in place causes every test that
|
||||
# does an apt-get update to hit those servers which may not have the uptime
|
||||
# of our local mirrors.
|
||||
|
||||
# dib-lint: disable=sete setu setpipefail
|
||||
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
|
||||
set -x
|
||||
fi
|
||||
set -e
|
||||
|
||||
OS_FAMILY=$(facter osfamily)
|
||||
|
||||
case $OS_FAMILY in
|
||||
"Debian")
|
||||
repo=/etc/apt/sources.list.d/puppetlabs.list
|
||||
update="apt-get update"
|
||||
;;
|
||||
"RedHat")
|
||||
repo=/etc/yum.repos.d/puppetlabs.repo
|
||||
# yum/dnf will notice this is gone, so don't need to spend
|
||||
# time updating.
|
||||
update=""
|
||||
;;
|
||||
"Gentoo")
|
||||
# make a fake repo to satisfy the removal below
|
||||
touch /tmp/fakerepo
|
||||
repo=/tmp/fakerepo
|
||||
update=""
|
||||
;;
|
||||
"Suse")
|
||||
repo=/etc/zypp/repos.d/systemsmanagement_puppet.repo
|
||||
update=""
|
||||
;;
|
||||
*)
|
||||
die "Don't know how to cleanup!"
|
||||
;;
|
||||
esac
|
||||
|
||||
rm -f $repo
|
||||
$update
|
||||
|
||||
rm /usr/local/bin/prepare-node
|
@ -1 +0,0 @@
|
||||
curl:
|
@ -1,10 +0,0 @@
|
||||
{
|
||||
"family": {
|
||||
"gentoo": {
|
||||
"curl": "net-misc/curl"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"curl": "curl"
|
||||
}
|
||||
}
|
@ -869,7 +869,6 @@ diskimages:
|
||||
- openstack-repos
|
||||
- nodepool-base
|
||||
- cache-devstack
|
||||
- puppet
|
||||
- cache-bindep
|
||||
- growroot
|
||||
- infra-package-needs
|
||||
@ -891,7 +890,6 @@ diskimages:
|
||||
- nodepool-base
|
||||
- cache-devstack
|
||||
- initialize-urandom
|
||||
- puppet
|
||||
- cache-bindep
|
||||
- growroot
|
||||
- infra-package-needs
|
||||
|
Loading…
Reference in New Issue
Block a user