summaryrefslogtreecommitdiff
path: root/scripts/files/elements/ubuntu-guest/extra-data.d
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/files/elements/ubuntu-guest/extra-data.d')
-rwxr-xr-xscripts/files/elements/ubuntu-guest/extra-data.d/15-reddwarf-dep48
-rwxr-xr-xscripts/files/elements/ubuntu-guest/extra-data.d/20-guest-upstart21
-rwxr-xr-xscripts/files/elements/ubuntu-guest/extra-data.d/62-ssh-key31
3 files changed, 0 insertions, 100 deletions
diff --git a/scripts/files/elements/ubuntu-guest/extra-data.d/15-reddwarf-dep b/scripts/files/elements/ubuntu-guest/extra-data.d/15-reddwarf-dep
deleted file mode 100755
index 33b4230..0000000
--- a/scripts/files/elements/ubuntu-guest/extra-data.d/15-reddwarf-dep
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/bin/bash
-
-set -e
-set -o xtrace
-
-# CONTEXT: HOST prior to IMAGE BUILD as SCRIPT USER
-# PURPOSE: Setup the requirements file for use by 15-reddwarf-dep
-
-source $_LIB/die
-
-BRANCH_OVERRIDE=${BRANCH_OVERRIDE:-default}
-ADD_BRANCH=$(basename ${BRANCH_OVERRIDE})
-REQUIREMENTS_FILE=${REDSTACK_SCRIPTS}/files/requirements/ubuntu-requirements-${ADD_BRANCH}.txt
-
-[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set"
-[ -e ${REQUIREMENTS_FILE} ] || die "Requirements not found"
-[ -n "$HOST_USERNAME" ] || die "HOST_USERNAME not set"
-
-sudo -Hiu ${HOST_USERNAME} dd if=${REQUIREMENTS_FILE} of=${TMP_HOOKS_PATH}/requirements.txt
-
-# Grab the upper constraints file, but don't fail if we can't find it.
-# If we are running in the CI environment, $DEST will be set and stackrc
-# will use $DEST/requirements as the location for the requirements repo.
-# Use that as it will help us chain a job with something that is changing UC.
-
-UC_FILE=upper-constraints.txt
-
-if [ -f "${DEST}/requirements/${UC_FILE}" ]; then
- echo "Found ${DEST}/requirements/${UC_FILE}, using that"
- sudo -Hiu ${HOST_USERNAME} dd if="${DEST}/requirements/${UC_FILE}" \
- of="${TMP_HOOKS_PATH}/${UC_FILE}"
-else
- UC_DIR=$(pwd)
- UC_BRANCH=${BRANCH_OVERRIDE}
- if [ "${ADD_BRANCH}" == "default" ]; then
- UC_BRANCH=master
- fi
-
- set +e
- curl -o "${UC_DIR}/${UC_FILE}" \
- https://git.openstack.org/cgit/openstack/requirements/plain/${UC_FILE}?h=${UC_BRANCH}
- set -e
-
- if [ -f "${UC_DIR}/${UC_FILE}" ]; then
- sudo -Hiu ${HOST_USERNAME} dd if="${UC_DIR}/${UC_FILE}" of=${TMP_HOOKS_PATH}/${UC_FILE}
- rm -f "${UC_DIR}/${UC_FILE}"
- fi
-fi
diff --git a/scripts/files/elements/ubuntu-guest/extra-data.d/20-guest-upstart b/scripts/files/elements/ubuntu-guest/extra-data.d/20-guest-upstart
deleted file mode 100755
index 2b22159..0000000
--- a/scripts/files/elements/ubuntu-guest/extra-data.d/20-guest-upstart
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/bash
-
-set -e
-set -o xtrace
-
-# CONTEXT: HOST prior to IMAGE BUILD as SCRIPT USER
-# PURPOSE: stages the bootstrap file and upstart conf file while replacing variables so that guest image is properly
-# configured
-
-source $_LIB/die
-
-[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set"
-
-[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image"
-[ -n "${HOST_SCP_USERNAME}" ] || die "HOST_SCP_USERNAME needs to be set to the user for the host instance"
-[ -n "${CONTROLLER_IP}" ] || die "CONTROLLER_IP needs to be set to the ip address that guests will use to contact the controller"
-[ -n "${ESCAPED_PATH_TROVE}" ] || die "ESCAPED_PATH_TROVE needs to be set to the path to the trove directory on the redstack host"
-[ -n "${REDSTACK_SCRIPTS}" ] || die "REDSTACK_SCRIPTS needs to be set to the trove-integration scripts dir"
-[ -n "${ESCAPED_GUEST_LOGDIR}" ] || die "ESCAPED_GUEST_LOGDIR must be set to the escaped guest log dir"
-
-sed "s/GUEST_USERNAME/${GUEST_USERNAME}/g;s/GUEST_LOGDIR/${ESCAPED_GUEST_LOGDIR}/g;s/HOST_SCP_USERNAME/${HOST_SCP_USERNAME}/g;s/CONTROLLER_IP/${CONTROLLER_IP}/g;s/PATH_TROVE/${ESCAPED_PATH_TROVE}/g" ${REDSTACK_SCRIPTS}/files/trove-guest.upstart.conf > ${TMP_HOOKS_PATH}/trove-guest.conf
diff --git a/scripts/files/elements/ubuntu-guest/extra-data.d/62-ssh-key b/scripts/files/elements/ubuntu-guest/extra-data.d/62-ssh-key
deleted file mode 100755
index 63453a7..0000000
--- a/scripts/files/elements/ubuntu-guest/extra-data.d/62-ssh-key
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-set -e
-set -o xtrace
-
-# CONTEXT: HOST prior to IMAGE BUILD as SCRIPT USER
-# PURPOSE: creates the SSH key on the host if it doesn't exist. Then this copies the keys over to a staging area where
-# they will be duplicated in the guest VM.
-# This process allows the host to log into the guest but more importantly the guest phones home to get the trove
-# source
-
-source $_LIB/die
-
-[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set"
-
-[ -n "${HOST_USERNAME}" ] || die "HOST_USERNAME needs to be set to the user for the current user on the host"
-
-if [ `whoami` = "root" ]; then
- die "This should not be run as root"
-fi
-
-# copy files over the "staging" area for the guest image (they'll later be put in the correct location by the guest user
-# not these keys should not be overridden otherwise a) you won't be able to ssh in and b) the guest won't be able to
-# rsync the files
-if [ -e ${SSH_DIR}/authorized_keys ]; then
- sudo -Hiu ${HOST_USERNAME} dd if=${SSH_DIR}/authorized_keys of=${TMP_HOOKS_PATH}/ssh-authorized-keys
- sudo -Hiu ${HOST_USERNAME} dd if=${SSH_DIR}/id_rsa of=${TMP_HOOKS_PATH}/id_rsa
- sudo -Hiu ${HOST_USERNAME} dd if=${SSH_DIR}/id_rsa.pub of=${TMP_HOOKS_PATH}/id_rsa.pub
-else
- die "SSH Authorized Keys file must exist along with pub and private key"
-fi