From b462e19ddcb5f1ff0151347778ed42b384d72636 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Wed, 7 Aug 2019 11:20:44 -0400 Subject: [PATCH] Remove tripleo-deploy-openshift file We can now remove that file since https://review.rdoproject.org/r/#/c/21749/ has merged. Change-Id: I80a7220c0100ffb15c210b1bccc72e4d9217c23f --- scripts/tripleo-deploy-openshift | 110 ------------------------------- setup.cfg | 1 - sudoers | 3 +- 3 files changed, 1 insertion(+), 113 deletions(-) delete mode 100755 scripts/tripleo-deploy-openshift diff --git a/scripts/tripleo-deploy-openshift b/scripts/tripleo-deploy-openshift deleted file mode 100755 index 0e0f0fff9..000000000 --- a/scripts/tripleo-deploy-openshift +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash - -build_default_image () { - if [ -f /usr/share/openstack-tripleo-common/common/container-images/container_image_prepare_defaults.yaml ]; then - local default_file=/usr/share/openstack-tripleo-common/common/container-images/container_image_prepare_defaults.yaml - elif [ -f ${BASH_SOURCE%/*}/../container-images/container_image_prepare_defaults.yaml ]; then - local default_file=${BASH_SOURCE%/*}/../container-images/container_image_prepare_defaults.yaml - else - echo "docker.io/openshift/origin-ansible:latest" - exit - fi - local namespace=$(awk '/openshift_namespace:/ {print $2}' $default_file) - local prefix=$(awk '/openshift_prefix:/ {print $2}' $default_file) - local tag=$(awk '/openshift_tag:/ {print $2}' $default_file) - echo ${namespace}/${prefix}-ansible:${tag} -} - -OPENSHIFT_ANSIBLE_DEFAULT_IMAGE=$(build_default_image) - -: ${PLAN_NAME:=openshift} -: ${CONFIG_DOWNLOAD_DIR:=} -: ${OPENSHIFT_PLAYBOOK:=} -: ${OPENSHIFT_ANSIBLE_IMAGE:=$OPENSHIFT_ANSIBLE_DEFAULT_IMAGE} -: ${OPENSHIFT_ANSIBLE_DIR:=} - -usage () { - echo "Usage: $0 [options] [extra_ansible_options...]" - echo "" - echo "Options:" - echo " -i, --image the openshift-ansible image tag to use. Defaults to" - echo " $OPENSHIFT_ANSIBLE_DEFAULT_IMAGE" - echo " -d, --config-download-dir the path to the config-download directory for openshift" - echo " DEPRECATED use --plan instead" - echo " -n, --plan the plan name. Defaults to $PLAN_NAME" - echo " -p, --playbook the path of the playbook to run. Defaults to" - echo " openshift/playbook.yml in the config-download directory" - echo " --osa the path to openshift-ansible directory. Mutually" - echo " exclusive with --image" - echo " -h, --help print this help and exit" -} - -OPTS=`getopt -o hd:n:i:p: --long help,config-download-dir:,plan:,image:,playbook:,osa: -- "$@"` -eval set -- "$OPTS" - -while true; do - case "$1" in - -h | --help) - usage; exit ;; - -d | --config-download-dir) - echo "--config-download-dir is deprecated, use --plan instead" - shift - export CONFIG_DOWNLOAD_DIR=$1; shift ;; - -n | --plan) - shift - export PLAN_NAME=$1 - shift ;; - -p | --playbook) - shift - export OPENSHIFT_PLAYBOOK=$1; shift ;; - -i | --image) - shift - export OPENSHIFT_ANSIBLE_IMAGE=$1; shift ;; - --osa) - shift - export OPENSHIFT_ANSIBLE_DIR=$1; shift ;; - --) shift ; break ;; - * ) break ;; - esac -done - -if [[ -z $CONFIG_DOWNLOAD_DIR ]]; then - export CONFIG_DOWNLOAD_DIR=/var/lib/mistral/${PLAN_NAME} -fi -if [[ ! -d $CONFIG_DOWNLOAD_DIR ]]; then - echo "Config-download directory doesn't exist at ${CONFIG_DOWNLOAD_DIR}" - exit -fi - -if [[ -z $OPENSHIFT_PLAYBOOK ]]; then - export OPENSHIFT_PLAYBOOK=${CONFIG_DOWNLOAD_DIR}/openshift/playbook.yml -fi - -ANSIBLE_OPTS="-e @${CONFIG_DOWNLOAD_DIR}/openshift/global_vars.yml" -if [[ -f ${CONFIG_DOWNLOAD_DIR}/openshift/global_gluster_vars.yml ]]; then - ANSIBLE_OPTS="${ANSIBLE_OPTS} -e @${CONFIG_DOWNLOAD_DIR}/openshift/global_gluster_vars.yml" -fi -ANSIBLE_OPTS="${ANSIBLE_OPTS} $@" - -if [ -z $OPENSHIFT_ANSIBLE_DIR ]; then - sudo podman run \ - --net=host \ - -u `id -u` \ - -v ${CONFIG_DOWNLOAD_DIR}:${CONFIG_DOWNLOAD_DIR}:z \ - -w ${CONFIG_DOWNLOAD_DIR} \ - -e ANSIBLE_HOST_KEY_CHECKING=False \ - -e ANSIBLE_CONFIG=${CONFIG_DOWNLOAD_DIR}/ansible.cfg \ - -e INVENTORY_DIR=${CONFIG_DOWNLOAD_DIR}/openshift/inventory \ - -e PLAYBOOK_FILE=${OPENSHIFT_PLAYBOOK} \ - -e OPTS="${ANSIBLE_OPTS}" \ - -t ${OPENSHIFT_ANSIBLE_IMAGE} -else - pushd ${CONFIG_DOWNLOAD_DIR} - ANSIBLE_HOST_KEY_CHECKING=False \ - ANSIBLE_CONFIG=${CONFIG_DOWNLOAD_DIR}/ansible.cfg \ - ansible-playbook \ - -i ${CONFIG_DOWNLOAD_DIR}/openshift/inventory \ - ${ANSIBLE_OPTS} \ - ${OPENSHIFT_PLAYBOOK} - popd -fi diff --git a/setup.cfg b/setup.cfg index e8847a216..4206dcacb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -32,7 +32,6 @@ scripts = scripts/tripleo-build-images scripts/tripleo-config-download scripts/tripleo-container-image-prepare - scripts/tripleo-deploy-openshift scripts/upload-puppet-modules scripts/upload-swift-artifacts diff --git a/sudoers b/sudoers index 66461170d..ee501756c 100644 --- a/sudoers +++ b/sudoers @@ -18,5 +18,4 @@ mistral ALL = NOPASSWD: /bin/nova-manage cell_v2 discover_hosts * mistral ALL = NOPASSWD: /usr/bin/tar --xattrs --ignore-failed-read -C / -cf /var/tmp/undercloud-backup-*.tar * mistral ALL = NOPASSWD: /usr/bin/chown mistral. /var/tmp/undercloud-backup-*/filesystem-*.tar mistral ALL = NOPASSWD: /usr/bin/tripleo-container-image-prepare * -mistral ALL = NOPASSWD: /usr/bin/tripleo-deploy-openshift * -validations ALL = NOPASSWD: ALL \ No newline at end of file +validations ALL = NOPASSWD: ALL