diff options
Diffstat (limited to 'scripts/files')
95 files changed, 0 insertions, 2145 deletions
diff --git a/scripts/files/elements/apt-conf-dir/README.rst b/scripts/files/elements/apt-conf-dir/README.rst deleted file mode 100644 index c94e00e..0000000 --- a/scripts/files/elements/apt-conf-dir/README.rst +++ /dev/null @@ -1,16 +0,0 @@ -============ -apt-conf-dir -============ - -This element overrides the default apt.conf.d directory for APT based systems. - -Environment Variables ---------------------- - -DIB_APT_CONF_DIR: - :Required: No - :Default: None - :Description: To override `DIB_APT_CONF_DIR`, set it to the path to your - apt.conf.d. The new apt.conf.d will take effect at build time - and run time. - :Example: ``DIB_APT_CONF_DIR=/etc/apt/apt.conf`` diff --git a/scripts/files/elements/apt-conf-dir/extra-data.d/99-use-host-apt-confd b/scripts/files/elements/apt-conf-dir/extra-data.d/99-use-host-apt-confd deleted file mode 100755 index e286d68..0000000 --- a/scripts/files/elements/apt-conf-dir/extra-data.d/99-use-host-apt-confd +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# Override the default /etc/apt/apt.conf.d directory with $DIB_APT_CONF_DIR - -if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then - set -x -fi -set -eu -set -o pipefail - -# exit directly if DIB_APT_CONF_DIR is not defined properly -if [ -z "${DIB_APT_CONF_DIR:-}" ] ; then - echo "DIB_APT_CONF_DIR is not set - no apt.conf.d will be copied in" - exit 0 -elif [ ! -d "$DIB_APT_CONF_DIR" ] ; then - echo "$DIB_APT_CONF_DIR is not a valid apt.conf.d directory." - echo "You should assign a proper apt.conf.d directory in DIB_APT_CONF_DIR" - exit 1 -fi - -# copy the apt.conf to cloudimg -sudo cp -L -f -R $DIB_APT_CONF_DIR $TMP_MOUNT_PATH/etc/apt diff --git a/scripts/files/elements/fedora-guest/extra-data.d/15-reddwarf-dep b/scripts/files/elements/fedora-guest/extra-data.d/15-reddwarf-dep deleted file mode 100755 index 97a5e43..0000000 --- a/scripts/files/elements/fedora-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/fedora-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/fedora-guest/extra-data.d/20-guest-systemd b/scripts/files/elements/fedora-guest/extra-data.d/20-guest-systemd deleted file mode 100755 index 960342e..0000000 --- a/scripts/files/elements/fedora-guest/extra-data.d/20-guest-systemd +++ /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.systemd.conf > ${TMP_HOOKS_PATH}/trove-guest.service diff --git a/scripts/files/elements/fedora-guest/extra-data.d/62-ssh-key b/scripts/files/elements/fedora-guest/extra-data.d/62-ssh-key deleted file mode 100755 index 63453a7..0000000 --- a/scripts/files/elements/fedora-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 diff --git a/scripts/files/elements/fedora-guest/install.d/15-reddwarf-dep b/scripts/files/elements/fedora-guest/install.d/15-reddwarf-dep deleted file mode 100755 index 98fb24b..0000000 --- a/scripts/files/elements/fedora-guest/install.d/15-reddwarf-dep +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu - -set -e -set -o xtrace - -dnf install -y python-devel libxml2-devel libxslt-devel python-setuptools \ - python-sqlalchemy python-lxml \ - python-routes python-eventlet python-webob \ - python-kombu python-paste-deploy python-paste python-netaddr \ - python-httplib2 python-iso8601 python-pip python-mysql \ - python-migrate python-anyjson gcc python-pexpect - -# pick up the requirements file left for us by -# extra-data.d/15-reddwarf-dep - -TMP_HOOKS_DIR="/tmp/in_target.d" - -UPPER_CONSTRAINTS= -if [ -f ${TMP_HOOKS_DIR}/upper-constraints.txt ]; then - UPPER_CONSTRAINTS=" -c ${TMP_HOOKS_DIR}/upper-constraints.txt" -fi - -pip install -q --upgrade -r ${TMP_HOOKS_DIR}/requirements.txt ${UPPER_CONSTRAINTS} - -echo "diagnostic pip freeze output follows" -pip freeze -echo "diagnostic pip freeze output above" diff --git a/scripts/files/elements/fedora-guest/install.d/20-etc b/scripts/files/elements/fedora-guest/install.d/20-etc deleted file mode 100755 index bec065e..0000000 --- a/scripts/files/elements/fedora-guest/install.d/20-etc +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: take "staged" trove-guest.conf file and put it in the init directory on guest image - -dd if=/tmp/in_target.d/trove-guest.service of=/usr/lib/systemd/system/trove-guest.service - -systemctl enable trove-guest.service diff --git a/scripts/files/elements/fedora-guest/install.d/50-user b/scripts/files/elements/fedora-guest/install.d/50-user deleted file mode 100755 index a4b666b..0000000 --- a/scripts/files/elements/fedora-guest/install.d/50-user +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Add the guest image user that will own the trove agent source...if the user does not already exist - -set -e -set -o xtrace - -# Difference from apt, -G admin option -if ! id -u ${GUEST_USERNAME} >/dev/null 2>&1; then - echo "Adding ${GUEST_USERNAME} user" - useradd -m ${GUEST_USERNAME} -s /bin/bash - passwd ${GUEST_USERNAME} <<_EOF_ -${GUEST_USERNAME} -${GUEST_USERNAME} -_EOF_ -fi
\ No newline at end of file diff --git a/scripts/files/elements/fedora-guest/install.d/62-ssh-key b/scripts/files/elements/fedora-guest/install.d/62-ssh-key deleted file mode 100755 index 80c1e65..0000000 --- a/scripts/files/elements/fedora-guest/install.d/62-ssh-key +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: take "staged" ssh keys (see extra-data.d/62-ssh-key) and put them in the GUEST_USERS home directory - -set -e -set -o xtrace - -SSH_DIR="/home/${GUEST_USERNAME}/.ssh" -TMP_HOOKS_DIR="/tmp/in_target.d" - -if [ -e "${TMP_HOOKS_DIR}/ssh-authorized-keys" ]; then - if [ ! -e ${SSH_DIR} ]; then - # this method worked more reliable in vmware fusion over doing sudo -Hiu ${GUEST_USERNAME} - mkdir ${SSH_DIR} - chown ${GUEST_USERNAME}:${GUEST_USERNAME} ${SSH_DIR} - fi - sudo -Hiu ${GUEST_USERNAME} dd of=${SSH_DIR}/authorized_keys conv=notrunc if=${TMP_HOOKS_DIR}/ssh-authorized-keys - sudo -Hiu ${GUEST_USERNAME} chmod 600 ${SSH_DIR}/authorized_keys - if [ ! -e "${SSH_DIR}/id_rsa" ]; then - sudo -Hiu ${GUEST_USERNAME} dd of=${SSH_DIR}/id_rsa if=${TMP_HOOKS_DIR}/id_rsa - # perms have to be right on this file for ssh to work - sudo -Hiu ${GUEST_USERNAME} chmod 600 ${SSH_DIR}/id_rsa - sudo -Hiu ${GUEST_USERNAME} dd of=${SSH_DIR}/id_rsa.pub if=${TMP_HOOKS_DIR}/id_rsa.pub - fi -else - echo "SSH Keys were not staged by host" - exit -1 -fi diff --git a/scripts/files/elements/fedora-guest/post-install.d/05-ipforwarding b/scripts/files/elements/fedora-guest/post-install.d/05-ipforwarding deleted file mode 100755 index 4824cfc..0000000 --- a/scripts/files/elements/fedora-guest/post-install.d/05-ipforwarding +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -e -set -o xtrace -sed -i -r 's/^\s*#(net\.ipv4\.ip_forward=1.*)/\1/' /etc/sysctl.conf -echo 1 > /proc/sys/net/ipv4/ip_forward diff --git a/scripts/files/elements/fedora-guest/post-install.d/62-trove-guest-sudoers b/scripts/files/elements/fedora-guest/post-install.d/62-trove-guest-sudoers deleted file mode 100755 index 0581fd2..0000000 --- a/scripts/files/elements/fedora-guest/post-install.d/62-trove-guest-sudoers +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e -set -o xtrace - -# CONTEXT: HOST after IMAGE BUILD as SCRIPT USER -# PURPOSE: add the guest user account to the /etc/sudoers files with NOPASSWD - -# Adds user to the sudoers file so they can do everything w/o a pass -# Some binaries might be under /sbin or /usr/sbin, so make sure sudo will -# see them by forcing PATH -TEMPFILE=`mktemp` -echo "${GUEST_USERNAME} ALL=(ALL) NOPASSWD:ALL" > $TEMPFILE -chmod 0440 $TEMPFILE -sudo chown root:root $TEMPFILE -sudo mv $TEMPFILE /etc/sudoers.d/60_trove_guest diff --git a/scripts/files/elements/fedora-guest/post-install.d/90-yum-update b/scripts/files/elements/fedora-guest/post-install.d/90-yum-update deleted file mode 100755 index cd2992c..0000000 --- a/scripts/files/elements/fedora-guest/post-install.d/90-yum-update +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST after packages installed -# PURPOSE: do dnf update to save each instance having to do all the work - -set -e -set -o xtrace - -dnf -y update diff --git a/scripts/files/elements/fedora-mariadb/README.md b/scripts/files/elements/fedora-mariadb/README.md deleted file mode 100644 index 757f00b..0000000 --- a/scripts/files/elements/fedora-mariadb/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Sets up a MariaDB server install in the image. - -TODO: auto-tune settings based on host resources or metadata service. diff --git a/scripts/files/elements/fedora-mariadb/install.d/10-mariadb b/scripts/files/elements/fedora-mariadb/install.d/10-mariadb deleted file mode 100755 index a5cc2c0..0000000 --- a/scripts/files/elements/fedora-mariadb/install.d/10-mariadb +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -dnf -y install mariadb-server percona-xtrabackup diff --git a/scripts/files/elements/fedora-mariadb/pre-install.d/10-percona-copr b/scripts/files/elements/fedora-mariadb/pre-install.d/10-percona-copr deleted file mode 100755 index bcc5520..0000000 --- a/scripts/files/elements/fedora-mariadb/pre-install.d/10-percona-copr +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during PRE-CONSTRUCTION as ROOT -# PURPOSE: Setup COPR Percona repository - -set -e -set -o xtrace - -# install from Fedora repos -dnf -y install percona-xtrabackup diff --git a/scripts/files/elements/fedora-mongodb/README.md b/scripts/files/elements/fedora-mongodb/README.md deleted file mode 100644 index 2518abf..0000000 --- a/scripts/files/elements/fedora-mongodb/README.md +++ /dev/null @@ -1 +0,0 @@ -Sets up a MongoDB install in the image.
\ No newline at end of file diff --git a/scripts/files/elements/fedora-mongodb/install.d/10-mongodb b/scripts/files/elements/fedora-mongodb/install.d/10-mongodb deleted file mode 100755 index 3b53a18..0000000 --- a/scripts/files/elements/fedora-mongodb/install.d/10-mongodb +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -cat > "/etc/rc.local" << _EOF_ -# Make sure to disable Linux kernel feature transparent huge pages, -# it will affect greatly both memory usage and latency in a negative way. -# See: http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/ -if test -f /sys/kernel/mm/redhat_transparent_hugepage/defrag; then - echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag -fi -if test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then - echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled -fi - -exit \$? - -_EOF_ - -dnf -y install mongodb-server diff --git a/scripts/files/elements/fedora-mongodb/install.d/25-trove-mongo-dep b/scripts/files/elements/fedora-mongodb/install.d/25-trove-mongo-dep deleted file mode 100755 index a3e2633..0000000 --- a/scripts/files/elements/fedora-mongodb/install.d/25-trove-mongo-dep +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu - -set -e -set -o xtrace - -pip install pymongo>=3.0.2,!=3.1 diff --git a/scripts/files/elements/fedora-mysql/README.md b/scripts/files/elements/fedora-mysql/README.md deleted file mode 100644 index 39a6ab8..0000000 --- a/scripts/files/elements/fedora-mysql/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Sets up a MySQL server install in the image. - -TODO: auto-tune settings based on host resources or metadata service. diff --git a/scripts/files/elements/fedora-mysql/install.d/10-mysql b/scripts/files/elements/fedora-mysql/install.d/10-mysql deleted file mode 100755 index ff7efa3..0000000 --- a/scripts/files/elements/fedora-mysql/install.d/10-mysql +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -dnf -y install https://repo.mysql.com/mysql-community-release-fc22.rpm -dnf -y install mysql-community-server - -# move the config dir for now but leave /etc/my.cnf alone -# ln -s creates problems for the systemd script -mkdir /etc/mysql -mv /etc/my.cnf.d /etc/mysql/conf.d -chown -R mysql:mysql /etc/mysql diff --git a/scripts/files/elements/fedora-mysql/install.d/40-xtrabackup b/scripts/files/elements/fedora-mysql/install.d/40-xtrabackup deleted file mode 100755 index 9c9709c..0000000 --- a/scripts/files/elements/fedora-mysql/install.d/40-xtrabackup +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -dnf -y install percona-xtrabackup - diff --git a/scripts/files/elements/fedora-mysql/post-install.d/30-register-mysql-service b/scripts/files/elements/fedora-mysql/post-install.d/30-register-mysql-service deleted file mode 100644 index a7db5d9..0000000 --- a/scripts/files/elements/fedora-mysql/post-install.d/30-register-mysql-service +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -set -e -set -o xtrace - -# DO NOT enable or start mysqld for systemd, let the guestagent coordinate startup diff --git a/scripts/files/elements/fedora-percona/install.d/05-percona-server b/scripts/files/elements/fedora-percona/install.d/05-percona-server deleted file mode 100755 index 9c43c6e..0000000 --- a/scripts/files/elements/fedora-percona/install.d/05-percona-server +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during PRE-CONSTRUCTION as ROOT -# PURPOSE: Setup apt-repo list so that we can connect to Percona's repo - -set -e -set -o xtrace - -curl -o /etc/pki/rpm-gpg/RPM-GPG-KEY-percona http://www.percona.com/downloads/RPM-GPG-KEY-percona -cat <<EOL > /etc/yum.repos.d/Percona.repo -[percona] -name = CentOS \$releasever - Percona -baseurl=http://repo.percona.com/centos/latest/os/\$basearch/ -enabled = 1 -gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-percona -gpgcheck = 1 -EOL
\ No newline at end of file diff --git a/scripts/files/elements/fedora-percona/install.d/10-mysql b/scripts/files/elements/fedora-percona/install.d/10-mysql deleted file mode 100755 index 284e81a..0000000 --- a/scripts/files/elements/fedora-percona/install.d/10-mysql +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -# The fix to make versions of percona-xtrabackup > v2.2 work with Trove -# was put into the mysql guestagent code for Mitaka. There are no current -# plans to backport so we need to make sure the guest generated when the -# tests are run for Kilo or Liberty get the 2.2 verson of PXB -if [[ $BRANCH_OVERRIDE == "stable/kilo" || $BRANCH_OVERRIDE == "stable/liberty" ]]; then - PXB_VERSION_OVERRIDE="-22" -fi -dnf -y install percona-toolkit Percona-Server-shared-55 Percona-Server-server-55 Percona-Server-test-55 Percona-Server-client-55 percona-xtrabackup${PXB_VERSION_OVERRIDE} diff --git a/scripts/files/elements/fedora-postgresql/install.d/10-postgresql b/scripts/files/elements/fedora-postgresql/install.d/10-postgresql deleted file mode 100755 index a2ee463..0000000 --- a/scripts/files/elements/fedora-postgresql/install.d/10-postgresql +++ /dev/null @@ -1,83 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -cat > "/etc/sysctl.d/10-postgresql-performance.conf" << _EOF_ -# See 'http://www.postgresql.org/docs/9.3/static/kernel-resources.html' -# for best practices. -# It is recommended to disable memory overcommit, -# but the Python interpreter may require it on smaller flavors. -# We therefore stick with the heuristic overcommit setting. -vm.overcommit_memory=0 - -_EOF_ - -cat > "/etc/rc.local" << _EOF_ -# See 'http://www.postgresql.org/docs/9.3/static/kernel-resources.html' -# Disable Linux kernel transparent huge pages. This feature is not supported by -# by Postgres 9.3 and may negatively impact performance of the database. -if test -f /sys/kernel/mm/redhat_transparent_hugepage/defrag; then - echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag -fi -if test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then - echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled -fi - -exit \$? - -_EOF_ - -dnf install -y http://yum.postgresql.org/9.4/fedora/fedora-22-x86_64/pgdg-fedora94-9.4-4.noarch.rpm - -dnf install -y postgresql94-server postgresql94-contrib postgresql94-devel gcc - -########################################### -# Hack alert: -# For Postgresql 9.4, pg_rewind is not in the main source tree and -# no packages exist in the repos, so it must be compiled manually -# and installed on the image until we can move to 9.5 -# See README at -# https://github.com/vmware/pg_rewind/tree/REL9_4_STABLE - -dev_pkgs="readline-devel zlib-devel krb5-devel openssl-devel pam-devel libxml2-devel libxslt-devel" - -yum install -y $dev_pkgs - -# We need pg_config to be accessible on the path -mkdir -p /tmp/build -cd /tmp/build -git clone https://github.com/vmware/pg_rewind.git --branch REL9_4_STABLE -git clone https://github.com/postgres/postgres.git --branch REL9_4_STABLE - -ln -s /usr/pgsql-9.4/bin/pg_config /usr/bin/pg_config - -cd pg_rewind -make USE_PGXS=1 top_srcdir=/tmp/build/postgres install -ln -s /usr/pgsql-9.4/bin/pg_rewind /usr/bin/pg_rewind - -# Cleanup - -cd -rm -rf /tmp/build -yum remove -y $dev_pkgs - - -# Though /var/lib/pgsql is the preferred directory, need to move it as -# this is where the volume will be mounted -su - postgres -c "/usr/pgsql-9.4/bin/initdb /var/lib/pgsql/9.4/data" -mv /var/lib/pgsql /var/lib/postgresql - -mv /lib/systemd/system/postgresql-9.4.service /lib/systemd/system/postgresql.service - -sed -i 's/PGDATA=\/var\/lib\/pgsql\/9.4\/data/PGDATA=\/var\/lib\/postgresql\/9.4\/data/' /lib/systemd/system/postgresql.service - -# Create a volatile directory for runtime files. -echo "d /var/run/postgresql/ 0755 postgres postgres" > /lib/tmpfiles.d/postgresql.conf - -# Install the native Python client. -dnf install -y postgresql-devel python-devel -pip install psycopg2 - -systemctl enable postgresql.service -systemctl start postgresql.service diff --git a/scripts/files/elements/fedora-redis/README.md b/scripts/files/elements/fedora-redis/README.md deleted file mode 100644 index 426072c..0000000 --- a/scripts/files/elements/fedora-redis/README.md +++ /dev/null @@ -1 +0,0 @@ -Sets up a redis server install in the image. diff --git a/scripts/files/elements/fedora-redis/install.d/10-redis b/scripts/files/elements/fedora-redis/install.d/10-redis deleted file mode 100755 index 8c23b5f..0000000 --- a/scripts/files/elements/fedora-redis/install.d/10-redis +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -ex - -dnf -y install redis -service redis start diff --git a/scripts/files/elements/ubuntu-cassandra/install.d/10-cassandra b/scripts/files/elements/ubuntu-cassandra/install.d/10-cassandra deleted file mode 100755 index 2bd4018..0000000 --- a/scripts/files/elements/ubuntu-cassandra/install.d/10-cassandra +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -ex -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive -apt-get install -qy curl -echo "deb http://debian.datastax.com/community stable main" >> /etc/apt/sources.list.d/cassandra.sources.list -curl -L http://debian.datastax.com/debian/repo_key | apt-key add - -apt-get update -apt-get install -qy openjdk-7-jdk expect python-dev -apt-get install -qy libxml2-dev ntp mc -apt-get install -qy libxslt1-dev python-pexpect -apt-get install -qy python-migrate build-essential - -apt-get install dsc21=2.1.* cassandra=2.1.* -qy - -# The Python Driver 2.0 for Apache Cassandra. -pip install cassandra-driver -# Sorted sets support for the Python driver. -pip install blist - -service cassandra stop -rm -rf /var/lib/cassandra/data/system/* -service cassandra start diff --git a/scripts/files/elements/ubuntu-couchbase/install.d/10-couchbase b/scripts/files/elements/ubuntu-couchbase/install.d/10-couchbase deleted file mode 100755 index 0dc67d8..0000000 --- a/scripts/files/elements/ubuntu-couchbase/install.d/10-couchbase +++ /dev/null @@ -1,8 +0,0 @@ -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive -apt-get install -qy curl -apt-get install -qy libssl0.9.8 -curl -O http://packages.couchbase.com/releases/2.2.0/couchbase-server-community_2.2.0_x86_64.deb -INSTALL_DONT_START_SERVER=1 dpkg -i couchbase-server-community_2.2.0_x86_64.deb diff --git a/scripts/files/elements/ubuntu-couchdb/install.d/10-couchdb b/scripts/files/elements/ubuntu-couchdb/install.d/10-couchdb deleted file mode 100755 index 77871d3..0000000 --- a/scripts/files/elements/ubuntu-couchdb/install.d/10-couchdb +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive - -# install the ppa-finding tool for ubuntu 12.0.4 release -apt-get install -y python-software-properties -add-apt-repository -y ppa:couchdb/stable -# update cached list of packages -apt-get update -y -# remove any existing couchdb binaries -apt-get remove -yf couchdb couchdb-bin couchdb-common -# install couchdb -apt-get install -yV couchdb -# install curl to provide a way to interact with CouchDB -# over HTTP REST API -apt-get install -qy curl diff --git a/scripts/files/elements/ubuntu-db2/README.md b/scripts/files/elements/ubuntu-db2/README.md deleted file mode 100644 index b488f2d..0000000 --- a/scripts/files/elements/ubuntu-db2/README.md +++ /dev/null @@ -1,36 +0,0 @@ - Creates an image for DB2 Express-C v10.5 - - The packages for DB2 Express-C can be downloaded from: - http://www-01.ibm.com/software/data/db2/express-c/download.html - and click on the link "DB2 Express-C for Linux 64-bit". - New users can either get an IBM ID or click on the "Proceed without an - IBM ID". User is provided with a registration form which needs to be - completed in order to proceed further to download the DB2 Express-C - packages. After accepting the license agreement, user can download the - the DB2 Express-C package (.tar.gz file). - - There are 2 options for making the DB2 Express-C package accessible to - the Trove disk-image building process: - - place the package in a private repository and set the environment - variable DATASTORE_PKG_LOCATION with the url to this private - repository. - e.g. export DATASTORE_PKG_LOCATION="http://www.foo.com/db2/v10.5_linuxx64_expc.tar.gz" - - - download the package and place it in any directory on the local - filesystem that the trove-integration scripts can access. Set the - environment variable DATASTORE_PKG_LOCATION with the full path to - the downloaded package. - e.g. export DATASTORE_PKG_LOCATION="/home/stack/db2/v10.5_linuxx64_expc.tar.gz" - - The environment variables used are as follows: - - DATASTORE_PKG_LOCATION - is the place where user stores the DB2 - Express-C package after registration. This can either be a - url to a private repository or the full path to the - downloaded package on a local filesystem. - DATASTORE_DOWNLOAD_OPTS - defines any wget options user wants to specify - like user,password, etc. This is an optional variable and is - needed only if specifying a private repository to download - the packages from. - e.g. export DATASTORE_DOWNLOAD_OPTS="--user=foo --password='secret'" - diff --git a/scripts/files/elements/ubuntu-db2/extra-data.d/20-copy-db2-pkgs b/scripts/files/elements/ubuntu-db2/extra-data.d/20-copy-db2-pkgs deleted file mode 100755 index f82fd32..0000000 --- a/scripts/files/elements/ubuntu-db2/extra-data.d/20-copy-db2-pkgs +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -set -e -set -o xtrace - -# CONTEXT: HOST prior to IMAGE BUILD as SCRIPT USER -# PURPOSE: Download the DB2 Express-C v10.5 packages to a directory on the local filesystem or -# to a private repository. The download location is specified using the env variable: -# DATASTORE_PKG_LOCATION - -[ -n "${TMP_HOOKS_PATH}" ] || die "Temp hook path not set" -[ -n "${DATASTORE_PKG_LOCATION}" ] || die "DATASTORE_PKG_LOCATION not set" - -# First check if the package is available on the local filesystem. -if [ -f "${DATASTORE_PKG_LOCATION}" ]; then - echo "Found the DB2 Express-C packages in ${DATASTORE_PKG_LOCATION}." - dd if="${DATASTORE_PKG_LOCATION}" of=${TMP_HOOKS_PATH}/db2.tar.gz -# else, check if the package is available for download in a private repository. -elif wget ${DATASTORE_DOWNLOAD_OPTS} "${DATASTORE_PKG_LOCATION}" -O ${TMP_HOOKS_PATH}/db2.tar.gz; then - echo "Downloaded the DB2 Express-C package from the private repository" -else - echo "Unable to find the DB2 package at ${DATASTORE_PKG_LOCATION}" - echo "Please register and download the DB2 Express-C packages to a private repository or local filesystem." - exit -1 -fi diff --git a/scripts/files/elements/ubuntu-db2/install.d/10-db2 b/scripts/files/elements/ubuntu-db2/install.d/10-db2 deleted file mode 100755 index 63bc3bf..0000000 --- a/scripts/files/elements/ubuntu-db2/install.d/10-db2 +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -set -e -set -o xtrace - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Uncompress the DB2 packages and install and configure DB2 on Ubuntu. - -# DB2_PKG_LOCATION points to the directory where the DB2 packages -# are located to install. -DB2_PKG_LOCATION="/db2" -mkdir ${DB2_PKG_LOCATION} -cd ${DB2_PKG_LOCATION} - -# DB2 install requires the hostname to be resolved correctly -host_name=`hostname` -echo "127.0.0.1 ${host_name}" >> /etc/hosts - -tar -xvzf /tmp/in_target.d/db2.tar.gz - -# installing dependencies -apt-get install libaio1 -apt-get install libstdc++6 - -# start the installation process. Accepts the default installation directory '/opt/ibm/db2/V10.5' -${DB2_PKG_LOCATION}/expc/db2_install -b /opt/ibm/db2/V10.5 -f sysreq -l ${DB2_PKG_LOCATION}/db2_install.log - -# create the DB2 users. -# DB2 instance owner - db2inst1 -# DB2 fence user - db2fenc1 -# DB2 admin user - db2das1 -useradd -m db2inst1 -useradd -m db2fenc1 -useradd -m db2das1 - -# Create the DB2 server instance -/opt/ibm/db2/V10.5/instance/db2icrt -a server -u db2fenc1 db2inst1 -/opt/ibm/db2/V10.5/cfg/db2ln - -# Configure DB2 server instance to communicate via TCP/IP on a particulat port. -echo 'db2c_db2inst1 50000/tcp # DB2 connection service port' >> /etc/services - -# Configure DB2 to use the TCP/IP settings defined above. -su - db2inst1 -c "db2 update database manager configuration using svcename db2c_db2inst1" - -# Start the actual TCP/IP communication. -su - db2inst1 -c "db2set DB2COMM=tcpip" - -# DB2 requires the hostname to be resolved correctly. Delete this entry from the -# /etc/hosts since this is the hostname of the instance where the image is being -# built. The correct hostname will be set in the guest agent. -sed -i "/127.0.0.1[[:space:]]*${host_name}/d" /etc/hosts 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 diff --git a/scripts/files/elements/ubuntu-guest/install.d/05-base-apps b/scripts/files/elements/ubuntu-guest/install.d/05-base-apps deleted file mode 100755 index 5cd392b..0000000 --- a/scripts/files/elements/ubuntu-guest/install.d/05-base-apps +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install basic services and applications - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive -apt-get -y install ntp apparmor-utils diff --git a/scripts/files/elements/ubuntu-guest/install.d/15-reddwarf-dep b/scripts/files/elements/ubuntu-guest/install.d/15-reddwarf-dep deleted file mode 100755 index 8d989fe..0000000 --- a/scripts/files/elements/ubuntu-guest/install.d/15-reddwarf-dep +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive -apt-get -y install python-dev libxml2-dev libxslt1-dev python-setuptools \ - python-pip python-sqlalchemy python-lxml \ - python-routes python-eventlet python-webob \ - python-pastedeploy python-paste python-netaddr \ - python-httplib2 python-iso8601 python-pexpect python-mysqldb python-migrate - - -# pick up the requirements file left for us by -# extra-data.d/15-reddwarf-dep - -TMP_HOOKS_DIR="/tmp/in_target.d" - -UPPER_CONSTRAINTS= -if [ -f ${TMP_HOOKS_DIR}/upper-constraints.txt ]; then - UPPER_CONSTRAINTS=" -c ${TMP_HOOKS_DIR}/upper-constraints.txt" -fi - -pip install -q --upgrade -r ${TMP_HOOKS_DIR}/requirements.txt ${UPPER_CONSTRAINTS} - -echo "diagnostic pip freeze output follows" -pip freeze -echo "diagnostic pip freeze output above" diff --git a/scripts/files/elements/ubuntu-guest/install.d/20-etc b/scripts/files/elements/ubuntu-guest/install.d/20-etc deleted file mode 100755 index 8ac19f7..0000000 --- a/scripts/files/elements/ubuntu-guest/install.d/20-etc +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: take "staged" trove-guest.conf file and put it in the init directory on guest image - -dd if=/tmp/in_target.d/trove-guest.conf of=/etc/init/trove-guest.conf - - diff --git a/scripts/files/elements/ubuntu-guest/install.d/50-user b/scripts/files/elements/ubuntu-guest/install.d/50-user deleted file mode 100755 index 99f6896..0000000 --- a/scripts/files/elements/ubuntu-guest/install.d/50-user +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Add the guest image user that will own the trove agent source...if the user does not already exist - -set -e -set -o xtrace - -if ! id -u ${GUEST_USERNAME} >/dev/null 2>&1; then - echo "Adding ${GUEST_USERNAME} user" - useradd -G sudo -m ${GUEST_USERNAME} -s /bin/bash - chown ${GUEST_USERNAME}:${GUEST_USERNAME} /home/${GUEST_USERNAME} - passwd ${GUEST_USERNAME} <<_EOF_ -${GUEST_USERNAME} -${GUEST_USERNAME} -_EOF_ -fi - diff --git a/scripts/files/elements/ubuntu-guest/install.d/62-ssh-key b/scripts/files/elements/ubuntu-guest/install.d/62-ssh-key deleted file mode 100755 index 8085cba..0000000 --- a/scripts/files/elements/ubuntu-guest/install.d/62-ssh-key +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: take "staged" ssh keys (see extra-data.d/62-ssh-key) and put them in the GUEST_USERS home directory - -set -e -set -o xtrace - -SSH_DIR="/home/${GUEST_USERNAME}/.ssh" -TMP_HOOKS_DIR="/tmp/in_target.d" - -if [ -e "${TMP_HOOKS_DIR}/ssh-authorized-keys" ]; then - if [ ! -e ${SSH_DIR} ]; then - # this method worked more reliable in vmware fusion over doing sudo -Hiu ${GUEST_USERNAME} - mkdir ${SSH_DIR} - chown ${GUEST_USERNAME}:${GUEST_USERNAME} ${SSH_DIR} - fi - sudo -Hiu ${GUEST_USERNAME} dd of=${SSH_DIR}/authorized_keys conv=notrunc if=${TMP_HOOKS_DIR}/ssh-authorized-keys - if [ ! -e "${SSH_DIR}/id_rsa" ]; then - sudo -Hiu ${GUEST_USERNAME} dd of=${SSH_DIR}/id_rsa if=${TMP_HOOKS_DIR}/id_rsa - # perms have to be right on this file for ssh to work - sudo -Hiu ${GUEST_USERNAME} chmod 600 ${SSH_DIR}/id_rsa - sudo -Hiu ${GUEST_USERNAME} dd of=${SSH_DIR}/id_rsa.pub if=${TMP_HOOKS_DIR}/id_rsa.pub - fi -else - echo "SSH Keys were not staged by host" - exit -1 -fi diff --git a/scripts/files/elements/ubuntu-guest/install.d/98-ssh b/scripts/files/elements/ubuntu-guest/install.d/98-ssh deleted file mode 100755 index 2134c19..0000000 --- a/scripts/files/elements/ubuntu-guest/install.d/98-ssh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# Regenerate host keys now. XXX: Really should be a cloud-init task, should get -# that working. - -set -e -set -o xtrace - -dpkg-reconfigure openssh-server diff --git a/scripts/files/elements/ubuntu-guest/install.d/99-clean-apt b/scripts/files/elements/ubuntu-guest/install.d/99-clean-apt deleted file mode 100755 index cc348c5..0000000 --- a/scripts/files/elements/ubuntu-guest/install.d/99-clean-apt +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Delete contents of apt cache on guest (saves image disk space) - -set -e -set -o xtrace - -apt-get clean - - diff --git a/scripts/files/elements/ubuntu-guest/post-install.d/05-ipforwarding b/scripts/files/elements/ubuntu-guest/post-install.d/05-ipforwarding deleted file mode 100755 index 48b7ad0..0000000 --- a/scripts/files/elements/ubuntu-guest/post-install.d/05-ipforwarding +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -set -e -set -o xtrace -sed -i -r 's/^\s*#(net\.ipv4\.ip_forward=1.*)/\1/' /etc/sysctl.conf diff --git a/scripts/files/elements/ubuntu-guest/post-install.d/10-ntp b/scripts/files/elements/ubuntu-guest/post-install.d/10-ntp deleted file mode 100755 index bc494ae..0000000 --- a/scripts/files/elements/ubuntu-guest/post-install.d/10-ntp +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -ntpfile=`mktemp` -cat << EOF > $ntpfile -server ntp.ubuntu.com iburst -server 127.127.1.0 -fudge 127.127.1.0 stratum 10 -EOF - -mv /etc/ntp.conf /etc/ntp.conf.orig -mv $ntpfile /etc/ntp.conf diff --git a/scripts/files/elements/ubuntu-guest/post-install.d/62-trove-guest-sudoers b/scripts/files/elements/ubuntu-guest/post-install.d/62-trove-guest-sudoers deleted file mode 100755 index 0581fd2..0000000 --- a/scripts/files/elements/ubuntu-guest/post-install.d/62-trove-guest-sudoers +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -set -e -set -o xtrace - -# CONTEXT: HOST after IMAGE BUILD as SCRIPT USER -# PURPOSE: add the guest user account to the /etc/sudoers files with NOPASSWD - -# Adds user to the sudoers file so they can do everything w/o a pass -# Some binaries might be under /sbin or /usr/sbin, so make sure sudo will -# see them by forcing PATH -TEMPFILE=`mktemp` -echo "${GUEST_USERNAME} ALL=(ALL) NOPASSWD:ALL" > $TEMPFILE -chmod 0440 $TEMPFILE -sudo chown root:root $TEMPFILE -sudo mv $TEMPFILE /etc/sudoers.d/60_trove_guest diff --git a/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update b/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update deleted file mode 100755 index 6cc087a..0000000 --- a/scripts/files/elements/ubuntu-guest/post-install.d/90-apt-get-update +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST after packages installed -# PURPOSE: do apt-get update to save each instance having to do all the work - -set -e -set -o xtrace - -apt-get update diff --git a/scripts/files/elements/ubuntu-guest/pre-install.d/01-trim-pkgs b/scripts/files/elements/ubuntu-guest/pre-install.d/01-trim-pkgs deleted file mode 100755 index 8787df7..0000000 --- a/scripts/files/elements/ubuntu-guest/pre-install.d/01-trim-pkgs +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install basic services and applications - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive -apt-get -y purge acpid\ - apport\ - apport-symptoms\ - apt-transport-https\ - apt-xapian-index\ - aptitude\ - at\ - bash-completion\ - bc\ - bind9-host\ - bsdmainutils\ - busybox-static\ - byobu\ - command-not-found\ - command-not-found-data\ - curl\ - dbus\ - dmidecode\ - dosfstools\ - ed\ - fonts-ubuntu-font-family-console\ - friendly-recovery\ - ftp\ - fuse\ - geoip-database\ - groff-base\ - hdparm\ - info\ - install-info\ - iptables\ - iputils-tracepath\ - irqbalance\ - landscape-client\ - landscape-common\ - language-selector-common\ - laptop-detect\ - libaccountsservice0\ - libbind9-90\ - libclass-accessor-perl\ - libcwidget3\ - libdns100\ - libept1.4.12\ - libevent-2.0-5\ - libgc1c2\ - libgeoip1\ - libio-string-perl\ - libisc95\ - liblwres90\ - libnfnetlink0\ - libparse-debianchangelog-perl\ - libparted0debian1\ - libpcap0.8\ - libpci3\ - libpipeline1\ - libpolkit-gobject-1-0\ - libsasl2-modules\ - libsigc++-2.0-0c2a\ - libsub-name-perl\ - libusb-1.0-0\ - libxapian22\ - lshw\ - lsof\ - ltrace\ - man-db\ - mlocate\ - mtr-tiny\ - nano\ - ntfs-3g\ - parted\ - patch\ - plymouth-theme-ubuntu-text\ - popularity-contest\ - powermgmt-base\ - ppp\ - pppoeconf\ - python-debian\ - python-gdbm\ - python-pam\ - python-twisted-bin\ - python-xapian\ - python-zope.interface\ - screen\ - shared-mime-info\ - strace\ - tasksel\ - tcpdump\ - telnet\ - time\ - tmux\ - ubuntu-standard\ - ufw\ - update-manager-core\ - update-notifier-common\ - usbutils\ - uuid-runtime\ - w3m - -# The following packages cannot be removed as they cause cloud-init to be -# uninstalled in Ubuntu 14.04 -# gir1.2-glib-2.0 -# libdbus-glib-1-2 -# libgirepository-1.0-1 -# python-chardet -# python-serial -# xz-utils - -apt-get -y autoremove - diff --git a/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools b/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools deleted file mode 100755 index 1a8647f..0000000 --- a/scripts/files/elements/ubuntu-guest/pre-install.d/04-baseline-tools +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -# Install baseline packages and tools. - -set -e -set -o xtrace - -apt-get install -y language-pack-en python-software-properties
\ No newline at end of file diff --git a/scripts/files/elements/ubuntu-mariadb/README.md b/scripts/files/elements/ubuntu-mariadb/README.md deleted file mode 100644 index 757f00b..0000000 --- a/scripts/files/elements/ubuntu-mariadb/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Sets up a MariaDB server install in the image. - -TODO: auto-tune settings based on host resources or metadata service. diff --git a/scripts/files/elements/ubuntu-mariadb/install.d/30-mariadb b/scripts/files/elements/ubuntu-mariadb/install.d/30-mariadb deleted file mode 100755 index 065c2f9..0000000 --- a/scripts/files/elements/ubuntu-mariadb/install.d/30-mariadb +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive - -# NOTE(vkmc): Using MariaDB repositories is required -# https://mariadb.com/kb/en/mariadb/installing-mariadb-deb-files/ -apt-get -y install software-properties-common -apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db -add-apt-repository 'deb http://ftp.osuosl.org/pub/mariadb/repo/10.1/ubuntu trusty main' - -# Pin MariaDB repository -sudo echo -e "Package: *\nPin: origin ftp.osuosl.org\nPin-Priority: 1000" > /etc/apt/preferences.d/mariadb.pref - -apt-get -y update -# The fix to make versions of percona-xtrabackup > v2.2 work with Trove -# was put into the mysql guestagent code for Mitaka. There are no current -# plans to backport so we need to make sure the guest generated when the -# tests are run for Kilo or Liberty get the 2.2 verson of PXB -if [[ $BRANCH_OVERRIDE == "stable/kilo" || $BRANCH_OVERRIDE == "stable/liberty" ]]; then - PXB_VERSION_OVERRIDE="-22" -fi -apt-get -y install socat percona-xtrabackup${PXB_VERSION_OVERRIDE} -apt-get -y install libmariadbclient18 mariadb-server - -cat >/etc/mysql/conf.d/no_perf_schema.cnf <<_EOF_ -[mysqld] -performance_schema = off -_EOF_ diff --git a/scripts/files/elements/ubuntu-mariadb/pre-install.d/10-percona-apt-key b/scripts/files/elements/ubuntu-mariadb/pre-install.d/10-percona-apt-key deleted file mode 100755 index 55b5ef8..0000000 --- a/scripts/files/elements/ubuntu-mariadb/pre-install.d/10-percona-apt-key +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during PRE-CONSTRUCTION as ROOT -# PURPOSE: Setup apt-repo list so that we can connect to Percona's repo - -set -e -set -o xtrace - -[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image" -[ -n "${RELEASE}" ] || die "RELEASE must be set to either Trusty or Precise" - -# Add Percona GPG key -mkdir -p /home/${GUEST_USERNAME}/.gnupg - -# sometimes the primary key server is unavailable and we should try an -# alternate. see -# https://bugs.launchpad.net/percona-server/+bug/907789. Disable -# shell errexit so we can interrogate the exit code and take action -# based on the exit code. We will reenable it later. -function get_key_robust() { - KEY=$1 - set +e - - apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys ${KEY} - - if [ "$?" -ne "0" ]; - then - echo "Trying alternate keyserver hkp://keyserver.ubuntu.com" - set -e - apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys ${KEY} - fi - - set -e -} - -get_key_robust 1C4CBDCDCD2EFD2A -get_key_robust 9334A25F8507EFA5 - -# Add Percona repo -# Creates the Percona sources list -cat <<EOL > /etc/apt/sources.list.d/percona.list -deb http://repo.percona.com/apt $RELEASE main -deb-src http://repo.percona.com/apt $RELEASE main -EOL - -# Force an update -apt-get -y update diff --git a/scripts/files/elements/ubuntu-mariadb/pre-install.d/20-apparmor-mysql-local b/scripts/files/elements/ubuntu-mariadb/pre-install.d/20-apparmor-mysql-local deleted file mode 100755 index a3e1dc7..0000000 --- a/scripts/files/elements/ubuntu-mariadb/pre-install.d/20-apparmor-mysql-local +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -set -e - -#CONTEXT: chroot on host -#PURPOSE: Allows mysqld to create temporary files when restoring backups - -cat <<EOF >>/etc/apparmor.d/local/usr.sbin.mysqld - /tmp/ rw, - /tmp/** rwk, -EOF diff --git a/scripts/files/elements/ubuntu-mongodb/README.md b/scripts/files/elements/ubuntu-mongodb/README.md deleted file mode 100644 index 5b9e33b..0000000 --- a/scripts/files/elements/ubuntu-mongodb/README.md +++ /dev/null @@ -1 +0,0 @@ -Sets up a MongoDB install in the image. diff --git a/scripts/files/elements/ubuntu-mongodb/install.d/10-mongodb-thp b/scripts/files/elements/ubuntu-mongodb/install.d/10-mongodb-thp deleted file mode 100755 index 48d6c8b..0000000 --- a/scripts/files/elements/ubuntu-mongodb/install.d/10-mongodb-thp +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive - -cat > /etc/init.d/disable-transparent-hugepages << '_EOF_' -#!/bin/sh -### BEGIN INIT INFO -# Provides: disable-transparent-hugepages -# Required-Start: $local_fs -# Required-Stop: -# X-Start-Before: mongod mongodb-mms-automation-agent -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Disable Linux transparent huge pages -# Description: Disable Linux transparent huge pages, to improve -# database performance. -### END INIT INFO - -case $1 in - start) - if [ -d /sys/kernel/mm/transparent_hugepage ]; then - thp_path=/sys/kernel/mm/transparent_hugepage - elif [ -d /sys/kernel/mm/redhat_transparent_hugepage ]; then - thp_path=/sys/kernel/mm/redhat_transparent_hugepage - else - return 0 - fi - - echo 'never' > ${thp_path}/enabled - echo 'never' > ${thp_path}/defrag - - unset thp_path - ;; -esac -_EOF_ - -chmod 755 /etc/init.d/disable-transparent-hugepages - -update-rc.d disable-transparent-hugepages defaults diff --git a/scripts/files/elements/ubuntu-mongodb/install.d/20-mongodb b/scripts/files/elements/ubuntu-mongodb/install.d/20-mongodb deleted file mode 100755 index 6a95d2f..0000000 --- a/scripts/files/elements/ubuntu-mongodb/install.d/20-mongodb +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive - -apt-get -y install mongodb-org=3.2.6 diff --git a/scripts/files/elements/ubuntu-mongodb/install.d/25-trove-mongo-dep b/scripts/files/elements/ubuntu-mongodb/install.d/25-trove-mongo-dep deleted file mode 100755 index a3e2633..0000000 --- a/scripts/files/elements/ubuntu-mongodb/install.d/25-trove-mongo-dep +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install trove guest python dependencies - see redstack functions_qemu - -set -e -set -o xtrace - -pip install pymongo>=3.0.2,!=3.1 diff --git a/scripts/files/elements/ubuntu-mongodb/install.d/30-mongodb-conf b/scripts/files/elements/ubuntu-mongodb/install.d/30-mongodb-conf deleted file mode 100755 index afb5828..0000000 --- a/scripts/files/elements/ubuntu-mongodb/install.d/30-mongodb-conf +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -# Remove the default pid file -rm -f /var/run/mongodb.pid - - -cat > /etc/mongod.conf << '_EOF_' -storage.dbPath: /var/lib/mongodb -security.authorization: enabled -storage.engine: wiredTiger -storage.journal.enabled: true -systemLog.destination: file -systemLog.logAppend: true -systemLog.path: /var/log/mongodb/mongod.log -_EOF_ - - -cat > /etc/mongos.conf << '_EOF_' -security.authorization: enabled -systemLog.destination: file -systemLog.logAppend: true -systemLog.path: /var/log/mongodb/mongos.log -_EOF_ diff --git a/scripts/files/elements/ubuntu-mongodb/install.d/41-mongod-init b/scripts/files/elements/ubuntu-mongodb/install.d/41-mongod-init deleted file mode 100755 index 77a1292..0000000 --- a/scripts/files/elements/ubuntu-mongodb/install.d/41-mongod-init +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -cat > /etc/init/mongod.conf << '_EOF_' -limit fsize unlimited unlimited -limit cpu unlimited unlimited -limit as unlimited unlimited -limit nofile 64000 64000 -limit rss unlimited unlimited -limit nproc 64000 64000 - -kill timeout 300 # wait 300s between SIGTERM and SIGKILL. - -pre-start script - mkdir -p /var/run/mongodb/ - touch /var/run/mongodb/mongod.pid - chown mongodb -R /var/run/mongodb/ -end script - -start on runlevel [2345] -stop on runlevel [06] - -script - CONF=/etc/mongod.conf - - # Handle NUMA access to CPUs (SERVER-3574) - # This verifies the existence of numactl as well as testing that the command works - NUMACTL_ARGS="--interleave=all" - if which numactl >/dev/null 2>/dev/null && numactl $NUMACTL_ARGS ls / >/dev/null 2>/dev/null - then - NUMACTL="$(which numactl) -- $NUMACTL_ARGS" - DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"} - else - NUMACTL="" - DAEMON_OPTS="-- "${DAEMON_OPTS:-"--config $CONF"} - fi - - exec start-stop-daemon --start \ - --chuid mongodb \ - --pidfile /var/run/mongod.pid \ - --make-pidfile \ - --exec $NUMACTL /usr/bin/mongod $DAEMON_OPTS -end script -_EOF_ diff --git a/scripts/files/elements/ubuntu-mongodb/install.d/42-mongos-init b/scripts/files/elements/ubuntu-mongodb/install.d/42-mongos-init deleted file mode 100755 index dc91fdb..0000000 --- a/scripts/files/elements/ubuntu-mongodb/install.d/42-mongos-init +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -cat > /etc/init/mongos.conf << '_EOF_' -limit fsize unlimited unlimited -limit cpu unlimited unlimited -limit as unlimited unlimited -limit nofile 64000 64000 -limit rss unlimited unlimited -limit nproc 64000 64000 - -pre-start script - mkdir -p /var/run/mongodb/ - touch /var/run/mongodb/mongos.pid - chown mongodb -R /var/run/mongodb/ -end script - -start on runlevel [2345] -stop on runlevel [06] - -script - exec start-stop-daemon --start \ - --chuid mongodb \ - --pidfile /var/run/mongos.pid \ - --make-pidfile \ - --exec /usr/bin/mongos -- --config /etc/mongos.conf -end script -_EOF_ diff --git a/scripts/files/elements/ubuntu-mongodb/pre-install.d/10-mongodb-apt-key b/scripts/files/elements/ubuntu-mongodb/pre-install.d/10-mongodb-apt-key deleted file mode 100755 index 1538d61..0000000 --- a/scripts/files/elements/ubuntu-mongodb/pre-install.d/10-mongodb-apt-key +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -[ -n "${RELEASE}" ] || die "RELEASE must be set to either Precise or Quantal" - -apt-get -y install software-properties-common - -apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927 - -echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list - -apt-get -y update diff --git a/scripts/files/elements/ubuntu-mysql/README.md b/scripts/files/elements/ubuntu-mysql/README.md deleted file mode 100644 index 39a6ab8..0000000 --- a/scripts/files/elements/ubuntu-mysql/README.md +++ /dev/null @@ -1,3 +0,0 @@ -Sets up a MySQL server install in the image. - -TODO: auto-tune settings based on host resources or metadata service. diff --git a/scripts/files/elements/ubuntu-mysql/install.d/30-mysql b/scripts/files/elements/ubuntu-mysql/install.d/30-mysql deleted file mode 100755 index d31292e..0000000 --- a/scripts/files/elements/ubuntu-mysql/install.d/30-mysql +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive - -# The fix to make versions of percona-xtrabackup > v2.2 work with Trove -# was put into the mysql guestagent code for Mitaka. There are no current -# plans to backport so we need to make sure the guest generated when the -# tests are run for Kilo or Liberty get the 2.2 verson of PXB -if [[ $BRANCH_OVERRIDE == "stable/kilo" || $BRANCH_OVERRIDE == "stable/liberty" ]]; then - PXB_VERSION_OVERRIDE="-22" -fi -apt-get -y install libmysqlclient18 mysql-server-5.6 percona-xtrabackup${PXB_VERSION_OVERRIDE} - -cat >/etc/mysql/conf.d/no_perf_schema.cnf <<_EOF_ -[mysqld] -performance_schema = off -_EOF_ diff --git a/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key b/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key deleted file mode 100755 index cd28925..0000000 --- a/scripts/files/elements/ubuntu-mysql/pre-install.d/10-percona-apt-key +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during PRE-CONSTRUCTION as ROOT -# PURPOSE: Setup apt-repo list so that we can connect to Percona's repo - -set -e -set -o xtrace - -[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image" -[ -n "${RELEASE}" ] || die "RELEASE must be set to either Precise or Quantal" - -# Add Percona GPG key -mkdir -p /home/${GUEST_USERNAME}/.gnupg - -# sometimes the primary key server is unavailable and we should try an -# alternate. see -# https://bugs.launchpad.net/percona-server/+bug/907789. Disable -# shell errexit so we can interrogate the exit code and take action -# based on the exit code. We will reenable it later. -function get_key_robust() { - KEY=$1 - set +e - - apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys ${KEY} - - if [ "$?" -ne "0" ]; - then - echo "Trying alternate keyserver hkp://keyserver.ubuntu.com" - set -e - apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys ${KEY} - fi - - set -e -} - -get_key_robust 1C4CBDCDCD2EFD2A -get_key_robust 9334A25F8507EFA5 - -# Add Percona repo -# Creates the percona sources list -cat <<EOL > /etc/apt/sources.list.d/percona.list -deb http://repo.percona.com/apt $RELEASE main -deb-src http://repo.percona.com/apt $RELEASE main -EOL - -# Force an update -apt-get update diff --git a/scripts/files/elements/ubuntu-mysql/pre-install.d/20-apparmor-mysql-local b/scripts/files/elements/ubuntu-mysql/pre-install.d/20-apparmor-mysql-local deleted file mode 100755 index a3e1dc7..0000000 --- a/scripts/files/elements/ubuntu-mysql/pre-install.d/20-apparmor-mysql-local +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -set -e - -#CONTEXT: chroot on host -#PURPOSE: Allows mysqld to create temporary files when restoring backups - -cat <<EOF >>/etc/apparmor.d/local/usr.sbin.mysqld - /tmp/ rw, - /tmp/** rwk, -EOF diff --git a/scripts/files/elements/ubuntu-percona/install.d/30-mysql b/scripts/files/elements/ubuntu-percona/install.d/30-mysql deleted file mode 100755 index 5d5b426..0000000 --- a/scripts/files/elements/ubuntu-percona/install.d/30-mysql +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive -# The fix to make versions of percona-xtrabackup > v2.2 work with Trove -# was put into the mysql guestagent code for Mitaka. There are no current -# plans to backport so we need to make sure the guest generated when the -# tests are run for Kilo or Liberty get the 2.2 verson of PXB -if [[ $BRANCH_OVERRIDE == "stable/kilo" || $BRANCH_OVERRIDE == "stable/liberty" ]]; then - PXB_VERSION_OVERRIDE="-22" -fi -apt-get -y install percona-toolkit percona-server-common-5.6 percona-server-server-5.6 percona-server-test-5.6 percona-server-client-5.6 percona-xtrabackup${PXB_VERSION_OVERRIDE} diff --git a/scripts/files/elements/ubuntu-percona/pre-install.d/10-percona-apt-key b/scripts/files/elements/ubuntu-percona/pre-install.d/10-percona-apt-key deleted file mode 100755 index d323645..0000000 --- a/scripts/files/elements/ubuntu-percona/pre-install.d/10-percona-apt-key +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during PRE-CONSTRUCTION as ROOT -# PURPOSE: Setup apt-repo list so that we can connect to Percona's repo - -set -e -set -o xtrace - -[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image" -[ -n "${RELEASE}" ] || die "RELEASE must be set to either Precise or Quantal" - -#5 add Percona GPG key -if [ ! -e /home/${GUEST_USERNAME}/.gnupg ]; then - mkdir -p /home/${GUEST_USERNAME}/.gnupg -fi - -# sometimes the primary key server is unavailable and we should try an -# alternate. see -# https://bugs.launchpad.net/percona-server/+bug/907789. Disable -# shell errexit so we can interrogate the exit code and take action -# based on the exit code. We will reenable it later. -function get_key_robust() { - KEY=$1 - set +e - - apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys ${KEY} - - if [ "$?" -ne "0" ]; - then - echo "Trying alternate keyserver hkp://keyserver.ubuntu.com" - set -e - apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys ${KEY} - fi - - set -e -} - -get_key_robust 1C4CBDCDCD2EFD2A -get_key_robust 9334A25F8507EFA5 - -# add Percona repo -# creates the percona sources list -cat <<EOL > /etc/apt/sources.list.d/percona.list -deb http://repo.percona.com/apt $RELEASE main -deb-src http://repo.percona.com/apt $RELEASE main -EOL - -# force an update -apt-get update diff --git a/scripts/files/elements/ubuntu-percona/pre-install.d/20-apparmor-mysql-local b/scripts/files/elements/ubuntu-percona/pre-install.d/20-apparmor-mysql-local deleted file mode 100755 index a3e1dc7..0000000 --- a/scripts/files/elements/ubuntu-percona/pre-install.d/20-apparmor-mysql-local +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -set -e - -#CONTEXT: chroot on host -#PURPOSE: Allows mysqld to create temporary files when restoring backups - -cat <<EOF >>/etc/apparmor.d/local/usr.sbin.mysqld - /tmp/ rw, - /tmp/** rwk, -EOF diff --git a/scripts/files/elements/ubuntu-postgresql/install.d/10-postgresql b/scripts/files/elements/ubuntu-postgresql/install.d/10-postgresql deleted file mode 100755 index cd85325..0000000 --- a/scripts/files/elements/ubuntu-postgresql/install.d/10-postgresql +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive - -cat > "/etc/sysctl.d/10-postgresql-performance.conf" << _EOF_ -# See 'http://www.postgresql.org/docs/9.4/static/kernel-resources.html' -# for best practices. -# It is recommended to disable memory overcommit, -# but the Python interpreter may require it on smaller flavors. -# We therefore stick with the heuristic overcommit setting. -vm.overcommit_memory=0 -vm.nr_hugepages=64 - -_EOF_ - -cat > "/etc/rc.local" << _EOF_ -# See 'http://www.postgresql.org/docs/9.4/static/kernel-resources.html' -# Postgres 9.4 added support for THP. Using huge pages reduces overhead when -# using large contiguous chunks of memory, like PostgreSQL does. -if test -f /sys/kernel/mm/transparent_hugepage/defrag; then - echo never > /sys/kernel/mm/transparent_hugepage/defrag -fi -if test -f /sys/kernel/mm/transparent_hugepage/enabled; then - echo always > /sys/kernel/mm/transparent_hugepage/enabled -fi - -exit \$? - -_EOF_ - -apt-get -y install postgresql-9.4 postgresql-contrib-9.4 postgresql-server-dev-9.4 - -########################################### -# Hack alert: -# For Postgresql 9.4, pg_rewind is not in the main source tree and -# no packages exist in the repos, so it must be compiled manually -# and installed on the image until we can move to 9.5 -# See README at -# https://github.com/vmware/pg_rewind/tree/REL9_4_STABLE - -tmpdir=/tmp/build -mkdir -p $tmpdir -cd $tmpdir -git clone https://github.com/postgres/postgres.git --branch REL9_4_STABLE -cd postgres/contrib -git clone https://github.com/vmware/pg_rewind.git --branch REL9_4_STABLE - -dev_pkgs="libreadline-dev libkrb5-dev libssl-dev libpam-dev libxml2-dev libxslt-dev libedit-dev libselinux1-dev bison flex" - -apt-get install $dev_pkgs -y - -# Unfortunately, on ubuntu, was not able to get pg_rewind to build -# outside of the pgsql source tree. Configure and compile postgres -# but only call make install against the contrib/pg_rewind directory -# so that support library is accessible to the server -cd $tmpdir/postgres -./configure -make -cd contrib/pg_rewind -make install - -# Make the pg_rewind binary and the library used by the -# pg_rewind stored procedures accessible -ln -s /usr/local/pgsql/bin/pg_rewind /usr/bin/pg_rewind -ln -s /usr/local/pgsql/lib/pg_rewind_support.so /usr/lib/postgresql/9.4/lib/pg_rewind_support.so - -cd -rm -rf $tmpdir -apt-get remove -y $dev_pkgs - -# End hack -################################ - -# Install the native Python client. -apt-get -y install libpq-dev -pip install psycopg2 diff --git a/scripts/files/elements/ubuntu-postgresql/pre-install.d/10-postgresql-repo b/scripts/files/elements/ubuntu-postgresql/pre-install.d/10-postgresql-repo deleted file mode 100755 index 48a25d1..0000000 --- a/scripts/files/elements/ubuntu-postgresql/pre-install.d/10-postgresql-repo +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -set -e -set -o xtrace - -cat <<EOL > /etc/apt/sources.list.d/postgresql.list -deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main -EOL - -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - - -apt-get update diff --git a/scripts/files/elements/ubuntu-pxc/install.d/30-mysql b/scripts/files/elements/ubuntu-pxc/install.d/30-mysql deleted file mode 100755 index ae65895..0000000 --- a/scripts/files/elements/ubuntu-pxc/install.d/30-mysql +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace - -export DEBIAN_FRONTEND=noninteractive -apt-get -y install percona-xtradb-cluster-server-5.6 percona-xtradb-cluster-client-5.6 percona-xtrabackup - -# Don't auto start mysql (we'll start it up in guest) -update-rc.d mysql defaults -update-rc.d mysql disable diff --git a/scripts/files/elements/ubuntu-pxc/pre-install.d/10-percona-apt-key b/scripts/files/elements/ubuntu-pxc/pre-install.d/10-percona-apt-key deleted file mode 100755 index d323645..0000000 --- a/scripts/files/elements/ubuntu-pxc/pre-install.d/10-percona-apt-key +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash - -# CONTEXT: GUEST during PRE-CONSTRUCTION as ROOT -# PURPOSE: Setup apt-repo list so that we can connect to Percona's repo - -set -e -set -o xtrace - -[ -n "${GUEST_USERNAME}" ] || die "GUEST_USERNAME needs to be set to the user for the guest image" -[ -n "${RELEASE}" ] || die "RELEASE must be set to either Precise or Quantal" - -#5 add Percona GPG key -if [ ! -e /home/${GUEST_USERNAME}/.gnupg ]; then - mkdir -p /home/${GUEST_USERNAME}/.gnupg -fi - -# sometimes the primary key server is unavailable and we should try an -# alternate. see -# https://bugs.launchpad.net/percona-server/+bug/907789. Disable -# shell errexit so we can interrogate the exit code and take action -# based on the exit code. We will reenable it later. -function get_key_robust() { - KEY=$1 - set +e - - apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys ${KEY} - - if [ "$?" -ne "0" ]; - then - echo "Trying alternate keyserver hkp://keyserver.ubuntu.com" - set -e - apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys ${KEY} - fi - - set -e -} - -get_key_robust 1C4CBDCDCD2EFD2A -get_key_robust 9334A25F8507EFA5 - -# add Percona repo -# creates the percona sources list -cat <<EOL > /etc/apt/sources.list.d/percona.list -deb http://repo.percona.com/apt $RELEASE main -deb-src http://repo.percona.com/apt $RELEASE main -EOL - -# force an update -apt-get update diff --git a/scripts/files/elements/ubuntu-pxc/pre-install.d/20-apparmor-mysql-local b/scripts/files/elements/ubuntu-pxc/pre-install.d/20-apparmor-mysql-local deleted file mode 100755 index a3e1dc7..0000000 --- a/scripts/files/elements/ubuntu-pxc/pre-install.d/20-apparmor-mysql-local +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -set -e - -#CONTEXT: chroot on host -#PURPOSE: Allows mysqld to create temporary files when restoring backups - -cat <<EOF >>/etc/apparmor.d/local/usr.sbin.mysqld - /tmp/ rw, - /tmp/** rwk, -EOF diff --git a/scripts/files/elements/ubuntu-redis/README.md b/scripts/files/elements/ubuntu-redis/README.md deleted file mode 100644 index 426072c..0000000 --- a/scripts/files/elements/ubuntu-redis/README.md +++ /dev/null @@ -1 +0,0 @@ -Sets up a redis server install in the image. diff --git a/scripts/files/elements/ubuntu-redis/install.d/10-redis b/scripts/files/elements/ubuntu-redis/install.d/10-redis deleted file mode 100755 index 57fcdf9..0000000 --- a/scripts/files/elements/ubuntu-redis/install.d/10-redis +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT -# PURPOSE: Install controller base required packages - -set -ex - -export DEBIAN_FRONTEND=noninteractive - -cat > "/etc/sysctl.d/10-redis-performance.conf" << _EOF_ -# See 'http://redis.io/topics/admin' for best practices. -# Make sure to set the Linux kernel overcommit memory setting to 1. -vm.overcommit_memory=1 - -# Linux kernel will silently truncate 'tcp-backlog' to the value of -# '/proc/sys/net/core/somaxconn' so make sure to raise both the value of -# 'somaxconn' and 'tcp_max_syn_backlog' in order to get the desired effect. -net.ipv4.tcp_max_syn_backlog=1024 -net.core.somaxconn=1024 - -_EOF_ - -cat > "/etc/rc.local" << _EOF_ -# Make sure to disable Linux kernel feature transparent huge pages, -# it will affect greatly both memory usage and latency in a negative way. -if test -f /sys/kernel/mm/transparent_hugepage/defrag; then - echo never > /sys/kernel/mm/transparent_hugepage/defrag -fi -if test -f /sys/kernel/mm/transparent_hugepage/enabled; then - echo never > /sys/kernel/mm/transparent_hugepage/enabled -fi - -_EOF_ - -add-apt-repository -y ppa:chris-lea/redis-server -apt-get -y update -apt-get install -y redis-server - -cat > "/etc/default/redis-server" << _EOF_ -# Call ulimit -n with this argument prior to invoking Redis itself. -# This may be required for high-concurrency environments. Redis itself cannot -# alter its limits as it is not being run as root. -ULIMIT=65536 - -_EOF_ - -# Install Python driver for Redis ('redis-py'). -pip install redis - -# By default, redis-py will attempt to use the HiredisParser if installed. -# Using Hiredis can provide up to a 10x speed improvement in parsing responses -# from the Redis server. -pip install hiredis diff --git a/scripts/files/elements/ubuntu-vertica/README.md b/scripts/files/elements/ubuntu-vertica/README.md deleted file mode 100644 index 8620237..0000000 --- a/scripts/files/elements/ubuntu-vertica/README.md +++ /dev/null @@ -1 +0,0 @@ -Sets up a Vertica CE 7.1 debian package and other dependencies install in the image. diff --git a/scripts/files/elements/ubuntu-vertica/extra-data.d/93-copy-vertica-deb b/scripts/files/elements/ubuntu-vertica/extra-data.d/93-copy-vertica-deb deleted file mode 100755 index 56c02cd..0000000 --- a/scripts/files/elements/ubuntu-vertica/extra-data.d/93-copy-vertica-deb +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# CONTEXT: HOST prior to IMAGE BUILD as SCRIPT USER -# PURPOSE: Stages the package installer file from DATASTORE_PKG_LOCATION, -# so that guest image has the package file. - -set -e -set -o xtrace - -source $_LIB/die - -[ -n "$TMP_HOOKS_PATH" ] || die "Temp hook path not set" -[ -f "$DATASTORE_PKG_LOCATION" ] || die "Datastore package installer file not found at:" $DATASTORE_PKG_LOCATION -dd if=${DATASTORE_PKG_LOCATION} of=${TMP_HOOKS_PATH}/vertica.deb diff --git a/scripts/files/elements/ubuntu-vertica/install.d/97-vertica b/scripts/files/elements/ubuntu-vertica/install.d/97-vertica deleted file mode 100755 index 2d50bc6..0000000 --- a/scripts/files/elements/ubuntu-vertica/install.d/97-vertica +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/sh - -# CONTEXT: GUEST during CONSTRUCTION as ROOT - install.d -# PURPOSE: Install controller base required packages - -set -e -set -o xtrace -export DEBIAN_FRONTEND=noninteractive - - -# Copy the package file to the image, -# as it needs to be used later during configuration. -dd if=/tmp/in_target.d/vertica.deb of=/vertica.deb - -# Install base packages -apt-get install -qy build-essential bc iptables -apt-get install -qy curl sysstat pstack mcelog -apt-get install -qy python-dev g++ unixODBC unixODBC-dev dialog -apt-get install -qy dialog libbz2-dev libboost-all-dev libcurl4-gnutls-dev -apt-get install -qy openjdk-7-jdk - -# Install Vertica package -dpkg -i /vertica.deb - -# Creating dbadmin user and verticadba group -groupadd verticadba -useradd -g verticadba -d /home/dbadmin -s /bin/bash -m dbadmin -echo "export PATH=/opt/vertica/bin:\$PATH" >> ~dbadmin/.profile -echo "export TZ=`date +%Z`" >> ~dbadmin/.profile - -# Create base directory for to be used for database creation -mkdir /var/lib/vertica -chown dbadmin:verticadba /var/lib/vertica - -# Backup /etc/hosts -cp -p /etc/hosts /etc/hosts.bkp - -# Compile the SDK examples - the supplied UDFs can then be loaded -cd /opt/vertica/sdk/examples -TMPDIR=/tmp JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 make -cd - -cat > "/etc/rc.local" << _EOF_ -# Vertica requires THP to be turned off -if test -f /sys/kernel/mm/transparent_hugepage/defrag; then - echo never > /sys/kernel/mm/transparent_hugepage/defrag -fi -if test -f /sys/kernel/mm/transparent_hugepage/enabled; then - echo never > /sys/kernel/mm/transparent_hugepage/enabled -fi - -exit \$? - -_EOF_ diff --git a/scripts/files/keys/authorized_keys b/scripts/files/keys/authorized_keys deleted file mode 100644 index 4093a71..0000000 --- a/scripts/files/keys/authorized_keys +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmQeA/uyEyFf9DsmwR+OztWb7Hb/uTC+R3xG1QgBvRwhSbpBnyBESGMZZ07bIw5Ib7BUSDzwoeryUqNAhAhir2KLeIYODS39UmTwOIl+rIvhlTxhsIoQHV90pewD2qw0T8KgVMPUDsQ0Bd98E6e5dbxciZp67ihVD0r7srhdSRo8PIc56hJWrD52j5FeiIGEmLXHXiZLOyma1M7j/EmiV81wHAzgql6sihWSZHm3xPZZ712JtXbmHhe3RLFIK13u9PSb3XbuEIdGwkZdzP+vYNE0CsYqwjXjVRrY/APsiEkbSNVzHI5p2W1L7ZMtSOMUqZ1Ve+sytVb+YcIJ9L8y07 trove@devstack
\ No newline at end of file diff --git a/scripts/files/keys/id_rsa b/scripts/files/keys/id_rsa deleted file mode 100644 index 041e61f..0000000 --- a/scripts/files/keys/id_rsa +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEpAIBAAKCAQEA5kHgP7shMhX/Q7JsEfjs7Vm+x2/7kwvkd8RtUIAb0cIUm6QZ -8gREhjGWdO2yMOSG+wVEg88KHq8lKjQIQIYq9ii3iGDg0t/VJk8DiJfqyL4ZU8Yb -CKEB1fdKXsA9qsNE/CoFTD1A7ENAXffBOnuXW8XImaeu4oVQ9K+7K4XUkaPDyHOe -oSVqw+do+RXoiBhJi1x14mSzspmtTO4/xJolfNcBwM4KperIoVkmR5t8T2We9dib -V25h4Xt0SxSCtd7vT0m9127hCHRsJGXcz/r2DRNArGKsI141Ua2PwD7IhJG0jVcx -yOadltS+2TLUjjFKmdVXvrMrVW/mHCCfS/MtOwIDAQABAoIBAQCTAQHbjmwuHu8e -2F24x7Tz//UWPT9fbRtK/6RO3ctlCsS/bXCHHARnrGcDdfHq1yv6PS21/UvXtThE -Dn4qO75X9DzgnAFNgEwELjPyVBM4YG2pF3SQ+MJESaI4hgGY8Rws5eMF/qFhdbo1 -hATggqFqnQZqWy0DP9wkq8ESk1nYNICehj0d6Mo5uW190TDMD6QrfHg4rDYbgITf -SCmsRdybCASlgOHCrYgjweG9czNoFimhaG8WwP59yfCX0A1TrDJ0toryyopupIre -A+5HHBM2Dk3KylrtVBAPRsM9eGUo4bmz8p6hRkuw7mr321d416MHdIXcHK38EWR0 -ZvUWM8QJAoGBAPlPe3ggR9xhEbQJQkOohnZ1hkogE/uxZrcRiUI3pnDNcCXy9Ogt -SYfwxYnHLa5kuynbmCCzSLOtq2DN9QwJ5o+zgRjX9T8DAWub6KFdEnTHhq/ZLF/w -PWPg3Oe8dYDEEcrPLvN25aetY2LrWKsRPFL8//WLJc1+LFRG6Vc1ATftAoGBAOxv -hGxNGrcD5c8g0ZcyeKVbCCRGfp0+mwonnQ25mDyIXNH+PEHa7SPs5dVexA5r0/Ky -lM/jQgs756EvslwA2oukqVz7ehDhJI4RE92OPjpYrAu7HF6eN/fAhUMghs/vAZ6c -YCM6i9emHYHM4mU6H/yLIr+0e2JNf+479bB5hQTHAoGBAOGnFUQXQ7OukE16C+Yd -RQc3PIMfIbcwTJ3qW2f54sY6zAUtMIptYx6NyN35z9kHB3jNb5Y5b9ZhnLqT7/Yj -h/INMQ4BedK8r65sgVR8X1YfukKzuLxlP8uFHa0KIPiZftkoSYDH3vmzsD86cRj1 -ErqykCH4/hBO4WSugkkSirXJAoGARXvQcvOF8lsW4nRGpCSVCCNklSSSeSu47JcP -tMTiVIfOn3gTxVbNck1gjgA3pfVSaHTK/v1On3aPb/NQe3FUyM0vaMAO8372+zlR -mT8AUq1Ugm4OvE/LKuhNQZkBhYI7+50BM9k0179d1JOdxRn75IAPSj+EMzOLcTv1 -zFMqIGkCgYBm5xT3Gu8fJh/8ztelzrDkGga6UpYKKYjHGFHpaqmDn9sjjCu8X2pG -JUGgyUVj1NkJAtHMS45Ud3upQwxpy2aNmMaQbwzHybvX7EYZHHVuCwsSzaXRtwj2 -Q6mG1Ghi0UQ76SPKQr0Vu8Uu+0CAzYAK4IEKeH6BCRjrzHggSpdNzQ== ------END RSA PRIVATE KEY-----
\ No newline at end of file diff --git a/scripts/files/keys/id_rsa.pub b/scripts/files/keys/id_rsa.pub deleted file mode 100644 index 4093a71..0000000 --- a/scripts/files/keys/id_rsa.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDmQeA/uyEyFf9DsmwR+OztWb7Hb/uTC+R3xG1QgBvRwhSbpBnyBESGMZZ07bIw5Ib7BUSDzwoeryUqNAhAhir2KLeIYODS39UmTwOIl+rIvhlTxhsIoQHV90pewD2qw0T8KgVMPUDsQ0Bd98E6e5dbxciZp67ihVD0r7srhdSRo8PIc56hJWrD52j5FeiIGEmLXHXiZLOyma1M7j/EmiV81wHAzgql6sihWSZHm3xPZZ712JtXbmHhe3RLFIK13u9PSb3XbuEIdGwkZdzP+vYNE0CsYqwjXjVRrY/APsiEkbSNVzHI5p2W1L7ZMtSOMUqZ1Ve+sytVb+YcIJ9L8y07 trove@devstack
\ No newline at end of file diff --git a/scripts/files/requirements/fedora-requirements-default.txt b/scripts/files/requirements/fedora-requirements-default.txt deleted file mode 100644 index c976bfa..0000000 --- a/scripts/files/requirements/fedora-requirements-default.txt +++ /dev/null @@ -1,31 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools -extras -python-novaclient>=2.22.0 -python-swiftclient>=2.2.0 -python-cinderclient>=1.1.0 -python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0 -kombu>=2.5.0 -babel>=1.3 -python-heatclient>=0.3.0 -passlib -jinja2>=2.6 -PyMySQL>=0.6.2 # MIT License -python-neutronclient>=2.3.11,<3 -netifaces>=0.10.4 -oslo.config>=1.9.3 # Apache-2.0 -oslo.messaging>=1.8.0 # Apache-2.0 -oslo.i18n>=1.5.0 # Apache-2.0 -oslo.serialization>=1.4.0 # Apache-2.0 -oslo.service>=0.1.0 # Apache-2.0 -oslo.utils>=1.4.0 # Apache-2.0 -oslo.log>=1.8.0 # Apache-2.0 -osprofiler>=0.3.0 -oslo.concurrency>=1.8.0 # Apache-2.0 -pexpect>=3.1,!=3.3 -enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD -pycrypto>=2.6 # Public Domain -xmltodict>=0.10.1 # MIT diff --git a/scripts/files/requirements/fedora-requirements-juno.txt b/scripts/files/requirements/fedora-requirements-juno.txt deleted file mode 100644 index a3ddea3..0000000 --- a/scripts/files/requirements/fedora-requirements-juno.txt +++ /dev/null @@ -1,19 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools>=0.9.34,!=1.4.0,<=1.5.0 -extras -python-novaclient>=2.18.0,<=2.20.0 -python-swiftclient>=2.2.0,<=2.3.1 -python-cinderclient>=1.1.0,<=1.1.1 -kombu>=2.5.0,<=3.0.7 -six>=1.7.0,<=1.9.0 -Babel>=1.3,<=1.3 -python-heatclient>=0.2.9,<0.3.0 -passlib<=1.6.2 -Jinja2<=2.7.2 -python-neutronclient>=2.3.6,<2.4.0 -netifaces>=0.10.4,<=0.10.4 -oslo.config>=1.4.0,<=1.6.0 # Apache-2.0 -oslo.utils>=1.4.0,<1.5.0 # Apache-2.0 diff --git a/scripts/files/requirements/fedora-requirements-kilo.txt b/scripts/files/requirements/fedora-requirements-kilo.txt deleted file mode 100644 index 48bda11..0000000 --- a/scripts/files/requirements/fedora-requirements-kilo.txt +++ /dev/null @@ -1,24 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools>=0.9.36,!=1.2.0 -extras -python-novaclient>=2.22.0,<2.24.0 -python-swiftclient>=2.2.0,<2.5.0 -python-cinderclient>=1.1.0,<1.2.0 -kombu>=2.5.0 -six>=1.9.0 -Babel>=1.3 -python-heatclient>=0.3.0,<0.5.0 -passlib -Jinja2>=2.6 # BSD License (3 clause) -python-neutronclient>=2.3.11,<2.5.0 -netifaces>=0.10.4 -oslo.config>=1.9.3,<1.10.0 # Apache-2.0 -oslo.i18n>=1.5.0,<1.6.0 # Apache-2.0 -oslo.serialization>=1.4.0,<1.5.0 # Apache-2.0 -oslo.utils>=1.4.0,<1.5.0 # Apache-2.0 -oslo.concurrency>=1.8.0,<1.9.0 # Apache-2.0 -oslo.messaging>=1.8.0,<1.9.0 # Apache-2.0 -osprofiler>=0.3.0 # Apache-2.0 diff --git a/scripts/files/requirements/fedora-requirements-liberty.txt b/scripts/files/requirements/fedora-requirements-liberty.txt deleted file mode 100644 index f47cbad..0000000 --- a/scripts/files/requirements/fedora-requirements-liberty.txt +++ /dev/null @@ -1,27 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools -extras -python-novaclient>=2.22.0 -python-swiftclient>=2.2.0 -python-cinderclient>=1.1.0 -kombu>=2.5.0 -babel>=1.3 -python-heatclient>=0.3.0 -passlib -jinja2>=2.6 -python-neutronclient>=2.3.11,<3 -netifaces>=0.10.4 -oslo.context>=0.2.0,<=1.0.0 -oslo.config>=1.9.3,<1.10.0 # Apache-2.0 -oslo.messaging>=1.8.0 # Apache-2.0 -oslo.i18n>=1.5.0,<1.6.0 # Apache-2.0 -oslo.serialization>=1.4.0,<1.5.0 # Apache-2.0 -oslo.service>=0.1.0 # Apache-2.0 -oslo.utils>=1.4.0,<1.5.0 # Apache-2.0 -oslo.log>=1.8.0 # Apache-2.0 -osprofiler>=0.3.0 -oslo.concurrency>=1.8.0,<1.9.0 # Apache-2.0 -pexpect>=3.1,!=3.3 diff --git a/scripts/files/requirements/fedora-requirements-mitaka.txt b/scripts/files/requirements/fedora-requirements-mitaka.txt deleted file mode 100644 index 6f8c478..0000000 --- a/scripts/files/requirements/fedora-requirements-mitaka.txt +++ /dev/null @@ -1,28 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools -extras -python-novaclient>=2.22.0 -python-swiftclient>=2.2.0 -python-cinderclient>=1.1.0 -kombu>=2.5.0 -babel>=1.3 -python-heatclient>=0.3.0 -passlib -jinja2>=2.6 -python-neutronclient>=2.3.11,<3 -netifaces>=0.10.4 -oslo.config>=1.9.3 # Apache-2.0 -oslo.messaging>=1.8.0 # Apache-2.0 -oslo.i18n>=1.5.0 # Apache-2.0 -oslo.serialization>=1.4.0 # Apache-2.0 -oslo.service>=0.1.0 # Apache-2.0 -oslo.utils>=1.4.0 # Apache-2.0 -oslo.log>=1.8.0 # Apache-2.0 -osprofiler>=0.3.0 -oslo.concurrency>=1.8.0 # Apache-2.0 -pexpect>=3.1,!=3.3 -enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD -pycrypto>=2.6 # Public Domain diff --git a/scripts/files/requirements/fedora-requirements-newton.txt b/scripts/files/requirements/fedora-requirements-newton.txt deleted file mode 100644 index c976bfa..0000000 --- a/scripts/files/requirements/fedora-requirements-newton.txt +++ /dev/null @@ -1,31 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools -extras -python-novaclient>=2.22.0 -python-swiftclient>=2.2.0 -python-cinderclient>=1.1.0 -python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0 -kombu>=2.5.0 -babel>=1.3 -python-heatclient>=0.3.0 -passlib -jinja2>=2.6 -PyMySQL>=0.6.2 # MIT License -python-neutronclient>=2.3.11,<3 -netifaces>=0.10.4 -oslo.config>=1.9.3 # Apache-2.0 -oslo.messaging>=1.8.0 # Apache-2.0 -oslo.i18n>=1.5.0 # Apache-2.0 -oslo.serialization>=1.4.0 # Apache-2.0 -oslo.service>=0.1.0 # Apache-2.0 -oslo.utils>=1.4.0 # Apache-2.0 -oslo.log>=1.8.0 # Apache-2.0 -osprofiler>=0.3.0 -oslo.concurrency>=1.8.0 # Apache-2.0 -pexpect>=3.1,!=3.3 -enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD -pycrypto>=2.6 # Public Domain -xmltodict>=0.10.1 # MIT diff --git a/scripts/files/requirements/ubuntu-requirements-default.txt b/scripts/files/requirements/ubuntu-requirements-default.txt deleted file mode 100644 index 9607060..0000000 --- a/scripts/files/requirements/ubuntu-requirements-default.txt +++ /dev/null @@ -1,30 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools -extras -python-novaclient>=2.18.0 -python-swiftclient>=2.2.0 -python-cinderclient>=1.1.0 -python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0 -kombu>=2.5.0 -six>=1.7.0 -babel -python-heatclient>=0.2.9 -passlib -jinja2 -PyMySQL>=0.6.2 # MIT License -python-neutronclient>=2.3.6,<3 -netifaces>=0.10.4 -oslo.config>=1.4.0 # Apache-2.0 -oslo.messaging>=1.4.0,!=1.5.0 -oslo.i18n>=1.0.0 -oslo.serialization>=1.0.0 -oslo.service>=0.1.0 # Apache-2.0 -oslo.utils>=1.1.0 -osprofiler>=0.3.0 -oslo.concurrency>=0.3.0 -enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD -pycrypto>=2.6 # Public Domain -xmltodict>=0.10.1 # MIT diff --git a/scripts/files/requirements/ubuntu-requirements-juno.txt b/scripts/files/requirements/ubuntu-requirements-juno.txt deleted file mode 100644 index a3ddea3..0000000 --- a/scripts/files/requirements/ubuntu-requirements-juno.txt +++ /dev/null @@ -1,19 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools>=0.9.34,!=1.4.0,<=1.5.0 -extras -python-novaclient>=2.18.0,<=2.20.0 -python-swiftclient>=2.2.0,<=2.3.1 -python-cinderclient>=1.1.0,<=1.1.1 -kombu>=2.5.0,<=3.0.7 -six>=1.7.0,<=1.9.0 -Babel>=1.3,<=1.3 -python-heatclient>=0.2.9,<0.3.0 -passlib<=1.6.2 -Jinja2<=2.7.2 -python-neutronclient>=2.3.6,<2.4.0 -netifaces>=0.10.4,<=0.10.4 -oslo.config>=1.4.0,<=1.6.0 # Apache-2.0 -oslo.utils>=1.4.0,<1.5.0 # Apache-2.0 diff --git a/scripts/files/requirements/ubuntu-requirements-kilo.txt b/scripts/files/requirements/ubuntu-requirements-kilo.txt deleted file mode 100644 index 48bda11..0000000 --- a/scripts/files/requirements/ubuntu-requirements-kilo.txt +++ /dev/null @@ -1,24 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools>=0.9.36,!=1.2.0 -extras -python-novaclient>=2.22.0,<2.24.0 -python-swiftclient>=2.2.0,<2.5.0 -python-cinderclient>=1.1.0,<1.2.0 -kombu>=2.5.0 -six>=1.9.0 -Babel>=1.3 -python-heatclient>=0.3.0,<0.5.0 -passlib -Jinja2>=2.6 # BSD License (3 clause) -python-neutronclient>=2.3.11,<2.5.0 -netifaces>=0.10.4 -oslo.config>=1.9.3,<1.10.0 # Apache-2.0 -oslo.i18n>=1.5.0,<1.6.0 # Apache-2.0 -oslo.serialization>=1.4.0,<1.5.0 # Apache-2.0 -oslo.utils>=1.4.0,<1.5.0 # Apache-2.0 -oslo.concurrency>=1.8.0,<1.9.0 # Apache-2.0 -oslo.messaging>=1.8.0,<1.9.0 # Apache-2.0 -osprofiler>=0.3.0 # Apache-2.0 diff --git a/scripts/files/requirements/ubuntu-requirements-liberty.txt b/scripts/files/requirements/ubuntu-requirements-liberty.txt deleted file mode 100644 index 1f3d0d7..0000000 --- a/scripts/files/requirements/ubuntu-requirements-liberty.txt +++ /dev/null @@ -1,26 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools -extras -python-novaclient>=2.18.0 -python-swiftclient>=2.2.0 -python-cinderclient>=1.1.0 -kombu>=2.5.0 -six>=1.7.0 -babel -python-heatclient>=0.2.9 -passlib -jinja2 -python-neutronclient>=2.3.6,<3 -netifaces>=0.10.4 -oslo.context>=0.2.0,<=1.0.0 -oslo.config>=1.4.0 # Apache-2.0 -oslo.messaging>=1.4.0,!=1.5.0 -oslo.i18n>=1.0.0 -oslo.serialization>=1.0.0 -oslo.service>=0.1.0 # Apache-2.0 -oslo.utils>=1.1.0 -osprofiler>=0.3.0 -oslo.concurrency>=0.3.0 diff --git a/scripts/files/requirements/ubuntu-requirements-mitaka.txt b/scripts/files/requirements/ubuntu-requirements-mitaka.txt deleted file mode 100644 index 8724d16..0000000 --- a/scripts/files/requirements/ubuntu-requirements-mitaka.txt +++ /dev/null @@ -1,27 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools -extras -python-novaclient>=2.18.0 -python-swiftclient>=2.2.0 -python-cinderclient>=1.1.0 -kombu>=2.5.0 -six>=1.7.0 -babel -python-heatclient>=0.2.9 -passlib -jinja2 -python-neutronclient>=2.3.6,<3 -netifaces>=0.10.4 -oslo.config>=1.4.0 # Apache-2.0 -oslo.messaging>=1.4.0,!=1.5.0 -oslo.i18n>=1.0.0 -oslo.serialization>=1.0.0 -oslo.service>=0.1.0 # Apache-2.0 -oslo.utils>=1.1.0 -osprofiler>=0.3.0 -oslo.concurrency>=0.3.0 -enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD -pycrypto>=2.6 # Public Domain diff --git a/scripts/files/requirements/ubuntu-requirements-newton.txt b/scripts/files/requirements/ubuntu-requirements-newton.txt deleted file mode 100644 index 9607060..0000000 --- a/scripts/files/requirements/ubuntu-requirements-newton.txt +++ /dev/null @@ -1,30 +0,0 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -unittest2 -testtools -extras -python-novaclient>=2.18.0 -python-swiftclient>=2.2.0 -python-cinderclient>=1.1.0 -python-keystoneclient>=2.0.0,!=2.1.0 # Apache-2.0 -kombu>=2.5.0 -six>=1.7.0 -babel -python-heatclient>=0.2.9 -passlib -jinja2 -PyMySQL>=0.6.2 # MIT License -python-neutronclient>=2.3.6,<3 -netifaces>=0.10.4 -oslo.config>=1.4.0 # Apache-2.0 -oslo.messaging>=1.4.0,!=1.5.0 -oslo.i18n>=1.0.0 -oslo.serialization>=1.0.0 -oslo.service>=0.1.0 # Apache-2.0 -oslo.utils>=1.1.0 -osprofiler>=0.3.0 -oslo.concurrency>=0.3.0 -enum34;python_version=='2.7' or python_version=='2.6' or python_version=='3.3' # BSD -pycrypto>=2.6 # Public Domain -xmltodict>=0.10.1 # MIT diff --git a/scripts/files/trove-guest.systemd.conf b/scripts/files/trove-guest.systemd.conf deleted file mode 100644 index 47bc2cf..0000000 --- a/scripts/files/trove-guest.systemd.conf +++ /dev/null @@ -1,32 +0,0 @@ -[Unit] -Description=Trove Guest -After=syslog.target -After=network.target - -[Service] -Type=simple -User=GUEST_USERNAME -Group=GUEST_USERNAME - -ExecStartPre=/bin/bash -c "sudo mkdir -p GUEST_LOGDIR ; sudo chown GUEST_USERNAME:root GUEST_LOGDIR" - -# If ~/trove-installed does not exist, copy the trove source from -# the user's development environment, then touch the sentinel file -ExecStartPre=/bin/bash -c "test -d /home/GUEST_USERNAME/trove-installed || sudo -u GUEST_USERNAME rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -avz --exclude='.*' HOST_SCP_USERNAME@CONTROLLER_IP:PATH_TROVE/ /home/GUEST_USERNAME/trove && touch /home/GUEST_USERNAME/trove-installed" - -# If /etc/trove does not exist, create it and then copy the trove-guestagent.conf -# from /etc/trove on the user's development environment, -ExecStartPre=/bin/bash -c "test -d /etc/trove/conf.d || sudo mkdir -p /etc/trove/conf.d && sudo -u GUEST_USERNAME rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -avz --exclude='.*' HOST_SCP_USERNAME@CONTROLLER_IP:/etc/trove/trove-guestagent.conf ~GUEST_USERNAME/ && sudo mv ~GUEST_USERNAME/trove-guestagent.conf /etc/trove/conf.d/trove-guestagent.conf" - -ExecStartPre=/bin/bash -c "sudo chown -R GUEST_USERNAME:root /etc/trove" - -ExecStart=/home/GUEST_USERNAME/trove/contrib/trove-guestagent --config-dir=/etc/trove/conf.d - -# Give a reasonable amount of time for the server to start up/shut down -TimeoutSec=300 - -# PgSql doesn't play nice with PrivateTmp -PrivateTmp=false - -[Install] -WantedBy=multi-user.target diff --git a/scripts/files/trove-guest.upstart.conf b/scripts/files/trove-guest.upstart.conf deleted file mode 100644 index 2e20d6c..0000000 --- a/scripts/files/trove-guest.upstart.conf +++ /dev/null @@ -1,40 +0,0 @@ -description "Trove Guest" -author "Auto-Gen" - -start on (filesystem and net-device-up IFACE!=lo) -stop on runlevel [016] -chdir /var/run -pre-start script - mkdir -p /var/run/trove - chown GUEST_USERNAME:root /var/run/trove/ - - mkdir -p /var/lock/trove - chown GUEST_USERNAME:root /var/lock/trove/ - - mkdir -p GUEST_LOGDIR - chown GUEST_USERNAME:root GUEST_LOGDIR - - # Copy the trove source from the user's development environment - if [ ! -d /home/GUEST_USERNAME/trove ]; then - sudo -u GUEST_USERNAME rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -avz --exclude='.*' HOST_SCP_USERNAME@CONTROLLER_IP:PATH_TROVE/ /home/GUEST_USERNAME/trove - fi - - # Ensure conf dir exists and is readable - mkdir -p /etc/trove/conf.d - chmod -R +r /etc/trove -end script - -script - # For backwards compatibility until https://review.openstack.org/#/c/100381 merges - TROVE_CONFIG="--config-dir=/etc/trove/conf.d" - if [ ! -f /etc/trove/conf.d/guest_info ] && [ ! -f /etc/trove/conf.d/trove-guestagent.conf ]; then - - chmod +r /etc/guest_info - sudo -u GUEST_USERNAME rsync -e 'ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' -avz --exclude='.*' HOST_SCP_USERNAME@CONTROLLER_IP:/etc/trove/trove-guestagent.conf ~GUEST_USERNAME/ - mv ~GUEST_USERNAME/trove-guestagent.conf /etc/trove/trove-guestagent.conf - TROVE_CONFIG="--config-file=/etc/guest_info --config-file=/etc/trove/trove-guestagent.conf" - - fi - - exec su -c "/home/GUEST_USERNAME/trove/contrib/trove-guestagent $TROVE_CONFIG" GUEST_USERNAME -end script |