Browse Source

Restore blank nodepool/scripts

I was a little too hasty in I76acbd08acda20c88ff9fd9148e3918b78d6c6c6
removing the scripts/ directory.  It has broken the puppeting of old
hosts.

Restore the directory with a blank file explaining the situation.

Also, we don't need to copy this in the nodepool elements; remove that.

Change-Id: I8b82950237ef69c4941866900cac9bda42f58ca2
changes/00/710900/1
Ian Wienand 1 year ago
parent
commit
67cbecdfb4
  1. 7
      nodepool/elements/nodepool-base/README.rst
  2. 39
      nodepool/elements/nodepool-base/extra-data.d/99-copy-nodepool-scripts
  3. 17
      nodepool/scripts/do-not-delete.txt

7
nodepool/elements/nodepool-base/README.rst

@ -4,13 +4,6 @@ nodepool-base
Tasks to deal with image metadata and other Nodepool cloud specific tweaks.
Environment variables:
``NODEPOOL_SCRIPTDIR`` path to copy Nodepool scripts from. It is set
automatically by Nodepool. For local hacking override it to where your scripts
are. Default:
``$TMP_MOUNT_PATH/opt/git/opendev.org/openstack/project-config/nodepool/scripts``.
Name resolution
---------------

39
nodepool/elements/nodepool-base/extra-data.d/99-copy-nodepool-scripts

@ -1,39 +0,0 @@
#!/bin/bash
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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.
# Copy the nodepools scripts into the image
# This is 99 because it needs to depend on source-repositories having been
# run, because the default fallthrough location for the nodepool scripts
# is the git repo that's been cloned into the image.
# During a nodepool run, it's expected that NODEPOOL_SCRIPTDIR is set, in
# which case ordering doesn't matter - but for a developer hacking locally
# who is not hacking on those scripts, it's an imposition to make them
# set an env var.
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
NODEPOOL_SCRIPTDIR=${NODEPOOL_SCRIPTDIR:-$TMP_MOUNT_PATH/opt/git/opendev.org/openstack/project-config/nodepool/scripts}
sudo cp -a $NODEPOOL_SCRIPTDIR $TMP_MOUNT_PATH/opt/nodepool-scripts
sudo chmod -R a+rx $TMP_MOUNT_PATH/opt/nodepool-scripts

17
nodepool/scripts/do-not-delete.txt

@ -0,0 +1,17 @@
2020-03-03
==========
The nodepool/scripts directory is empty and we no longer keep anything
in here.
This used to be used in the days of "snapshot images"; when we would
boot an upstream image from cloud providers, run a series of scripts
on it and then snapshot that image for use during CI. This directory
would have customisation scripts to run.
Now we build daily images with dib and upload them and this is unused.
However, the directory remains important as a range of puppet things
try to deploy it as configuration. Once all the puppet parts of
puppet-<openstackci|nodepool|project-config> have been removed, we can
remove this directory.
Loading…
Cancel
Save