From fb8dfb4aa5ae4d675175cdd0e6b22242db4a17aa Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Wed, 25 May 2016 12:22:22 +0100 Subject: [PATCH] Remove tuskar element We no longer support or develop tuskar, so remove this element Change-Id: I442572c7f4d1c00f5f4823ee1efc584d79ea511a --- elements/tuskar/README.md | 20 ----- elements/tuskar/element-deps | 7 -- .../environment.d/10-tuskar-venv-dir.bash | 6 -- .../tuskar/install.d/package-installs-tuskar | 1 - .../package-installs-tuskar | 1 - .../tuskar-source-install/100-tuskar-api | 12 --- .../etc/tuskar/nova_overcloud_config.yml | 5 -- .../os-apply-config/etc/tuskar/tuskar.conf | 12 --- .../configure.d/90-tuskar-db-sync | 84 ------------------- .../post-configure.d/100-tuskar-api | 5 -- .../post-configure.d/101-plan-add-roles | 70 ---------------- .../pre-configure.d/97-tuskar-fedora-iptables | 4 - elements/tuskar/pkg-map | 5 -- elements/tuskar/source-repository-tuskar | 1 - elements/tuskar/svc-map | 2 - 15 files changed, 235 deletions(-) delete mode 100644 elements/tuskar/README.md delete mode 100644 elements/tuskar/element-deps delete mode 100644 elements/tuskar/environment.d/10-tuskar-venv-dir.bash delete mode 100644 elements/tuskar/install.d/package-installs-tuskar delete mode 100644 elements/tuskar/install.d/tuskar-package-install/package-installs-tuskar delete mode 100755 elements/tuskar/install.d/tuskar-source-install/100-tuskar-api delete mode 100644 elements/tuskar/os-apply-config/etc/tuskar/nova_overcloud_config.yml delete mode 100644 elements/tuskar/os-apply-config/etc/tuskar/tuskar.conf delete mode 100755 elements/tuskar/os-refresh-config/configure.d/90-tuskar-db-sync delete mode 100755 elements/tuskar/os-refresh-config/post-configure.d/100-tuskar-api delete mode 100755 elements/tuskar/os-refresh-config/post-configure.d/101-plan-add-roles delete mode 100755 elements/tuskar/os-refresh-config/pre-configure.d/97-tuskar-fedora-iptables delete mode 100644 elements/tuskar/pkg-map delete mode 100644 elements/tuskar/source-repository-tuskar delete mode 100644 elements/tuskar/svc-map diff --git a/elements/tuskar/README.md b/elements/tuskar/README.md deleted file mode 100644 index 960b5568c..000000000 --- a/elements/tuskar/README.md +++ /dev/null @@ -1,20 +0,0 @@ -Install and configure Tuskar. - -Configuration -------------- - -Tuskar API requires the following keys to be set via Heat Metadata. - - tuskar: - overcloud-admin-password: - - the password of the overcloud admin user. Use - OvercloudAdminPassword template parameter to - override this option. - db: "mysql://tuskar:unset@localhost/tuskar?charset=utf8" - - the connection string for a DB to be used by tuskar-api. - username: - - the name of the user to deploy the overcloud on behalf of - password: - - the password of the user to deploy the overcloud on behalf of - tenant_name: - - the tenant name of the user to deploy the overcloud on behalf of diff --git a/elements/tuskar/element-deps b/elements/tuskar/element-deps deleted file mode 100644 index c3edaea85..000000000 --- a/elements/tuskar/element-deps +++ /dev/null @@ -1,7 +0,0 @@ -os-apply-config -os-is-bootstrap-host -os-refresh-config -os-svc-install -package-installs -source-repositories -tripleo-heat-templates diff --git a/elements/tuskar/environment.d/10-tuskar-venv-dir.bash b/elements/tuskar/environment.d/10-tuskar-venv-dir.bash deleted file mode 100644 index 2586fdb60..000000000 --- a/elements/tuskar/environment.d/10-tuskar-venv-dir.bash +++ /dev/null @@ -1,6 +0,0 @@ -if [ -z "${TUSKAR_VENV_DIR:-}" ]; then - export TUSKAR_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/tuskar"} -fi -if [ -z "${TUSKAR_EXTRA_INSTALL_OPTS:-}" ]; then - export TUSKAR_EXTRA_INSTALL_OPTS=${OPENSTACK_EXTRA_INSTALL_OPTS:-""} -fi diff --git a/elements/tuskar/install.d/package-installs-tuskar b/elements/tuskar/install.d/package-installs-tuskar deleted file mode 100644 index 069af9128..000000000 --- a/elements/tuskar/install.d/package-installs-tuskar +++ /dev/null @@ -1 +0,0 @@ -swig diff --git a/elements/tuskar/install.d/tuskar-package-install/package-installs-tuskar b/elements/tuskar/install.d/tuskar-package-install/package-installs-tuskar deleted file mode 100644 index a5b9f1211..000000000 --- a/elements/tuskar/install.d/tuskar-package-install/package-installs-tuskar +++ /dev/null @@ -1 +0,0 @@ -tuskar_package diff --git a/elements/tuskar/install.d/tuskar-source-install/100-tuskar-api b/elements/tuskar/install.d/tuskar-source-install/100-tuskar-api deleted file mode 100755 index 3bdcd8b9f..000000000 --- a/elements/tuskar/install.d/tuskar-source-install/100-tuskar-api +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -set -eux - -os-svc-install $TUSKAR_EXTRA_INSTALL_OPTS -i "$TUSKAR_VENV_DIR" -u tuskar -r /opt/stack/tuskar - -install -d -m 0750 -o tuskar -g tuskar /etc/tuskar -cp -a /opt/stack/tuskar/etc/tuskar/policy.json /etc/tuskar - -os-svc-daemon -i "$TUSKAR_VENV_DIR" tuskar-api tuskar tuskar-api "--config-dir /etc/tuskar" - -ln -s $TUSKAR_VENV_DIR/bin/tuskar-dbsync /usr/local/bin/tuskar-dbsync -ln -s $TUSKAR_VENV_DIR/bin/tuskar-load-roles /usr/local/bin/tuskar-load-roles diff --git a/elements/tuskar/os-apply-config/etc/tuskar/nova_overcloud_config.yml b/elements/tuskar/os-apply-config/etc/tuskar/nova_overcloud_config.yml deleted file mode 100644 index 2251f127f..000000000 --- a/elements/tuskar/os-apply-config/etc/tuskar/nova_overcloud_config.yml +++ /dev/null @@ -1,5 +0,0 @@ -nova_username: "admin" -nova_tenantname: "admin" -# NOTE(rpodolyaka): limitation of tuskar-api, see https://bugs.launchpad.net/tuskar/+bug/1235236 -nova_password: "{{tuskar.overcloud-admin-password}}" -keystone_url: "http://{{tuskar.overcloud-keystone-host}}:5000/v2.0/" diff --git a/elements/tuskar/os-apply-config/etc/tuskar/tuskar.conf b/elements/tuskar/os-apply-config/etc/tuskar/tuskar.conf deleted file mode 100644 index c39174684..000000000 --- a/elements/tuskar/os-apply-config/etc/tuskar/tuskar.conf +++ /dev/null @@ -1,12 +0,0 @@ -[DEFAULT] -auth_strategy=keystone - -[database] -connection={{tuskar.db}} - -[keystone_authtoken] -admin_password={{tuskar.service-password}} -admin_tenant_name=service -admin_user=tuskar -auth_uri = http://{{keystone.host}}:5000/v2.0 -identity_uri=http://{{keystone.host}}:35357 diff --git a/elements/tuskar/os-refresh-config/configure.d/90-tuskar-db-sync b/elements/tuskar/os-refresh-config/configure.d/90-tuskar-db-sync deleted file mode 100755 index 5135652ad..000000000 --- a/elements/tuskar/os-refresh-config/configure.d/90-tuskar-db-sync +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/bash -set -eux -TUSKAR_CONF=/etc/tuskar/tuskar.conf -TUSKAR_ROLE_DIRECTORY=${TUSKAR_ROLE_DIRECTORY:-} - -function load_roles() { - TUSKAR_LOAD_ROLE_BASE="tuskar-load-role --config-file $TUSKAR_CONF " - roles=( $(echo "$1") ) - dir="${2}" ; - suffix="${3}" - extra_data="${4}" - for ROLE in ${roles[@]}; do - lowercase=`echo $ROLE | tr '[:upper:]' '[:lower:]'` - if [ -f $dir/$lowercase$suffix ]; then - TUSKAR_LOAD_ROLE="$TUSKAR_LOAD_ROLE_BASE -n $ROLE - -f $dir/$lowercase$suffix $extra_data" - $TUSKAR_LOAD_ROLE # only need to load this once - # only need to load this once, so clear variable - extra_data= - fi - done -} - -if [ -z "$TUSKAR_ROLE_DIRECTORY" ]; then - if [ -d /usr/share/openstack-tripleo-heat-templates/ ]; then - # Fedora/RHEL RPMs store the templates here - TUSKAR_ROLE_DIRECTORY='/usr/share/openstack-tripleo-heat-templates/' - else - # Default to the source installed version - TUSKAR_ROLE_DIRECTORY='/opt/stack/tripleo-heat-templates' - fi -fi - -if os-is-bootstrap-host ; then - su -s /bin/bash -c "tuskar-dbsync --config-file $TUSKAR_CONF" tuskar - - # pop trailing / from role directory if it is there - TUSKAR_ROLE_DIRECTORY=`echo $TUSKAR_ROLE_DIRECTORY | sed 's/\/$//'` - - # Load the master seed and puppet or non-puppet roles, accordingly - PUPPET_DIR="$TUSKAR_ROLE_DIRECTORY/puppet" - OVERCLOUD_PLAN="$TUSKAR_ROLE_DIRECTORY/overcloud-without-mergepy.yaml" - TUSKAR_LOAD_SEED="tuskar-load-seed --config-file $TUSKAR_CONF - --master-seed $OVERCLOUD_PLAN " - if [ -d $PUPPET_DIR ]; then - TUSKAR_RESOURCE_REGISTRY=${TUSKAR_RESOURCE_REGISTRY:-"$TUSKAR_ROLE_DIRECTORY/overcloud-resource-registry-puppet.yaml"} - TUSKAR_LOAD_SEED="$TUSKAR_LOAD_SEED --resource-registry $TUSKAR_RESOURCE_REGISTRY" - $TUSKAR_LOAD_SEED - - # Collect any role extra-data - ROLE_EXTRA_DATA="" - for puppet_extra_dir in hieradata manifests; do - if [ -d "$PUPPET_DIR/$puppet_extra_dir" ]; then - for i in `ls -1 "$PUPPET_DIR/$puppet_extra_dir"` ; do - ROLE_EXTRA_DATA="$ROLE_EXTRA_DATA --extra-data - $PUPPET_DIR/$puppet_extra_dir/$i " - done - fi - done - - # extraconfig/tasks includes package update script/template - # also grab validation scripts - for i in `find "$TUSKAR_ROLE_DIRECTORY/extraconfig/tasks" \ - "$TUSKAR_ROLE_DIRECTORY/validation-scripts/" -type f`; do - ROLE_EXTRA_DATA="$ROLE_EXTRA_DATA --extra-data $i " - done - - ROLES=( "Compute" "Controller" "Swift-Storage" "Cinder-Storage" "Ceph-Storage" ) - # we are dropping the -puppet.yaml extension upstream - if ls $PUPPET_DIR/*-puppet.yaml &>/dev/null; then - load_roles "$(echo ${ROLES[@]})" $PUPPET_DIR "-puppet.yaml" "$ROLE_EXTRA_DATA" - else - load_roles "$(echo ${ROLES[@]})" $PUPPET_DIR ".yaml" "$ROLE_EXTRA_DATA" - fi - else - TUSKAR_RESOURCE_REGISTRY=${TUSKAR_RESOURCE_REGISTRY:-"$TUSKAR_ROLE_DIRECTORY/overcloud-resource-registry.yaml"} - TUSKAR_LOAD_SEED="$TUSKAR_LOAD_SEED --resource-registry $TUSKAR_RESOURCE_REGISTRY" - $TUSKAR_LOAD_SEED - - # Load the non-puppet roles if there: - ROLES=( "Compute" "Controller" "Swift-Storage" "Cinder-Storage" "Ceph-Storage" ) - load_roles "$(echo ${ROLES[@]})" $TUSKAR_ROLE_DIRECTORY ".yaml" - fi -fi diff --git a/elements/tuskar/os-refresh-config/post-configure.d/100-tuskar-api b/elements/tuskar/os-refresh-config/post-configure.d/100-tuskar-api deleted file mode 100755 index 989328f10..000000000 --- a/elements/tuskar/os-refresh-config/post-configure.d/100-tuskar-api +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -set -eux - -os-svc-enable -an tuskar-api -os-svc-restart -an tuskar-api diff --git a/elements/tuskar/os-refresh-config/post-configure.d/101-plan-add-roles b/elements/tuskar/os-refresh-config/post-configure.d/101-plan-add-roles deleted file mode 100755 index 115e468c2..000000000 --- a/elements/tuskar/os-refresh-config/post-configure.d/101-plan-add-roles +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -source /root/stackrc - -i="0" -while tuskar plan-list 2>&1 | grep "Max retries"; do - i=$[$i+1] - if [ "$i" -gt "10" ]; then - echo "Could not connect to tuskar-api service" 1>&2 - exit 1 - fi -done - - -PLAN_ID=$(tuskar plan-show overcloud | awk '$2=="uuid" {print $4}') - -if [ -z "$PLAN_ID" ]; then - tuskar plan-create overcloud - PLAN_ID=$(tuskar plan-show overcloud | awk '$2=="uuid" {print $4}') - NEW_PLAN="yes" -fi - -for ROLE_NAME in "Controller" "Compute" "Swift-Storage" "Cinder-Storage" "Ceph-Storage" ; do - ROLE_ID=$(tuskar role-list | awk '$4==VAR {print $2}' VAR="$ROLE_NAME") - ROLE_EXISTS=$(tuskar plan-show $PLAN_ID | grep $ROLE_ID) - if [ -z "$ROLE_EXISTS" ]; then - tuskar plan-add-role $PLAN_ID -r $ROLE_ID - fi -done - -if [ -n "$NEW_PLAN" ]; then - # Set defaults - tuskar plan-update -P Ceph-Storage-1::Flavor=baremetal \ - -P Ceph-Storage-1::count=0 \ - -P Ceph-Storage-1::Image=overcloud-full \ - -P Cinder-Storage-1::CinderISCSIHelper=lioadm \ - -P Cinder-Storage-1::count=0 \ - -P Cinder-Storage-1::Image=overcloud-full \ - -P Cinder-Storage-1::Flavor=baremetal \ - -P Compute-1::count=1 \ - -P Compute-1::Flavor=baremetal \ - -P Compute-1::Image=overcloud-full \ - -P Compute-1::NeutronBridgeMappings=datacentre:br-ex \ - -P Compute-1::NeutronEnableTunnelling=True \ - -P Compute-1::NeutronFlatNetworks=datacentre \ - -P Compute-1::NeutronNetworkType=gre \ - -P Compute-1::NeutronNetworkVLANRanges=datacentre:1:1000 \ - -P Compute-1::NeutronPhysicalBridge=br-ex \ - -P Compute-1::NeutronPublicInterface=nic1 \ - -P Compute-1::NeutronTunnelTypes=gre \ - -P Compute-1::NovaComputeLibvirtType=qemu \ - -P Compute-1::NtpServer= \ - -P Controller-1::CinderISCSIHelper=lioadm \ - -P Controller-1::CloudName=overcloud \ - -P Controller-1::count=1 \ - -P Controller-1::Flavor=baremetal \ - -P Controller-1::Image=overcloud-full \ - -P Controller-1::NeutronBridgeMappings=datacentre:br-ex \ - -P Controller-1::NeutronEnableTunnelling=True \ - -P Controller-1::NeutronFlatNetworks=datacentre \ - -P Controller-1::NeutronNetworkType=gre \ - -P Controller-1::NeutronNetworkVLANRanges=datacentre:1:1000 \ - -P Controller-1::NeutronPublicInterface=nic1 \ - -P Controller-1::NeutronTunnelTypes=gre \ - -P Controller-1::NtpServer= \ - -P Swift-Storage-1::count=0 \ - -P Swift-Storage-1::Flavor=baremetal \ - -P Swift-Storage-1::Image=overcloud-full \ - $PLAN_ID -fi diff --git a/elements/tuskar/os-refresh-config/pre-configure.d/97-tuskar-fedora-iptables b/elements/tuskar/os-refresh-config/pre-configure.d/97-tuskar-fedora-iptables deleted file mode 100755 index 1b52aa314..000000000 --- a/elements/tuskar/os-refresh-config/pre-configure.d/97-tuskar-fedora-iptables +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -set -eu - -add-rule INPUT -p tcp --dport 8585 -j ACCEPT diff --git a/elements/tuskar/pkg-map b/elements/tuskar/pkg-map deleted file mode 100644 index bf7285b0b..000000000 --- a/elements/tuskar/pkg-map +++ /dev/null @@ -1,5 +0,0 @@ -{ - "default": { - "tuskar_package": "openstack-tuskar" - } -} diff --git a/elements/tuskar/source-repository-tuskar b/elements/tuskar/source-repository-tuskar deleted file mode 100644 index 54e2d7d50..000000000 --- a/elements/tuskar/source-repository-tuskar +++ /dev/null @@ -1 +0,0 @@ -tuskar git /opt/stack/tuskar https://git.openstack.org/openstack/tuskar diff --git a/elements/tuskar/svc-map b/elements/tuskar/svc-map deleted file mode 100644 index 7053e5519..000000000 --- a/elements/tuskar/svc-map +++ /dev/null @@ -1,2 +0,0 @@ -tuskar-api: - default: openstack-tuskar-api