Merge "Stop installing and running puppet in node builds"

This commit is contained in:
Jenkins 2017-05-01 13:55:28 +00:00 committed by Gerrit Code Review
commit 91bacb3c5e
16 changed files with 3 additions and 176 deletions

View File

@ -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:

View File

@ -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": "",

View File

@ -1,5 +1,4 @@
jenkins-slave
package-installs
pip-and-virtualenv
puppet
zuul-worker

View File

@ -1,4 +1,3 @@
cache-url
prepare-node
puppet
source-repositories

View File

@ -1,2 +1 @@
nodepool-base
puppet

View File

@ -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

View File

@ -1 +0,0 @@
Bootstrap puppet on a node

View File

@ -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

View File

@ -1,4 +0,0 @@
cache-url
openstack-repos
package-installs
source-repositories

View File

@ -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

View File

@ -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

View File

@ -1 +0,0 @@
curl:

View File

@ -1,10 +0,0 @@
{
"family": {
"gentoo": {
"curl": "net-misc/curl"
}
},
"default": {
"curl": "curl"
}
}

View File

@ -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