diff --git a/devstack/lib/horizon b/devstack/lib/horizon new file mode 100644 index 00000000..3170679e --- /dev/null +++ b/devstack/lib/horizon @@ -0,0 +1,60 @@ +#!/bin/bash +# +# lib/horizon +# Functions to control the configuration and operation of the horizon service + +# Dependencies: +# +# - ``functions`` file +# - ``apache`` file +# - ``SERVICE_{TENANT_NAME|PASSWORD}`` must be defined + +# ``stack.sh`` calls the entry points in this order: +# +# - install_horizon +# - configure_horizon +# - init_horizon +# - start_horizon +# - stop_horizon +# - cleanup_horizon + +# Save trace setting +_XTRACE_HORIZON=$(set +o | grep xtrace) +set +o xtrace + +# Functions +# --------- + +# configure_horizon() - Set config files, create data dirs, etc +function configure_horizon { + echo noop +} + +# init_horizon() - Initialize databases, etc. +function init_horizon { + echo noop +} + +# install_horizon() - Collect source and prepare +function install_horizon { + echo noop +} + +# start_horizon() - Start running processes +function start_horizon { + kubectl rollout restart statefulset/memcached-horizon + sleep 10 +} + +# stop_horizon() - Stop running processes +function stop_horizon { + stop_apache_server +} + +# Restore xtrace +$_XTRACE_HORIZON + +# Tell emacs to use shell-script-mode +## Local variables: +## mode: shell-script +## End: diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 6d1a4987..23fb7025 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -40,6 +40,13 @@ elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then elif [[ "$1" == "stack" && "$2" == "extra" ]]; then : + +elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then + # Horizon dashboard Url in tempest_horizon + if is_service_enabled tempest; then + local ip=$(get_kubernetes_service_ip horizon) + iniset $TEMPEST_CONFIG dashboard dashboard_url http://$ip + fi fi if [[ "$1" == "unstack" ]]; then diff --git a/devstack/settings b/devstack/settings index 19525c42..08934a42 100644 --- a/devstack/settings +++ b/devstack/settings @@ -18,4 +18,5 @@ define_plugin openstack-operator source $DEST/openstack-operator/devstack/lib/common source $DEST/openstack-operator/devstack/lib/glance +source $DEST/openstack-operator/devstack/lib/horizon source $DEST/openstack-operator/devstack/lib/keystone diff --git a/zuul.d/functional-jobs.yaml b/zuul.d/functional-jobs.yaml index 474a38cf..e3616337 100644 --- a/zuul.d/functional-jobs.yaml +++ b/zuul.d/functional-jobs.yaml @@ -11,10 +11,12 @@ - openstack/heat-tempest-plugin - openstack/magnum - openstack/magnum-tempest-plugin + - openstack/horizon - openstack/tempest-horizon vars: devstack_services: etcd3: false + horizon: true rabbit: false tls-proxy: false devstack_plugins: