Merge "DevStack plugin updates for bionic job"

This commit is contained in:
Zuul 2019-02-22 16:52:14 +00:00 committed by Gerrit Code Review
commit 718e23254f
4 changed files with 51 additions and 36 deletions

View File

@ -27,6 +27,7 @@
timeout: 7800 timeout: 7800
required-projects: required-projects:
- openstack/stx-fault - openstack/stx-fault
- openstack/stx-update
vars: vars:
tox_envlist: functional tox_envlist: functional
devstack_services: devstack_services:
@ -62,6 +63,7 @@
devstack_plugins: devstack_plugins:
stx-fault: git://git.starlingx.io/stx-fault stx-fault: git://git.starlingx.io/stx-fault
stx-integ: git://git.starlingx.io/stx-integ stx-integ: git://git.starlingx.io/stx-integ
stx-update: git://git.starlingx.io/stx-update
devstack_localrc: devstack_localrc:
LIBS_FROM_GIT: keystone LIBS_FROM_GIT: keystone
files: files:

View File

@ -1,13 +1,7 @@
#!/bin/bash #!/bin/bash
# #
# lib/stx-integ # lib/stx-integ
# Functions to control the configuration and operation of stx-integ
# Dependencies:
# #
# - ``functions`` file
# - ``DEST``, ``DATA_DIR``, ``STACK_USER`` must be defined
# ``plugin.sh`` calls the entry points in this order: # ``plugin.sh`` calls the entry points in this order:
# #
# - install_integ # - install_integ
@ -27,30 +21,11 @@ STXINTEG_DIR=${GITDIR[$STX_INTEG_NAME]}
PLATFORM_UTIL_DIR=$STXINTEG_DIR/utilities/platform-util PLATFORM_UTIL_DIR=$STXINTEG_DIR/utilities/platform-util
STX_BIN_DIR=$(get_python_exec_prefix) # STX_INST_DIR should be a non-root-writable place to install build artifacts
STX_INST_DIR=${STX_INST_DIR:-$DEST/usr}
STX_BIN_DIR=$STX_INST_DIR/bin
PYTHON_SITE_DIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") PYTHON_SITE_DIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
function install_platform_util {
pushd $PLATFORM_UTIL_DIR/platform-util
sudo python setup.py install --root=/ --install-lib=$PYTHON_SITE_DIR --prefix=/usr --install-data=/usr/share --single-version-externally-managed
popd
local stx_integ_sbindir=/usr/local/sbin/
local systemddir=/etc/systemd
sudo install -m 755 -d ${stx_integ_sbindir}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/patch-restart-mtce ${stx_integ_sbindir}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/patch-restart-processes ${stx_integ_sbindir}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/patch-restart-haproxy ${stx_integ_sbindir}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/cgcs_tc_setup.sh ${STX_BIN_DIR}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/remotelogging_tc_setup.sh ${STX_BIN_DIR}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/connectivity_test ${STX_BIN_DIR}
# sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/opt-platform.mount ${systemddir}/system
# sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/opt-platform.service ${systemddir}/system
# sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/memcached.service ${systemddir}/system
}
function cleanup_integ { function cleanup_integ {
# Cleanup the service # Cleanup the service
stop_integ stop_integ
@ -73,14 +48,40 @@ function install_integ {
fi fi
} }
function sart_integ { function install_platform_util {
# Shut the service down pushd $PLATFORM_UTIL_DIR/platform-util
: sudo python setup.py install \
--root=/ \
--install-lib=$PYTHON_SITE_DIR \
--prefix=/usr \
--install-data=/usr/share \
--single-version-externally-managed
popd
local stx_integ_sbindir=$STX_INST_DIR/sbin
local systemddir=/etc/systemd
sudo install -m 755 -d ${stx_integ_sbindir}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/patch-restart-mtce ${stx_integ_sbindir}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/patch-restart-processes ${stx_integ_sbindir}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/patch-restart-haproxy ${stx_integ_sbindir}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/cgcs_tc_setup.sh ${STX_BIN_DIR}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/remotelogging_tc_setup.sh ${STX_BIN_DIR}
sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/connectivity_test ${STX_BIN_DIR}
# sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/opt-platform.mount ${systemddir}/system
# sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/opt-platform.service ${systemddir}/system
# sudo install -m 755 $PLATFORM_UTIL_DIR/scripts/memcached.service ${systemddir}/system
} }
function stop_integ { function start_integ {
# Initialize and start the service # Initialize and start the service
: :
} }
function stop_integ {
# Shut the service down
:
}
$_XTRACE_STX_INTEG $_XTRACE_STX_INTEG

View File

@ -1,8 +1,9 @@
#!/bin/bash #!/bin/bash
# ``stack.sh`` calls the entry points in this order: # devstack/plugin.sh
# # Triggers specific functions to install and configure stx-integ
echo_summary "integ devstack plugin.sh called: $1/$2"
echo_summary "stx-integ devstack plugin.sh called: $1/$2"
# check for service enabled # check for service enabled
if is_service_enabled stx-integ; then if is_service_enabled stx-integ; then
@ -18,6 +19,7 @@ if is_service_enabled stx-integ; then
# Initialize and start the service # Initialize and start the service
echo_summary "Initialize and start stx-integ" echo_summary "Initialize and start stx-integ"
init_integ init_integ
start_integ
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
# do sanity test # do sanity test
echo_summary "do test-config" echo_summary "do test-config"

View File

@ -1,6 +1,13 @@
#!/bin/bash #!/bin/bash
# Devstack settings # Devstack settings
# This plugin enables StarlingX stx-integ services and follows the
# DevStack plugin contract:
# https://docs.openstack.org/devstack/latest/plugins.html#plugin-sh-contract
# Services
# platform-util
# Defaults # Defaults
# -------- # --------
@ -9,7 +16,10 @@ STX_INTEG_NAME=stx-integ
######### Plugin Specific ########## ######### Plugin Specific ##########
enable_service $STX_INTEG_NAME enable_service $STX_INTEG_NAME
#platform_license # This must not use any variables to work properly in OpenStack's DevStack playbook
define_plugin stx-integ
# This works for Zuul jobs using OpenStack's DevStack roles
plugin_requires stx-integ stx-update
# Initial source of lib script # Initial source of lib script
source $DEST/stx-integ/devstack/lib/stx-integ source $DEST/stx-integ/devstack/lib/stx-integ