Add a minimal DevStack job
This is just enough DevStack to test the plugin. Depends-On: https://review.openstack.org/613973 Change-Id: I6e34c3c2e400235259cd13cdc7b45ea4baccd4bc Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
099e01bec4
commit
62abfa4787
49
.zuul.yaml
49
.zuul.yaml
@ -8,6 +8,8 @@
|
||||
- openstack-tox-linters
|
||||
- openstack-tox-pep8
|
||||
- stx-updates-pylint
|
||||
- stx-devstack-update:
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- build-openstack-releasenotes
|
||||
@ -26,3 +28,50 @@
|
||||
- openstack/stx-config
|
||||
- openstack/stx-fault
|
||||
- openstack/stx-integ
|
||||
|
||||
- job:
|
||||
name: stx-devstack-update
|
||||
parent: stx-devstack-base
|
||||
timeout: 7800
|
||||
required-projects:
|
||||
- openstack/stx-fault
|
||||
vars:
|
||||
tox_envlist: functional
|
||||
devstack_services:
|
||||
# Cinder services
|
||||
c-api: false
|
||||
c-bak: false
|
||||
c-sch: false
|
||||
c-vol: false
|
||||
cinder: false
|
||||
# Glance services
|
||||
g-api: false
|
||||
g-reg: false
|
||||
# Nova services
|
||||
n-api: false
|
||||
n-api-meta: false
|
||||
n-cauth: false
|
||||
n-cond: false
|
||||
n-cpu: false
|
||||
n-novnc: false
|
||||
n-obj: false
|
||||
n-sch: false
|
||||
placement-api: false
|
||||
# Neutron services
|
||||
q-agt: true
|
||||
q-dhcp: false
|
||||
q-l3: false
|
||||
q-meta: false
|
||||
q-metering: false
|
||||
q-svc: false
|
||||
horizon: false
|
||||
# StarlingX services
|
||||
sw-patch: true
|
||||
tsconfig: true
|
||||
devstack_plugins:
|
||||
stx-fault: git://git.starlingx.io/stx-fault
|
||||
stx-update: git://git.starlingx.io/stx-update
|
||||
devstack_localrc:
|
||||
LIBS_FROM_GIT: keystone
|
||||
files:
|
||||
- ^devstack/.*
|
||||
|
@ -7,19 +7,15 @@
|
||||
#
|
||||
# - ``functions`` file
|
||||
# - ``DEST``, ``DATA_DIR``, ``STACK_USER`` must be defined
|
||||
# - ``SERVICE_{TENANT_NAME|PASSWORD}`` must be defined
|
||||
# - ``SERVICE_HOST``
|
||||
# - ``KEYSTONE_TOKEN_FORMAT`` must be defined
|
||||
|
||||
# ``stack.sh`` calls the entry points in this order:
|
||||
#
|
||||
# - install_tsconfig
|
||||
# - install_XX
|
||||
# - configure_XX
|
||||
# - init_XX
|
||||
# - start_XX
|
||||
# - stop_XX
|
||||
# - cleanup_XX
|
||||
# - install_update
|
||||
# - configure_update
|
||||
# - init_update
|
||||
# - start_update
|
||||
# - stop_update
|
||||
# - cleanup_update
|
||||
|
||||
_XTRACE_STX_UPDATE=$(set +o | grep xtrace)
|
||||
set -o xtrace
|
||||
@ -30,27 +26,19 @@ set -o xtrace
|
||||
|
||||
STXUPDATE_REPO=${STXUPDATE_REPO:-${GIT_BASE}/openstack/stx-update.git}
|
||||
STXUPDATE_DIR=$DEST/stx-update
|
||||
STXUPDATE_BRANCH=${STXUPDATE_BRANCH:-master}
|
||||
TSCONFIG_DIR=$STXUPDATE_DIR/tsconfig/
|
||||
|
||||
STX_PATCH_DIR=$STXUPDATE_DIR/cgcs-patch/
|
||||
TSCONFIG_DIR=$STXUPDATE_DIR/tsconfig/
|
||||
|
||||
STX_BIN_DIR=$(get_python_exec_prefix)
|
||||
PYTHON_SITE_DIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
||||
|
||||
function install_tsconfig {
|
||||
# no setup.cfg in tsconfig, so we can not use pip install -e
|
||||
# setup_dev_lib "tsconfig"
|
||||
pushd $TSCONFIG_DIR/tsconfig
|
||||
sudo python setup.py install --root=/ --install-lib=$PYTHON_SITE_DIR --prefix=/usr --install-data=/usr/share --single-version-externally-managed
|
||||
popd
|
||||
sudo install -d -m 755 $STX_BIN_DIR
|
||||
sudo install -p -D -m 700 $TSCONFIG_DIR/scripts/tsconfig $STX_BIN_DIR/tsconfig
|
||||
}
|
||||
|
||||
function install_patch {
|
||||
function install_sw_patch {
|
||||
pushd $STX_PATCH_DIR/cgcs-patch
|
||||
sudo python setup.py install --root=/ --install-lib=$PYTHON_SITE_DIR --prefix=/usr --install-data=/usr/share --single-version-externally-managed
|
||||
popd
|
||||
local stx_patch_sbindir=/etc/sbin/
|
||||
|
||||
local stx_patch_sbindir=/usr/local/sbin/
|
||||
local stx_patch_sysconfdir=/etc/
|
||||
sudo install -m 755 -d ${stx_patch_sbindir}
|
||||
sudo install -m 755 -d ${stx_patch_sysconfdir}/bash_completion.d
|
||||
@ -63,4 +51,22 @@ function install_patch {
|
||||
sudo install -m 500 $STX_PATCH_DIR/bin/sw-patch-agent ${stx_patch_sbindir}/sw-patch-agent
|
||||
}
|
||||
|
||||
function install_tsconfig {
|
||||
# no setup.cfg in tsconfig, so we can not use pip install -e
|
||||
# setup_dev_lib "tsconfig"
|
||||
pushd $TSCONFIG_DIR/tsconfig
|
||||
sudo python setup.py install --root=/ --install-lib=$PYTHON_SITE_DIR --prefix=/usr --install-data=/usr/share --single-version-externally-managed
|
||||
popd
|
||||
sudo install -d -m 755 $STX_BIN_DIR
|
||||
sudo install -p -D -m 700 $TSCONFIG_DIR/scripts/tsconfig $STX_BIN_DIR/tsconfig
|
||||
}
|
||||
|
||||
function install_update {
|
||||
if is_service_enabled sw-patch; then
|
||||
install_sw_patch
|
||||
fi
|
||||
if is_service_enabled tsconfig; then
|
||||
install_tsconfig
|
||||
fi
|
||||
}
|
||||
$_XTRACE_STX_UPDATE
|
||||
|
@ -3,29 +3,20 @@
|
||||
# devstack/plugin.sh
|
||||
# Triggers stx_update specific functions to install and configure stx_update
|
||||
|
||||
# Dependencies:
|
||||
#
|
||||
# - ``functions`` file
|
||||
# - ``DATA_DIR`` must be defined
|
||||
|
||||
# ``stack.sh`` calls the entry points in this order:
|
||||
#
|
||||
echo_summary "stx-update devstack plugin.sh called: $1/$2"
|
||||
source $DEST/stx-update/devstack/lib/stx-update
|
||||
|
||||
# check for service enabled
|
||||
if is_service_enabled stx-update; then
|
||||
if [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||
# Perform installation of source
|
||||
echo_summary "Installing stx-update"
|
||||
# install_update
|
||||
|
||||
echo_summary "Install stx-update"
|
||||
install_update
|
||||
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||
# Configure after the other layer 1 and 2 services have been configured
|
||||
echo_summary "Configuring update"
|
||||
echo_summary "Configure stx-update"
|
||||
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||
# Initialize and start the service
|
||||
echo_summary "Initializing and start stx-update"
|
||||
echo_summary "Initialize and start stx-update"
|
||||
# init_update
|
||||
# start_update
|
||||
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
|
||||
@ -35,14 +26,12 @@ if is_service_enabled stx-update; then
|
||||
|
||||
if [[ "$1" == "unstack" ]]; then
|
||||
# Shut down services
|
||||
echo_summary "Stop service"
|
||||
echo_summary "Stop stx-update services"
|
||||
# stop_update
|
||||
:
|
||||
fi
|
||||
|
||||
if [[ "$1" == "clean" ]]; then
|
||||
echo_summary "Clean stx-update"
|
||||
# cleanup_update
|
||||
:
|
||||
fi
|
||||
fi
|
||||
|
@ -7,6 +7,8 @@
|
||||
STX_UPDATE_NAME=stx-update
|
||||
|
||||
######### Plugin Specific ##########
|
||||
enable_service $STX_UPDATE_NAME tsconfig
|
||||
enable_service $STX_UPDATE_NAME
|
||||
#define_plugin $STX_UPDATE_NAME
|
||||
#plugin_requires ???
|
||||
|
||||
# Initial source of lib script
|
||||
source $DEST/stx-update/devstack/lib/stx-update
|
||||
|
Loading…
Reference in New Issue
Block a user