From ac447cba1d7162867004895c959b1c422bca8372 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 27 Feb 2018 21:36:16 +0100 Subject: [PATCH] Get rid of Jenkins slave scripts We don't run Jenkins anymore, so can remove the jenkins-slave scripts. Depends-On: https://review.openstack.org/#/c/514485 Change-Id: I645e3739d29eec17bc3cf5c4367559a71f456be8 --- .../extra-data.d/20-jenkins-user | 20 ------- .../jenkins-slave/install.d/20-jenkins-slave | 53 ------------------- 2 files changed, 73 deletions(-) delete mode 100755 nodepool/elements/jenkins-slave/extra-data.d/20-jenkins-user delete mode 100755 nodepool/elements/jenkins-slave/install.d/20-jenkins-slave diff --git a/nodepool/elements/jenkins-slave/extra-data.d/20-jenkins-user b/nodepool/elements/jenkins-slave/extra-data.d/20-jenkins-user deleted file mode 100755 index b8df4b348d..0000000000 --- a/nodepool/elements/jenkins-slave/extra-data.d/20-jenkins-user +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# TODO(pabelanger): Once we complete remove puppet from our diskimages, we -# should also remove our default SSH key. Since only 3rdparty CI system would be -# using this element moving forward, it doesn't make sense to bake in our -# default key. -NODEPOOL_SSH_KEY=${NODEPOOL_SSH_KEY:-AAAAB3NzaC1yc2EAAAADAQABAAABAQC6WutNHfM+YdnjeNFeaIpvxqt+9aDn95Ykpmc+fASSjlDZJtOrueH3ch/v08wkE4WQKg03i+t8VonqEwMGmApYA3VzFsURUQbxzlSz5kHlBQSqgz5JTwUmnt1RH5sePL5pkuJ6JgqJ8PxJod6fiD7YDjaKJW/wBzXGnGg2EkgqrkBQXYL4hyaPuSwsQF0Gdwg3QFqXl+R/GrM6FscUkkJzbjqGKI2GhLT8mf2BIMEAiMFhF5Wl4FFrbvhTfPfW+9VdcsiMxCXaxp00n1x1+Y7OqR5AZ/id0Lkz9ZoFVGS901OB/L4xXrvUtI2y+kIYeF6hxfmAl/zhY0eWzwo9lDPz} - -if [ -z $NODEPOOL_SSH_KEY ]; then - die "Can not find public key for jenkins user!" -fi - -# save the public key inside the chroot -echo "ssh-rsa $NODEPOOL_SSH_KEY" > $TMP_HOOKS_PATH/jenkins-user-ssh-public-key diff --git a/nodepool/elements/jenkins-slave/install.d/20-jenkins-slave b/nodepool/elements/jenkins-slave/install.d/20-jenkins-slave deleted file mode 100755 index 1c133750b1..0000000000 --- a/nodepool/elements/jenkins-slave/install.d/20-jenkins-slave +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# Add jenkins user and group. Note we don't want to rely on -# "useradd"'s group adding behaviour, because it might differ across -# distros. -groupadd jenkins -useradd -g jenkins -m jenkins -s /bin/bash - -# a lot of caching happens in extra-data.d (for "historical" reasons). -# We've put the cache stuff into /opt/cache/files, but again, for -# "historical" reasons, ensure this is available in /home/jenkins -# -# Check if the cache exists as we don't have a strict dependency on the -# devstack-cache element. This allows you to build an image without -# incurring the cost of caching all the things. -if [ -d /opt/cache/files ] ; then - mkdir -p /home/jenkins/cache - ln -sf /opt/cache/files /home/jenkins/cache/files - chown -R jenkins:jenkins /opt/cache/files - # but make sure the cache is readable by everyone - chmod -R a+rX /opt/cache/files/* -fi - -# this was copied from outside the chroot by extras.d -_pub_key=/tmp/in_target.d/jenkins-user-ssh-public-key -if [ ! -f $_pub_key ]; then - die "Can not find Jenkins public key!" -fi - -mkdir -p /home/jenkins/.ssh -chmod 700 /home/jenkins/.ssh - -cp $_pub_key /home/jenkins/.ssh/authorized_keys -chmod 644 /home/jenkins/.ssh/authorized_keys - -cat > /home/jenkins/.gitconfig <