Leverage the stx-update, stx-integ and stx-fault DevStack plugins
sysinv needs: * stx-integ: platform-utils * stx-update: sw-patch, tsconfig * stx-fault: fm-api, fm-common Depends-On: https://review.openstack.org/614804 Depends-On: https://review.openstack.org/#/c/613973/ Depends-On: https://review.openstack.org/#/c/614244/ Change-Id: I85b49a954300907d6693df9d18eb37296d6f3f0c Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
604b4a5ea0
commit
201f4b1540
32
.zuul.yaml
32
.zuul.yaml
@ -13,6 +13,8 @@
|
|||||||
- controllerconfig-tox-py27
|
- controllerconfig-tox-py27
|
||||||
- controllerconfig-tox-pylint
|
- controllerconfig-tox-pylint
|
||||||
- configutilities-tox-flake8
|
- configutilities-tox-flake8
|
||||||
|
- stx-devstack-config:
|
||||||
|
voting: false
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- build-openstack-api-ref
|
- build-openstack-api-ref
|
||||||
@ -108,3 +110,33 @@
|
|||||||
vars:
|
vars:
|
||||||
tox_envlist: flake8
|
tox_envlist: flake8
|
||||||
tox_extra_args: -c configutilities/configutilities/tox.ini
|
tox_extra_args: -c configutilities/configutilities/tox.ini
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: stx-devstack-config
|
||||||
|
parent: stx-devstack-base
|
||||||
|
timeout: 7800
|
||||||
|
required-projects:
|
||||||
|
- openstack/stx-update
|
||||||
|
- openstack/stx-fault
|
||||||
|
- openstack/stx-integ
|
||||||
|
vars:
|
||||||
|
tox_envlist: functional
|
||||||
|
devstack_services:
|
||||||
|
horizon: false
|
||||||
|
# StarlingX services
|
||||||
|
fm-common: true
|
||||||
|
fm-api: true
|
||||||
|
# fm-rest-api: true
|
||||||
|
# fm-mgr: true
|
||||||
|
sysinv-api: true
|
||||||
|
sysinv-cond: true
|
||||||
|
mysql: false
|
||||||
|
postgresql: true
|
||||||
|
tls-proxy: false
|
||||||
|
devstack_plugins:
|
||||||
|
stx-config: git://git.starlingx.io/stx-config
|
||||||
|
stx-fault: git://git.starlingx.io/stx-fault
|
||||||
|
stx-integ: git://git.starlingx.io/stx-integ
|
||||||
|
stx-update: git://git.starlingx.io/stx-update
|
||||||
|
files:
|
||||||
|
- ^devstack/.*
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# lib/stx-config
|
# lib/stx-config
|
||||||
# Functions to control the configuration and operation of the **sysinv** service
|
# Functions to control the configuration and operation of stx-config
|
||||||
|
|
||||||
# Dependencies:
|
# Dependencies:
|
||||||
#
|
#
|
||||||
# - ``functions`` file
|
# - ``functions`` file
|
||||||
# - ``DEST``, ``DATA_DIR``, ``STACK_USER`` must be defined
|
# - ``DEST``, ``DATA_DIR``, ``STACK_USER`` must be defined
|
||||||
# - ``SERVICE_{TENANT_NAME|PASSWORD}`` must be defined
|
|
||||||
# - ``SERVICE_HOST``
|
# - The stx-update and stx-fault plugins must be enabled
|
||||||
# - ``KEYSTONE_TOKEN_FORMAT`` must be defined
|
|
||||||
|
|
||||||
# ``stack.sh`` calls the entry points in this order:
|
# ``stack.sh`` calls the entry points in this order:
|
||||||
#
|
#
|
||||||
@ -31,22 +30,8 @@ set -o xtrace
|
|||||||
SYSINV_CLIENT_NAME=cgts-client
|
SYSINV_CLIENT_NAME=cgts-client
|
||||||
GITDIR["$SYSINV_CLIENT_NAME"]=$DEST/stx-config/sysinv/cgts-client/cgts-client
|
GITDIR["$SYSINV_CLIENT_NAME"]=$DEST/stx-config/sysinv/cgts-client/cgts-client
|
||||||
GITDIR["sysinv"]=$DEST/stx-config/sysinv/sysinv/sysinv
|
GITDIR["sysinv"]=$DEST/stx-config/sysinv/sysinv/sysinv
|
||||||
#this is sysinv dependence , if stx-update support devstack, we need use depends
|
|
||||||
STXUPDATE_REPO=${STXUPDATE_REPO:-${GIT_BASE}/openstack/stx-update.git}
|
|
||||||
STXUPDATE_DIR=$DEST/stx-update
|
|
||||||
STXUPDATE_BRANCH=${STXUPDATE_BRANCH:-master}
|
|
||||||
STXCONFIG_CONTROL=$DEST/stx-config/controllerconfig/controllerconfig
|
STXCONFIG_CONTROL=$DEST/stx-config/controllerconfig/controllerconfig
|
||||||
STXCONFIG_CONFUTILS=$DEST/stx-config/configutilities/configutilities
|
STXCONFIG_CONFUTILS=$DEST/stx-config/configutilities/configutilities
|
||||||
GITDIR["tsconfig"]=$STXUPDATE_DIR/tsconfig/tsconfig/
|
|
||||||
TSCONFIG_DIR=$STXUPDATE_DIR/tsconfig/
|
|
||||||
CGCS_PATCH_DIR=$STXUPDATE_DIR/cgcs-patch/
|
|
||||||
STXFAULT_REPO=${STXFAULT_REPO:-${GIT_BASE}/openstack/stx-fault.git}
|
|
||||||
STXFAULT_DIR=$DEST/stx-fault
|
|
||||||
STXFAULT_BRANCH=${STXFAULT_BRANCH:-master}
|
|
||||||
STXUTILS_PLATFORM_DIR=$STXUTILS_DIR/middleware/util/recipes-common/platform-util
|
|
||||||
STXUTILS_BRANCH=${STXUTILS_BRANCH:-master}
|
|
||||||
GITDIR["fm-api"]=$STXFAULT_DIR/fm-api
|
|
||||||
#TSCONFIG_DIR=$STXFAULT_DIR/tsconfig
|
|
||||||
SYSINV_SERVICE_PROTOCOL=${SYSINV_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
SYSINV_SERVICE_PROTOCOL=${SYSINV_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
|
||||||
SYSINV_SERVICE_PORT=${SYSINV_SERVICE_PORT:-6385}
|
SYSINV_SERVICE_PORT=${SYSINV_SERVICE_PORT:-6385}
|
||||||
SYSINV_SERVICE_HOST=${SYSINV_SERVICE_HOST:-$SERVICE_HOST}
|
SYSINV_SERVICE_HOST=${SYSINV_SERVICE_HOST:-$SERVICE_HOST}
|
||||||
@ -146,6 +131,8 @@ function create_sysinv_user_group {
|
|||||||
|
|
||||||
function init_sysinv {
|
function init_sysinv {
|
||||||
echo "trigger init sysinv"
|
echo "trigger init sysinv"
|
||||||
|
# Migrations need this
|
||||||
|
sudo install -d -m 755 -o ${USER} /var/run/sysinv
|
||||||
if [[ "$HOST_TOPOLOGY_ROLE" != "subnode" ]]; then
|
if [[ "$HOST_TOPOLOGY_ROLE" != "subnode" ]]; then
|
||||||
# (Re)create sysinv database
|
# (Re)create sysinv database
|
||||||
echo "recreate_database sysinv and dbsync"
|
echo "recreate_database sysinv and dbsync"
|
||||||
@ -172,13 +159,6 @@ function install_controllerconfig {
|
|||||||
popd
|
popd
|
||||||
}
|
}
|
||||||
|
|
||||||
function install_fm_api {
|
|
||||||
git_clone $STXFAULT_REPO $STXFAULT_DIR $STXFAULT_BRANCH
|
|
||||||
pushd $STXFAULT_DIR/fm-api
|
|
||||||
sudo python setup.py install --root=/ --install-lib=$PYTHON_SITE_DIR --prefix=/usr --install-data=/usr/share --single-version-externally-managed
|
|
||||||
popd
|
|
||||||
}
|
|
||||||
|
|
||||||
function install_sysinv {
|
function install_sysinv {
|
||||||
local req_services="key rabbit nova neutron"
|
local req_services="key rabbit nova neutron"
|
||||||
for srv in $req_services;do
|
for srv in $req_services;do
|
||||||
@ -210,34 +190,6 @@ function install_sysinv {
|
|||||||
function install_sysinv_depends {
|
function install_sysinv_depends {
|
||||||
install_configutilities
|
install_configutilities
|
||||||
install_controllerconfig
|
install_controllerconfig
|
||||||
install_tsconfig
|
|
||||||
install_fm_api
|
|
||||||
}
|
|
||||||
|
|
||||||
function install_tsconfig {
|
|
||||||
git_clone $STXUPDATE_REPO $STXUPDATE_DIR $STXUPDATE_BRANCH
|
|
||||||
# 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 $SYSINV_BIN_DIR
|
|
||||||
sudo install -p -D -m 700 $TSCONFIG_DIR/scripts/tsconfig $SYSINV_BIN_DIR/tsconfig
|
|
||||||
pushd $CGCS_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 cgcs_patch_sbindir=/etc/sbin/
|
|
||||||
local cgcs_patch_sysconfdir=/etc/
|
|
||||||
sudo install -m 755 -d ${cgcs_patch_sbindir}
|
|
||||||
sudo install -m 755 -d ${cgcs_patch_sysconfdir}/bash_completion.d
|
|
||||||
sudo install -m 755 -d ${cgcs_patch_sysconfdir}/goenabled.d
|
|
||||||
sudo install -m 755 -d ${cgcs_patch_sysconfdir}/init.d
|
|
||||||
sudo install -m 755 -d ${cgcs_patch_sysconfdir}/logrotate.d
|
|
||||||
sudo install -m 755 -d ${cgcs_patch_sysconfdir}/patching
|
|
||||||
sudo install -m 755 -d ${cgcs_patch_sysconfdir}/patching/patch-scripts
|
|
||||||
sudo install -m 755 -d ${cgcs_patch_sysconfdir}/pmon.d
|
|
||||||
sudo install -m 500 $CGCS_PATCH_DIR/bin/sw-patch-agent ${cgcs_patch_sbindir}/sw-patch-agent
|
|
||||||
#still a lots of bin need to install , but might not need for stx-config
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_sysinv {
|
function start_sysinv {
|
||||||
|
@ -1 +1,2 @@
|
|||||||
|
#!/bin/bash
|
||||||
# Plug-in overrides
|
# Plug-in overrides
|
||||||
|
@ -3,36 +3,27 @@
|
|||||||
# devstack/plugin.sh
|
# devstack/plugin.sh
|
||||||
# Triggers stx_config specific functions to install and configure stx_config
|
# Triggers stx_config specific functions to install and configure stx_config
|
||||||
|
|
||||||
# Dependencies:
|
|
||||||
#
|
|
||||||
# - ``functions`` file
|
|
||||||
# - ``DATA_DIR`` must be defined
|
|
||||||
|
|
||||||
# ``stack.sh`` calls the entry points in this order:
|
|
||||||
#
|
|
||||||
echo_summary "sysinv devstack plugin.sh called: $1/$2"
|
echo_summary "sysinv devstack plugin.sh called: $1/$2"
|
||||||
source $DEST/stx-config/devstack/lib/stx-config
|
|
||||||
# check for service enabled
|
|
||||||
|
|
||||||
if is_service_enabled sysinv-api sysinv-cond; then
|
# check for service enabled
|
||||||
|
if is_service_enabled stx-config; then
|
||||||
if [[ "$1" == "stack" && "$2" == "install" ]]; then
|
if [[ "$1" == "stack" && "$2" == "install" ]]; then
|
||||||
# Perform installation of sysinv source
|
# Perform installation of source
|
||||||
echo_summary "Installing cgts_client"
|
echo_summary "Installing cgts_client"
|
||||||
install_cgtsclient
|
install_cgtsclient
|
||||||
echo_summary "Installing depends"
|
echo_summary "Installing depends"
|
||||||
install_sysinv_depends
|
install_sysinv_depends
|
||||||
echo_summary "Installing sysinv service"
|
echo_summary "Installing sysinv service"
|
||||||
install_sysinv
|
install_sysinv
|
||||||
|
|
||||||
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
|
||||||
# Configure after the other layer 1 and 2 services have been configured
|
# Configure after the other layer 1 and 2 services have been configured
|
||||||
echo_summary "Configuring sysinv"
|
echo_summary "Configure sysinv"
|
||||||
configure_sysinv
|
configure_sysinv
|
||||||
create_sysinv_user_group
|
create_sysinv_user_group
|
||||||
create_sysinv_accounts
|
create_sysinv_accounts
|
||||||
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
|
||||||
# Initialize and start the sysinv service
|
# Initialize and start the sysinv service
|
||||||
echo_summary "Initializing and start sysinv "
|
echo_summary "Initialize and start sysinv "
|
||||||
init_sysinv
|
init_sysinv
|
||||||
start_sysinv
|
start_sysinv
|
||||||
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
|
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
|
||||||
@ -44,11 +35,9 @@ if is_service_enabled sysinv-api sysinv-cond; then
|
|||||||
# Shut down sysinv services
|
# Shut down sysinv services
|
||||||
echo_summary "Stop Sysinv service"
|
echo_summary "Stop Sysinv service"
|
||||||
stop_sysinv
|
stop_sysinv
|
||||||
:
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$1" == "clean" ]]; then
|
if [[ "$1" == "clean" ]]; then
|
||||||
cleanup_sysinv
|
cleanup_sysinv
|
||||||
:
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1,8 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
# Devstack settings
|
# Devstack settings
|
||||||
|
|
||||||
# Defaults
|
# Defaults
|
||||||
# --------
|
# --------
|
||||||
|
|
||||||
|
STX_CONFIG_NAME=stx-config
|
||||||
|
|
||||||
######### Plugin Specific ##########
|
######### Plugin Specific ##########
|
||||||
enable_service sysinv sysinv-api sysinv-cond
|
enable_service $STX_CONFIG_NAME sysinv sysinv-api sysinv-cond
|
||||||
|
#define_plugin sysinv
|
||||||
|
|
||||||
|
# Handle STX pre-reqs
|
||||||
|
# stx-integ
|
||||||
|
enable_service platform-util
|
||||||
|
# stx-update
|
||||||
|
enable_service sw-patch tsconfig
|
||||||
|
|
||||||
|
# Initial source of lib script
|
||||||
|
source $DEST/stx-config/devstack/lib/stx-config
|
||||||
|
Loading…
Reference in New Issue
Block a user