Merge "Add a basic devstack job"

This commit is contained in:
Zuul 2018-11-02 14:58:32 +00:00 committed by Gerrit Code Review
commit c1ae27f8f1
4 changed files with 91 additions and 25 deletions

View File

@ -4,6 +4,8 @@
- build-openstack-docs-pti
check:
jobs:
- stx-devstack-fault:
voting: false
- build-openstack-api-ref
- build-openstack-releasenotes
- openstack-tox-linters
@ -19,3 +21,70 @@
- publish-stx-api-ref
- publish-stx-tox
- publish-stx-releasenotes
# This job is to begin testing a DevStack run here
- job:
name: stx-devstack-base
parent: devstack
description: |
Base job for StarlingX DevStack tests
roles:
- zuul: openstack-infra/devstack
timeout: 9000
required-projects:
- name: git.openstack.org/openstack-dev/devstack
override-branch: stable/pike
- name: git.openstack.org/openstack/cinder
override-branch: stable/pike
- name: git.openstack.org/openstack/glance
override-branch: stable/pike
- name: git.openstack.org/openstack/keystone
override-branch: stable/pike
- name: git.openstack.org/openstack/neutron
override-branch: stable/pike
- name: git.openstack.org/openstack/nova
override-branch: stable/pike
- name: git.openstack.org/openstack/requirements
override-branch: stable/pike
vars:
devstack_services:
ceilometer-acentral: false
ceilometer-acompute: false
ceilometer-alarm-evaluator: false
ceilometer-alarm-notifier: false
ceilometer-anotification: false
ceilometer-api: false
ceilometer-collector: false
horizon: false
# Swift services
s-account: false
s-container: false
s-object: false
s-proxy: false
tempest: false
# Database
mysql: false
postgresql: true
devstack_localrc:
LIBS_FROM_GIT: cinder,glance,keystone,neutron,nova
- job:
name: stx-devstack-fault
parent: stx-devstack-base
timeout: 7800
required-projects:
- name: openstack/stx-update
vars:
tox_envlist: functional
devstack_services:
fm-common: true
fm-api: true
fm-rest-api: true
fm-mgr: true
devstack_plugins:
stx-update: git://git.starlingx.io/stx-update
stx-fault: git://git.starlingx.io/stx-fault
devstack_localrc:
LIBS_FROM_GIT: cinder,glance,keystone,neutron,nova
files:
- ^devstack/.*

View File

@ -7,9 +7,8 @@
#
# - ``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
# - The stx-update plugin must be enabled
# ``stack.sh`` calls the entry points in this order:
#
@ -44,7 +43,7 @@ FM_RESTAPI_SERVICE_HOST=${FM_RESTAPI_SERVICE_HOST:-$SERVICE_HOST}
FM_RESTAPI_SERVICE_PORT=${FM_RESTAPI_SERVICE_PORT:-18002}
FM_RESTAPI_WORKERS=${FM_RESTAPI_WORKERS:-4}
PYTHON_BIN_DIR=$(get_python_exec_prefix)
STX_BIN_DIR=$(get_python_exec_prefix)
PYTHON_SITE_DIR=$(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
# Functions
@ -71,7 +70,7 @@ function cleanup_fm_common {
read x version <<< $(grep '^Version: ' ${GITDIR[$STX_FAULT_NAME]}/fm-common/PKG-INFO)
local major=${version%%.*}
local minor=${version##*.}
local prefix=${PYTHON_BIN_DIR%/*}
local prefix=${STX_BIN_DIR%/*}
sudo rm /etc/ld.so.conf.d/stx-fault.conf
@ -234,8 +233,8 @@ function install_fm_common {
local minor=${version##*.}
# Set up the destinations
# Making an assumption here about PYTHON_BIN_DIR having ../include be valid
local prefix=${PYTHON_BIN_DIR%/*}
# Making an assumption here about STX_BIN_DIR having ../include be valid
local prefix=${STX_BIN_DIR%/*}
# build
pushd ${GITDIR[$STX_FAULT_NAME]}/fm-common/sources
@ -303,7 +302,7 @@ function install_fm_rest_api {
function start_fault {
if is_service_enabled fm-api; then
run_process fm-api "$PYTHON_BIN_DIR/fm-api --config-file $FM_RESTAPI_CONF"
run_process fm-api "$STX_BIN_DIR/fm-api --config-file $FM_RESTAPI_CONF"
fi
}

View File

@ -1,34 +1,26 @@
#!/bin/bash
# devstack/plugin.sh
# Triggers stx_fault specific functions to install and configure Fault Management
# Triggers stx-fault specific functions to install and configure Fault Management
# Dependencies:
#
# - ``functions`` file
# - ``DATA_DIR`` must be defined
# ``stack.sh`` calls the entry points in this order:
#
echo_summary "fault devstack plugin.sh called: $1/$2"
source $DEST/stx-fault/devstack/lib/stx-fault
# check for service enabled
if [[ ,${ENABLED_SERVICES} =~ ,"fm-" ]]; then
if is_service_enabled stx-fault; then
if [[ "$1" == "stack" && "$2" == "install" ]]; then
# Perform installation of source
echo_summary "Installing fault service"
echo_summary "Install stx-fault"
install_fault
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
echo_summary "Configuring fault"
echo_summary "Configure stx-fault"
configure_fault
create_fault_user_group
create_fault_accounts
elif [[ "$1" == "stack" && "$2" == "extra" ]]; then
# Initialize and start the service
echo_summary "Initializing and start fault"
echo_summary "Initialize and start stx-fault"
init_fault
start_fault
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
@ -38,13 +30,11 @@ if [[ ,${ENABLED_SERVICES} =~ ,"fm-" ]]; then
if [[ "$1" == "unstack" ]]; then
# Shut down services
echo_summary "Stop fault service"
echo_summary "Stop stx-fault services"
stop_fault
:
fi
if [[ "$1" == "clean" ]]; then
cleanup_fault
:
fi
fi

View File

@ -7,5 +7,13 @@
STX_FAULT_NAME=stx-fault
######### Plugin Specific ##########
enable_service $STX_FAULT_NAME fm-common fm-api fm-rest-api fm-mgr
enable_service $STX_FAULT_NAME
#define_plugin $STX_FAULT_NAME
# Handle STX pre-reqs
if is_service_enabled fm-rest-api; then
enable_service tsconfig
fi
# Initial source of lib script
source $DEST/stx-fault/devstack/lib/stx-fault