diff --git a/.circle/buildenv_common.sh b/.circle/buildenv_common.sh index 7d5f2356..5fc1b52b 100755 --- a/.circle/buildenv_common.sh +++ b/.circle/buildenv_common.sh @@ -10,12 +10,7 @@ write_env() { distros=($DISTROS) DISTRO=${distros[$CIRCLE_NODE_INDEX]} -# NOTE: We don't build Mistral package on Ubuntu Bionic -if [[ "${DISTRO}" = "bionic"} ]] || [[ "${DISTRO}" = "el8"} ]]; then - ST2_PACKAGES="st2" -else - ST2_PACKAGES=${ST2_PACKAGES:-st2 mistral} -fi +ST2_PACKAGES="st2" write_env ST2_PACKAGES diff --git a/.circle/buildenv_mistral.sh b/.circle/buildenv_mistral.sh deleted file mode 100755 index 134d339f..00000000 --- a/.circle/buildenv_mistral.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/bin/bash -set -e - -my_dir="$(dirname "$0")" -source "$my_dir/buildenv_common.sh" - -distros=($DISTROS) -DISTRO=${distros[$CIRCLE_NODE_INDEX]} - -fetch_version() { - if [ -f ../version_st2.py ]; then - # Get st2 version based on hardcoded string in st2common - # build takes place in `st2` repo - python -c 'exec(open("../version_st2.py").read()); print(__version__)' - else - # build takes place in `st2-packages` repo - curl -sSL -o /tmp/mistral_version.py ${ST2MISTRAL_GITURL}/raw/${ST2MISTRAL_GITREV}/version_st2.py - python -c 'exec(open("/tmp/mistral_version.py").read()); print(__version__)' - fi -} - -mistral_giturl() { - # Handle pull requests properly - if [ -z "$CIRCLE_PR_REPONAME" ]; then - echo "https://github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" - else - echo "https://github.com/${CIRCLE_PR_USERNAME}/${CIRCLE_PR_REPONAME}" - fi -} - -# Mistral versioning -ST2MISTRAL_GITURL=${ST2MISTRAL_GITURL:-https://github.com/StackStorm/mistral} -ST2MISTRAL_GITREV=${ST2MISTRAL_GITREV:-master} -MISTRAL_VERSION=$(fetch_version) -if [ -n "$PACKAGECLOUD_TOKEN" ]; then - MISTRAL_RELEASE=$(.circle/packagecloud.sh next-revision ${DISTRO} ${MISTRAL_VERSION} st2mistral) -else - # is fork - MISTRAL_RELEASE=1 -fi - -write_env ST2MISTRAL_GITURL ST2MISTRAL_GITREV MISTRAL_VERSION MISTRAL_RELEASE DISTRO TESTING - -cat ~/.buildenv diff --git a/.circle/configure-postgres.sh b/.circle/configure-postgres.sh deleted file mode 100755 index ce76a517..00000000 --- a/.circle/configure-postgres.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -CONFIG=$(cat < "#{name}", "ST2_USER" => ENV['ST2USER'] ? ENV['ST2USER'] : 'st2admin', "ST2_PASSWORD" => ENV['ST2PASSWORD'] ? ENV['ST2PASSWORD'] : 'st2admin', - "ST2_PACKAGES" => ENV['ST2_PACKAGES'] ? ENV['ST2_PACKAGES'] : 'st2 st2mistral', + "ST2_PACKAGES" => ENV['ST2_PACKAGES'] ? ENV['ST2_PACKAGES'] : 'st2', "ST2_INSTALL" => ENV['ST2_INSTALL'] ? ENV['ST2_INSTALL'] : 'yes', "ST2_VERIFY" => ENV['ST2_VERIFY'] ? ENV['ST2_VERIFY'] : 'yes', "ST2_GITURL" => ENV['ST2_GITURL'], "ST2_GITREV" => ENV['ST2_GITREV'], - "ST2MISTRAL_GITURL" => ENV['ST2MISTRAL_GITURL'], - "ST2MISTRAL_GITREV" => ENV['ST2MISTRAL_GITREV'], } end end diff --git a/docker-compose.circle.yml b/docker-compose.circle.yml index cc65499f..3f20e505 100644 --- a/docker-compose.circle.yml +++ b/docker-compose.circle.yml @@ -18,16 +18,12 @@ bionic: environment: - BUILDNODE=bionicbuild - TESTNODE=bionictest - # NOTE: We don't build st2mistral package so we don't mix Python 3 - # (StackStorm components) and Python 2 (Mistral) - # Bionic will be first release without a Mistral - ST2_PACKAGES=st2 links: - bionicbuild - bionictest - rabbitmq - mongodb - - postgres el8: image: quay.io/stackstorm/packagingrunner @@ -37,16 +33,12 @@ el8: environment: - BUILDNODE=centos8build - TESTNODE=centos8test - # NOTE: We don't build st2mistral package so we don't mix Python 3 - # (StackStorm components) and Python 2 (Mistral) - # Bionic will be first release without a Mistral - ST2_PACKAGES=st2 links: - centos8build - centos8test - rabbitmq - mongodb - - postgres el7: image: quay.io/stackstorm/packagingrunner diff --git a/docker-compose.circle2.yml b/docker-compose.circle2.yml index 01a88c0a..51977e24 100644 --- a/docker-compose.circle2.yml +++ b/docker-compose.circle2.yml @@ -11,7 +11,6 @@ xenial: - xenialtest - rabbitmq - mongodb - - postgres bionic: image: quay.io/stackstorm/packagingrunner @@ -21,16 +20,12 @@ bionic: environment: - BUILDNODE=bionicbuild - TESTNODE=bionictest - # NOTE: We don't build st2mistral package so we don't mix Python 3 - # (StackStorm components) and Python 2 (Mistral) - # Bionic will be first release without a Mistral - ST2_PACKAGES=st2 links: - bionicbuild - bionictest - rabbitmq - mongodb - - postgres el8: image: quay.io/stackstorm/packagingrunner @@ -45,7 +40,6 @@ el8: - centos8test - rabbitmq - mongodb - - postgres el7: image: quay.io/stackstorm/packagingrunner @@ -60,7 +54,6 @@ el7: - centos7test - rabbitmq - mongodb - - postgres ## Package build nodes # diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 0ce30d1c..1630c900 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -34,7 +34,6 @@ volumes-circle: volumes: - /tmp/st2-packages:/root/build - /tmp/st2-packages/log/st2:/var/log/st2 - - /tmp/st2-packages/log/mistral:/var/log/mistral ## Service used by st2 # @@ -49,11 +48,3 @@ mongodb: image: mongo:4.0 ports: - "27017:27017" - -postgres: - image: postgres - ports: - - "5432:5432" - environment: - - POSTGRES_USER=mistral - - POSTGRES_PASSWORD=StackStorm diff --git a/docker-compose.yml b/docker-compose.yml index 4e903adc..671e14ea 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,6 @@ xenial: - xenialtest - rabbitmq - mongodb - - postgres bionic: image: quay.io/stackstorm/packagingrunner @@ -21,16 +20,12 @@ bionic: environment: - BUILDNODE=bionicbuild - TESTNODE=bionictest - # NOTE: We don't build st2mistral package so we don't mix Python 3 - # (StackStorm components) and Python 2 (Mistral) - # Bionic will be first release without a Mistral - ST2_PACKAGES=st2 links: - bionicbuild - bionictest - rabbitmq - mongodb - - postgres el8: image: quay.io/stackstorm/packagingrunner @@ -40,16 +35,12 @@ el8: environment: - BUILDNODE=centos8build - TESTNODE=centos8test - # NOTE: We don't build st2mistral package so we don't mix Python 3 - # (StackStorm components) and Python 2 (Mistral) - # Bionic will be first release without a Mistral - ST2_PACKAGES=st2 links: - centos8build - centos8test - rabbitmq - mongodb - - postgres el7: @@ -65,7 +56,6 @@ el7: - centos7test - rabbitmq - mongodb - - postgres ## Package build nodes # diff --git a/packages/st2/Makefile b/packages/st2/Makefile index c671315b..d35a8673 100644 --- a/packages/st2/Makefile +++ b/packages/st2/Makefile @@ -33,14 +33,10 @@ else PYTHON_ALT_BINARY := python endif -# Don't include Mistral runner on Bionic or EL8 -ifeq ($(DEB_DISTRO),bionic) - RUNNERS := $(shell ls -I mistral* ../contrib/runners) -else ifeq ($(EL_VERSION),8) +# Don't include Mistral runner +# TODO: Go back to all runners when mistral removed from st2 +# RUNNERS := $(shell ls ../contrib/runners) RUNNERS := $(shell ls -I mistral* ../contrib/runners) -else - RUNNERS := $(shell ls ../contrib/runners) -endif # Moved from top of file to handle when only py2 or py3 available ST2PKG_VERSION ?= $(shell $(PYTHON_BINARY) -c "from $(ST2_COMPONENT) import __version__; print(__version__),") @@ -118,14 +114,10 @@ populate_version: .stamp-populate_version touch $@ requirements: -# Don't include Mistral runner on Bionic -ifeq ($(DEB_DISTRO),bionic) - $(PYTHON_BINARY) ../scripts/fixate-requirements.py --skip=stackstorm-runner-mistral-v2,python-mistralclient -s ../st2*/in-requirements.txt ../contrib/runners/*/in-requirements.txt -f ../fixed-requirements.txt -else ifeq ($(EL_VERSION),8) +# Don't include Mistral runner for now +# TODO: Use all runners when mistral removed from st2 core +# $(PYTHON_BINARY) ../scripts/fixate-requirements.py -s ../st2*/in-requirements.txt ../contrib/runners/*/in-requirements.txt -f ../fixed-requirements.txt $(PYTHON_BINARY) ../scripts/fixate-requirements.py --skip=stackstorm-runner-mistral-v2,python-mistralclient -s ../st2*/in-requirements.txt ../contrib/runners/*/in-requirements.txt -f ../fixed-requirements.txt -else - $(PYTHON_BINARY) ../scripts/fixate-requirements.py -s ../st2*/in-requirements.txt ../contrib/runners/*/in-requirements.txt -f ../fixed-requirements.txt -endif cat requirements.txt changelog: populate_version diff --git a/packages/st2/component.makefile b/packages/st2/component.makefile index baba04ca..53237a2e 100644 --- a/packages/st2/component.makefile +++ b/packages/st2/component.makefile @@ -59,14 +59,9 @@ populate_version: .stamp-populate_version requirements: .stamp-requirements .stamp-requirements: -# Don't include Mistral runner on Bionic -ifeq ($(DEB_DISTRO),bionic) - $(PYTHON_BINARY) ../scripts/fixate-requirements.py --skip=stackstorm-runner-mistral-v2,python-mistralclient -s in-requirements.txt -f ../fixed-requirements.txt -else ifeq ($(EL_VERSION),8) +# Don't include Mistral runner for now, replace with commented version when mistral removed from st2 +# $(PYTHON_BINARY) ../scripts/fixate-requirements.py -s in-requirements.txt -f ../fixed-requirements.txt $(PYTHON_BINARY) ../scripts/fixate-requirements.py --skip=stackstorm-runner-mistral-v2,python-mistralclient -s in-requirements.txt -f ../fixed-requirements.txt -else - $(PYTHON_BINARY) ../scripts/fixate-requirements.py -s in-requirements.txt -f ../fixed-requirements.txt -endif cat requirements.txt wheelhouse: .stamp-wheelhouse diff --git a/packages/st2/in-requirements.txt b/packages/st2/in-requirements.txt index d5fd571c..ac42c41c 100644 --- a/packages/st2/in-requirements.txt +++ b/packages/st2/in-requirements.txt @@ -13,7 +13,6 @@ stackstorm-runner-announcement stackstorm-runner-http stackstorm-runner-inquirer stackstorm-runner-local -stackstorm-runner-mistral-v2 stackstorm-runner-noop stackstorm-runner-orquesta stackstorm-runner-python diff --git a/packages/st2mistral/Makefile b/packages/st2mistral/Makefile deleted file mode 100644 index a01148f6..00000000 --- a/packages/st2mistral/Makefile +++ /dev/null @@ -1,86 +0,0 @@ -# Mind that that some of the vars are passed as ENV! -WHEELDIR ?= /tmp/wheelhouse -COMPONENT := st2mistral -MISTRAL_RELEASE ?= 1 -MISTRAL_VERSION ?= $(shell python -c "from pbr import version; print version.VersionInfo('mistral').version_string(),") -# It's later than 0.11.1, so we have to use a later commit :( -PBR_GITURL := git+https://github.com/openstack-dev/pbr@d19459daa8616dd18fde016c2970ffc41ff4ccdd\#egg=pbr - -# We use special additional requirements in our mistral bundle! -define INJECT_DEPS -git+https://github.com/StackStorm/st2mistral.git@$(GITREV)#egg=st2mistral -$(PBR_GITURL) -endef -export INJECT_DEPS - -ifneq (,$(wildcard /etc/debian_version)) - DEBIAN := 1 - DESTDIR ?= $(CURDIR)/debian/$(COMPONENT) -else - REDHAT := 1 -endif - -all: install -.PHONY: all install changelog pre_install post_install - -install: changelog wheelhouse pre_install - -post_install: - # leave empty if no steps are required - -pre_install: - install -D conf/policy.json $(DESTDIR)/etc/mistral/policy.json - install -D etc/logging.conf.sample $(DESTDIR)/etc/mistral/logging.conf - install -m644 conf/logrotate.conf $(DESTDIR)/etc/logrotate.d/mistral - install -D etc/wf_trace_logging.conf.sample $(DESTDIR)/etc/mistral/wf_trace_logging.conf - install -D -m644 conf/helpers-sysvinit $(DESTDIR)/opt/stackstorm/mistral/share/sysvinit/helpers - sed -i "s%/var/log/%/var/log/mistral/%" $(DESTDIR)/etc/mistral/*logging.conf - sed -i "/\[logger_root\]/,/\[.*\]\|\s*$$/ {s/level=DEBUG/level=INFO/}" $(DESTDIR)/etc/mistral/*logging.conf - -changelog: populate_version -ifeq ($(DEBIAN),1) - debchange -v $(MISTRAL_VERSION)-$(MISTRAL_RELEASE) -M "automated build version: $(MISTRAL_VERSION)" -endif - -populate_version: .stamp-populate_version -.stamp-populate_version: - sed -i "/^pbr.*/d" requirements.txt - sed -i "s/setup_requires=\[.*\]/setup_requires=\['pbr'\]/" setup.py - pip install $(PBR_GITURL) || \ - pip install $(PBR_GITURL) - touch $@ - -wheelhouse: .stamp-wheelhouse -.stamp-wheelhouse: | populate_version inject-deps bdist_wheel - # Install wheels into shared location - pip wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt || \ - pip wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt - touch $@ - -bdist_wheel: .stamp-bdist_wheel -.stamp-bdist_wheel: | populate_version - # python setup.py bdist_wheel -d $(WHEELDIR) - pip wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt || \ - pip wheel --wheel-dir=$(WHEELDIR) --find-links=$(WHEELDIR) -r requirements.txt - touch $@ - -# We need to create bdist, before mangling requirements and running pip, -# otherwise proccess will fail. -inject-deps: .stamp-inject-deps -.stamp-inject-deps: | bdist_wheel - echo "$$INJECT_DEPS" >> requirements.txt - grep -q 'gunicorn' requirements.txt || echo "gunicorn" >> requirements.txt - grep -q 'oslo.cache' requirements.txt || echo "oslo.cache<1.32.0" >> requirements.txt - grep -q 'openstacksdk' requirements.txt || echo "openstacksdk<0.21.0" >> requirements.txt - grep -q 'psycopg2' requirements.txt || echo "psycopg2>=2.6.2,<2.7.0" >> requirements.txt - grep -q 'pika' requirements.txt || echo "pika<0.11,>=0.9" >> requirements.txt - grep -q 'python-memcached' requirements.txt || echo "python-memcached" >> requirements.txt - sed -i "s/^oslo.messaging.*/oslo.messaging==5.24.2/g" requirements.txt - sed -i "s/^Babel.*/Babel>=2.3.4,!=2.4.0 # BSD/g" requirements.txt - sed -i "s/^python-senlinclient.*/python-senlinclient<1.10.0 # Apache-2.0/g" requirements.txt - -ifeq (,$(findstring dev,$(MISTRAL_VERSION))) - sed -i "s/^python-mistralclient.*/git+https:\/\/github.com\/StackStorm\/python-mistralclient.git@st2-$(MISTRAL_VERSION)\#egg=python-mistralclient/g" requirements.txt -endif - - touch $@ diff --git a/packages/st2mistral/bin/mistral b/packages/st2mistral/bin/mistral deleted file mode 100755 index a6c21f7b..00000000 --- a/packages/st2mistral/bin/mistral +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh -# Wrapper script, used to override default mistral client environment variables -# https://github.com/StackStorm/python-mistralclient#running-mistral-client - -OS_MISTRAL_URL=${OS_MISTRAL_URL:-http://127.0.0.1:8989/v2} -export OS_MISTRAL_URL - -exec /opt/stackstorm/mistral/bin/mistral "$@" diff --git a/packages/st2mistral/conf/helpers-sysvinit b/packages/st2mistral/conf/helpers-sysvinit deleted file mode 100644 index 44f56224..00000000 --- a/packages/st2mistral/conf/helpers-sysvinit +++ /dev/null @@ -1,26 +0,0 @@ -# -*-Shell-script-*- - -# Check if mistral-api or mistral-server components are enabled (checks $COMPONENTS) -enabled_list() { - local service= quiet= components= list= retval=0 - [ "$1" = "-q" ] && quiet='quiet' && shift - service="$1" - - [ "$service" = api ] && components="api" - [ "$service" = server ] && components="engine executor notifier" - - # build up the component list - for comp in $components; do - echo $COMPONENTS | grep -q ",\?${comp},\?" && list="$list $comp" - done - list=$(echo $list | sed -e 's/^ //' -e 's/ /,/g') - - # Print out list if not empty - if [ -z "$list" ]; then - echo "mistral-${service} is disabled check \$COMPONENTS environment variable!" - retval=1 - else - [ -z "$quiet" ] && echo $list - fi - return $retval -} diff --git a/packages/st2mistral/conf/logrotate.conf b/packages/st2mistral/conf/logrotate.conf deleted file mode 100644 index 694cd7fb..00000000 --- a/packages/st2mistral/conf/logrotate.conf +++ /dev/null @@ -1,25 +0,0 @@ -## Mistral API -/var/log/mistral/mistral-api.log { - size 1M - rotate 5 - compress - notifempty - missingok - create 644 mistral mistral - postrotate - pkill -USR1 -f mistral.api.wsgi > /dev/null 2>&1 || true - endscript -} - -## Mistral Server -/var/log/mistral/mistral-server.log { - size 50M - rotate 10 - compress - notifempty - missingok - # Mistral doesn't handle USR1 signal right to re-open log files, - # Sending HUP will re-open the logs, but will stop the running workflows - copytruncate - delaycompress -} diff --git a/packages/st2mistral/conf/mistral.conf b/packages/st2mistral/conf/mistral.conf deleted file mode 100644 index bdccdd6d..00000000 --- a/packages/st2mistral/conf/mistral.conf +++ /dev/null @@ -1,846 +0,0 @@ -[DEFAULT] - -# -# From mistral.config -# - -# Enables debugger. Note that using this option changes how the -# eventlet library is used to support async IO. This could result in -# failures that do not occur under normal operation. Use at your own -# risk. (boolean value) -#use_debugger = false - -# Specifies which mistral server to start by the launch script. Valid -# options are all or any combination of api, engine, and executor. -# (list value) -#server = all - -# Logger name for pretty workflow trace output. (string value) -#workflow_trace_log_name = workflow_trace - -# -# From oslo.log -# - -# Print debugging output (set logging level to DEBUG instead of -# default INFO level). (boolean value) -#debug = false - -# If set to false, will disable INFO logging level, making WARNING the -# default. (boolean value) -# This option is deprecated for removal. -# Its value may be silently ignored in the future. -#verbose = true - -# The name of a logging configuration file. This file is appended to -# any existing logging configuration files. For details about logging -# configuration files, see the Python logging module documentation. -# (string value) -# Deprecated group/name - [DEFAULT]/log_config -#log_config_append = - -# DEPRECATED. A logging.Formatter log message format string which may -# use any of the available logging.LogRecord attributes. This option -# is deprecated. Please use logging_context_format_string and -# logging_default_format_string instead. (string value) -#log_format = - -# Format string for %%(asctime)s in log records. Default: %(default)s -# . (string value) -#log_date_format = %Y-%m-%d %H:%M:%S - -# (Optional) Name of log file to output to. If no default is set, -# logging will go to stdout. (string value) -# Deprecated group/name - [DEFAULT]/logfile -#log_file = - -# (Optional) The base directory used for relative --log-file paths. -# (string value) -# Deprecated group/name - [DEFAULT]/logdir -#log_dir = - -# Use syslog for logging. Existing syslog format is DEPRECATED and -# will be changed later to honor RFC5424. (boolean value) -#use_syslog = false - -# (Optional) Enables or disables syslog rfc5424 format for logging. If -# enabled, prefixes the MSG part of the syslog message with APP-NAME -# (RFC5424). The format without the APP-NAME is deprecated in Kilo, -# and will be removed in Mitaka, along with this option. (boolean -# value) -# This option is deprecated for removal. -# Its value may be silently ignored in the future. -#use_syslog_rfc_format = true - -# Syslog facility to receive log lines. (string value) -#syslog_log_facility = LOG_USER - -# Log output to standard error. (boolean value) -#use_stderr = true - -# Format string to use for log messages with context. (string value) -#logging_context_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s - -# Format string to use for log messages without context. (string -# value) -#logging_default_format_string = %(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s - -# Data to append to log format when level is DEBUG. (string value) -#logging_debug_format_suffix = %(funcName)s %(pathname)s:%(lineno)d - -# Prefix each line of exception output with this format. (string -# value) -#logging_exception_prefix = %(asctime)s.%(msecs)03d %(process)d ERROR %(name)s %(instance)s - -# List of logger=LEVEL pairs. (list value) -#default_log_levels = amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN,urllib3.connectionpool=WARN,websocket=WARN,requests.packages.urllib3.util.retry=WARN,urllib3.util.retry=WARN,keystonemiddleware=WARN,routes.middleware=WARN,stevedore=WARN,taskflow=WARN - -# Enables or disables publication of error events. (boolean value) -#publish_errors = false - -# The format for an instance that is passed with the log message. -# (string value) -#instance_format = "[instance: %(uuid)s] " - -# The format for an instance UUID that is passed with the log message. -# (string value) -#instance_uuid_format = "[instance: %(uuid)s] " - -# Enables or disables fatal status of deprecations. (boolean value) -#fatal_deprecations = false - -# -# From oslo.messaging -# - -# Size of RPC connection pool. (integer value) -# Deprecated group/name - [DEFAULT]/rpc_conn_pool_size -#rpc_conn_pool_size = 30 - -# ZeroMQ bind address. Should be a wildcard (*), an ethernet -# interface, or IP. The "host" option should point or resolve to this -# address. (string value) -#rpc_zmq_bind_address = * - -# MatchMaker driver. (string value) -#rpc_zmq_matchmaker = local - -# ZeroMQ receiver listening port. (integer value) -#rpc_zmq_port = 9501 - -# Number of ZeroMQ contexts, defaults to 1. (integer value) -#rpc_zmq_contexts = 1 - -# Maximum number of ingress messages to locally buffer per topic. -# Default is unlimited. (integer value) -#rpc_zmq_topic_backlog = - -# Directory for holding IPC sockets. (string value) -#rpc_zmq_ipc_dir = /var/run/openstack - -# Name of this node. Must be a valid hostname, FQDN, or IP address. -# Must match "host" option, if running Nova. (string value) -#rpc_zmq_host = 127.0.0.1 - -# Seconds to wait before a cast expires (TTL). Only supported by -# impl_zmq. (integer value) -#rpc_cast_timeout = 30 - -# Heartbeat frequency. (integer value) -#matchmaker_heartbeat_freq = 300 - -# Heartbeat time-to-live. (integer value) -#matchmaker_heartbeat_ttl = 600 - -# Size of executor thread pool. (integer value) -# Deprecated group/name - [DEFAULT]/rpc_thread_pool_size -#executor_thread_pool_size = 64 - -# The Drivers(s) to handle sending notifications. Possible values are -# messaging, messagingv2, routing, log, test, noop (multi valued) -#notification_driver = - -# AMQP topic used for OpenStack notifications. (list value) -# Deprecated group/name - [rpc_notifier2]/topics -#notification_topics = notifications - -# Seconds to wait for a response from a call. (integer value) -#rpc_response_timeout = 60 - -# A URL representing the messaging driver to use and its full -# configuration. If not set, we fall back to the rpc_backend option -# and driver specific configuration. (string value) -#transport_url = -transport_url = rabbit://guest:guest@127.0.0.1:5672 - -# The messaging driver to use, defaults to rabbit. Other drivers -# include qpid and zmq. (string value) -#rpc_backend = rabbit - -# The default exchange under which topics are scoped. May be -# overridden by an exchange name specified in the transport_url -# option. (string value) -#control_exchange = openstack - - -[api] - -# -# From mistral.config -# - -# Mistral API server host (string value) -#host = 0.0.0.0 - -# Mistral API server port (integer value) -#port = 8989 - - -[coordination] - -# -# From mistral.config -# - -# The backend URL to be used for coordination (string value) -#backend_url = - -# Number of seconds between heartbeats for coordination. (floating -# point value) -#heartbeat_interval = 5.0 - - -[database] - -# -# From oslo.db -# - -# The file name to use with SQLite. (string value) -# Deprecated group/name - [DEFAULT]/sqlite_db -#sqlite_db = oslo.sqlite - -# If True, SQLite uses synchronous mode. (boolean value) -# Deprecated group/name - [DEFAULT]/sqlite_synchronous -#sqlite_synchronous = true - -# The back end to use for the database. (string value) -# Deprecated group/name - [DEFAULT]/db_backend -#backend = sqlalchemy - -# The SQLAlchemy connection string to use to connect to the database. -# (string value) -# Deprecated group/name - [DEFAULT]/sql_connection -# Deprecated group/name - [DATABASE]/sql_connection -# Deprecated group/name - [sql]/connection -#connection = -connection = postgresql+psycopg2://mistral:StackStorm@localhost/mistral - -# The SQLAlchemy connection string to use to connect to the slave -# database. (string value) -#slave_connection = - -# The SQL mode to be used for MySQL sessions. This option, including -# the default, overrides any server-set SQL mode. To use whatever SQL -# mode is set by the server configuration, set this to no value. -# Example: mysql_sql_mode= (string value) -#mysql_sql_mode = TRADITIONAL - -# Timeout before idle SQL connections are reaped. (integer value) -# Deprecated group/name - [DEFAULT]/sql_idle_timeout -# Deprecated group/name - [DATABASE]/sql_idle_timeout -# Deprecated group/name - [sql]/idle_timeout -#idle_timeout = 3600 - -# Minimum number of SQL connections to keep open in a pool. (integer -# value) -# Deprecated group/name - [DEFAULT]/sql_min_pool_size -# Deprecated group/name - [DATABASE]/sql_min_pool_size -#min_pool_size = 1 - -# Maximum number of SQL connections to keep open in a pool. (integer -# value) -# Deprecated group/name - [DEFAULT]/sql_max_pool_size -# Deprecated group/name - [DATABASE]/sql_max_pool_size -#max_pool_size = -max_pool_size = 50 - -# Maximum number of database connection retries during startup. Set to -# -1 to specify an infinite retry count. (integer value) -# Deprecated group/name - [DEFAULT]/sql_max_retries -# Deprecated group/name - [DATABASE]/sql_max_retries -#max_retries = 10 - -# Interval between retries of opening a SQL connection. (integer -# value) -# Deprecated group/name - [DEFAULT]/sql_retry_interval -# Deprecated group/name - [DATABASE]/reconnect_interval -#retry_interval = 10 - -# If set, use this value for max_overflow with SQLAlchemy. (integer -# value) -# Deprecated group/name - [DEFAULT]/sql_max_overflow -# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow -#max_overflow = - -# Verbosity of SQL debugging information: 0=None, 100=Everything. -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_connection_debug -#connection_debug = 0 - -# Add Python stack traces to SQL as comment strings. (boolean value) -# Deprecated group/name - [DEFAULT]/sql_connection_trace -#connection_trace = false - -# If set, use this value for pool_timeout with SQLAlchemy. (integer -# value) -# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout -#pool_timeout = - -# Enable the experimental use of database reconnect on connection -# lost. (boolean value) -#use_db_reconnect = false - -# Seconds between retries of a database transaction. (integer value) -#db_retry_interval = 1 - -# If True, increases the interval between retries of a database -# operation up to db_max_retry_interval. (boolean value) -#db_inc_retry_interval = true - -# If db_inc_retry_interval is set, the maximum seconds between retries -# of a database operation. (integer value) -#db_max_retry_interval = 10 - -# Maximum retries in case of connection error or deadlock error before -# error is raised. Set to -1 to specify an infinite retry count. -# (integer value) -#db_max_retries = 20 - - -[engine] - -# -# From mistral.config -# - -# Mistral engine plugin (string value) -#engine = default - -# Name of the engine node. This can be an opaque identifier. It is not -# necessarily a hostname, FQDN, or IP address. (string value) -#host = 0.0.0.0 - -# The message topic that the engine listens on. (string value) -#topic = mistral_engine - -# The version of the engine. (string value) -#version = 1.0 - -# The default maximum size in KB of large text fields of runtime -# execution objects. Use -1 for no limit. (integer value) -#execution_field_size_limit_kb = 1024 - - -[execution_expiration_policy] - -# -# From mistral.config -# - -# How often will the executions be evaluated (in minutes). For example -# for value 120 the interval will be 2 hours (every 2 hours). (integer -# value) -#evaluation_interval = - -# Evaluate from which time remove executions in minutes. For example -# when older_than = 60, remove all executions that finished a 60 -# minutes ago or more. Minimum value is 1. Note that only final state -# execution will remove ( SUCCESS / ERROR ). (integer value) -#older_than = - - -[executor] - -# -# From mistral.config -# - -# Name of the executor node. This can be an opaque identifier. It is -# not necessarily a hostname, FQDN, or IP address. (string value) -#host = 0.0.0.0 - -# The message topic that the executor listens on. (string value) -#topic = mistral_executor - -# The version of the executor. (string value) -#version = 1.0 - - -[keystone_authtoken] - -# -# From keystonemiddleware.auth_token -# - -# Complete public Identity API endpoint. (string value) -#auth_uri = - -# API version of the admin Identity API endpoint. (string value) -#auth_version = - -# Do not handle authorization requests within the middleware, but -# delegate the authorization decision to downstream WSGI components. -# (boolean value) -#delay_auth_decision = false - -# Request timeout value for communicating with Identity API server. -# (integer value) -#http_connect_timeout = - -# How many times are we trying to reconnect when communicating with -# Identity API Server. (integer value) -#http_request_max_retries = 3 - -# Env key for the swift cache. (string value) -#cache = - -# Required if identity server requires client certificate (string -# value) -#certfile = - -# Required if identity server requires client certificate (string -# value) -#keyfile = - -# A PEM encoded Certificate Authority to use when verifying HTTPs -# connections. Defaults to system CAs. (string value) -#cafile = - -# Verify HTTPS connections. (boolean value) -#insecure = false - -# Directory used to cache files related to PKI tokens. (string value) -#signing_dir = - -# Optionally specify a list of memcached server(s) to use for caching. -# If left undefined, tokens will instead be cached in-process. (list -# value) -# Deprecated group/name - [DEFAULT]/memcache_servers -#memcached_servers = - -# In order to prevent excessive effort spent validating tokens, the -# middleware caches previously-seen tokens for a configurable duration -# (in seconds). Set to -1 to disable caching completely. (integer -# value) -#token_cache_time = 300 - -# Determines the frequency at which the list of revoked tokens is -# retrieved from the Identity service (in seconds). A high number of -# revocation events combined with a low cache duration may -# significantly reduce performance. (integer value) -#revocation_cache_time = 10 - -# (Optional) If defined, indicate whether token data should be -# authenticated or authenticated and encrypted. Acceptable values are -# MAC or ENCRYPT. If MAC, token data is authenticated (with HMAC) in -# the cache. If ENCRYPT, token data is encrypted and authenticated in -# the cache. If the value is not one of these options or empty, -# auth_token will raise an exception on initialization. (string value) -#memcache_security_strategy = - -# (Optional, mandatory if memcache_security_strategy is defined) This -# string is used for key derivation. (string value) -#memcache_secret_key = - -# (Optional) Number of seconds memcached server is considered dead -# before it is tried again. (integer value) -#memcache_pool_dead_retry = 300 - -# (Optional) Maximum total number of open connections to every -# memcached server. (integer value) -#memcache_pool_maxsize = 10 - -# (Optional) Socket timeout in seconds for communicating with a -# memcached server. (integer value) -#memcache_pool_socket_timeout = 3 - -# (Optional) Number of seconds a connection to memcached is held -# unused in the pool before it is closed. (integer value) -#memcache_pool_unused_timeout = 60 - -# (Optional) Number of seconds that an operation will wait to get a -# memcached client connection from the pool. (integer value) -#memcache_pool_conn_get_timeout = 10 - -# (Optional) Use the advanced (eventlet safe) memcached client pool. -# The advanced pool will only work under python 2.x. (boolean value) -#memcache_use_advanced_pool = false - -# (Optional) Indicate whether to set the X-Service-Catalog header. If -# False, middleware will not ask for service catalog on token -# validation and will not set the X-Service-Catalog header. (boolean -# value) -#include_service_catalog = true - -# Used to control the use and type of token binding. Can be set to: -# "disabled" to not check token binding. "permissive" (default) to -# validate binding information if the bind type is of a form known to -# the server and ignore it if not. "strict" like "permissive" but if -# the bind type is unknown the token will be rejected. "required" any -# form of token binding is needed to be allowed. Finally the name of a -# binding method that must be present in tokens. (string value) -#enforce_token_bind = permissive - -# If true, the revocation list will be checked for cached tokens. This -# requires that PKI tokens are configured on the identity server. -# (boolean value) -#check_revocations_for_cached = false - -# Hash algorithms to use for hashing PKI tokens. This may be a single -# algorithm or multiple. The algorithms are those supported by Python -# standard hashlib.new(). The hashes will be tried in the order given, -# so put the preferred one first for performance. The result of the -# first hash will be stored in the cache. This will typically be set -# to multiple values only while migrating from a less secure algorithm -# to a more secure one. Once all the old tokens are expired this -# option should be set to a single value for better performance. (list -# value) -#hash_algorithms = md5 - -# Prefix to prepend at the beginning of the path. Deprecated, use -# identity_uri. (string value) -#auth_admin_prefix = - -# Host providing the admin Identity API endpoint. Deprecated, use -# identity_uri. (string value) -#auth_host = 127.0.0.1 - -# Port of the admin Identity API endpoint. Deprecated, use -# identity_uri. (integer value) -#auth_port = 35357 - -# Protocol of the admin Identity API endpoint (http or https). -# Deprecated, use identity_uri. (string value) -#auth_protocol = https - -# Complete admin Identity API endpoint. This should specify the -# unversioned root endpoint e.g. https://127.0.0.1:35357/ (string -# value) -#identity_uri = - -# This option is deprecated and may be removed in a future release. -# Single shared secret with the Keystone configuration used for -# bootstrapping a Keystone installation, or otherwise bypassing the -# normal authentication process. This option should not be used, use -# `admin_user` and `admin_password` instead. (string value) -#admin_token = - -# Service username. (string value) -#admin_user = - -# Service user password. (string value) -#admin_password = - -# Service tenant name. (string value) -#admin_tenant_name = admin - - -[matchmaker_redis] - -# -# From oslo.messaging -# - -# Host to locate redis. (string value) -#host = 127.0.0.1 - -# Use this port to connect to redis host. (integer value) -#port = 6379 - -# Password for Redis server (optional). (string value) -#password = - - -[matchmaker_ring] - -# -# From oslo.messaging -# - -# Matchmaker ring file (JSON). (string value) -# Deprecated group/name - [DEFAULT]/matchmaker_ringfile -#ringfile = /etc/oslo/matchmaker_ring.json - - -[oslo_messaging_amqp] - -# -# From oslo.messaging -# - -# address prefix used when sending to a specific server (string value) -# Deprecated group/name - [amqp1]/server_request_prefix -#server_request_prefix = exclusive - -# address prefix used when broadcasting to all servers (string value) -# Deprecated group/name - [amqp1]/broadcast_prefix -#broadcast_prefix = broadcast - -# address prefix when sending to any server in group (string value) -# Deprecated group/name - [amqp1]/group_request_prefix -#group_request_prefix = unicast - -# Name for the AMQP container (string value) -# Deprecated group/name - [amqp1]/container_name -#container_name = - -# Timeout for inactive connections (in seconds) (integer value) -# Deprecated group/name - [amqp1]/idle_timeout -#idle_timeout = 0 - -# Debug: dump AMQP frames to stdout (boolean value) -# Deprecated group/name - [amqp1]/trace -#trace = false - -# CA certificate PEM file to verify server certificate (string value) -# Deprecated group/name - [amqp1]/ssl_ca_file -#ssl_ca_file = - -# Identifying certificate PEM file to present to clients (string -# value) -# Deprecated group/name - [amqp1]/ssl_cert_file -#ssl_cert_file = - -# Private key PEM file used to sign cert_file certificate (string -# value) -# Deprecated group/name - [amqp1]/ssl_key_file -#ssl_key_file = - -# Password for decrypting ssl_key_file (if encrypted) (string value) -# Deprecated group/name - [amqp1]/ssl_key_password -#ssl_key_password = - -# Accept clients using either SSL or plain TCP (boolean value) -# Deprecated group/name - [amqp1]/allow_insecure_clients -#allow_insecure_clients = false - - -[oslo_messaging_qpid] - -# -# From oslo.messaging -# - -# Use durable queues in AMQP. (boolean value) -# Deprecated group/name - [DEFAULT]/amqp_durable_queues -# Deprecated group/name - [DEFAULT]/rabbit_durable_queues -#amqp_durable_queues = false - -# Auto-delete queues in AMQP. (boolean value) -# Deprecated group/name - [DEFAULT]/amqp_auto_delete -#amqp_auto_delete = false - -# Send a single AMQP reply to call message. The current behaviour -# since oslo-incubator is to send two AMQP replies - first one with -# the payload, a second one to ensure the other have finish to send -# the payload. We are going to remove it in the N release, but we must -# keep backward compatible at the same time. This option provides such -# compatibility - it defaults to False in Liberty and can be turned on -# for early adopters with a new installations or for testing. Please -# note, that this option will be removed in the Mitaka release. -# (boolean value) -#send_single_reply = false - -# Qpid broker hostname. (string value) -# Deprecated group/name - [DEFAULT]/qpid_hostname -#qpid_hostname = 127.0.0.1 - -# Qpid broker port. (integer value) -# Deprecated group/name - [DEFAULT]/qpid_port -#qpid_port = 5672 - -# Qpid HA cluster host:port pairs. (list value) -# Deprecated group/name - [DEFAULT]/qpid_hosts -#qpid_hosts = $qpid_hostname:$qpid_port - -# Username for Qpid connection. (string value) -# Deprecated group/name - [DEFAULT]/qpid_username -#qpid_username = - -# Password for Qpid connection. (string value) -# Deprecated group/name - [DEFAULT]/qpid_password -#qpid_password = - -# Space separated list of SASL mechanisms to use for auth. (string -# value) -# Deprecated group/name - [DEFAULT]/qpid_sasl_mechanisms -#qpid_sasl_mechanisms = - -# Seconds between connection keepalive heartbeats. (integer value) -# Deprecated group/name - [DEFAULT]/qpid_heartbeat -#qpid_heartbeat = 60 - -# Transport to use, either 'tcp' or 'ssl'. (string value) -# Deprecated group/name - [DEFAULT]/qpid_protocol -#qpid_protocol = tcp - -# Whether to disable the Nagle algorithm. (boolean value) -# Deprecated group/name - [DEFAULT]/qpid_tcp_nodelay -#qpid_tcp_nodelay = true - -# The number of prefetched messages held by receiver. (integer value) -# Deprecated group/name - [DEFAULT]/qpid_receiver_capacity -#qpid_receiver_capacity = 1 - -# The qpid topology version to use. Version 1 is what was originally -# used by impl_qpid. Version 2 includes some backwards-incompatible -# changes that allow broker federation to work. Users should update -# to version 2 when they are able to take everything down, as it -# requires a clean break. (integer value) -# Deprecated group/name - [DEFAULT]/qpid_topology_version -#qpid_topology_version = 1 - - -[oslo_messaging_rabbit] - -# -# From oslo.messaging -# - -# Use durable queues in AMQP. (boolean value) -# Deprecated group/name - [DEFAULT]/amqp_durable_queues -# Deprecated group/name - [DEFAULT]/rabbit_durable_queues -#amqp_durable_queues = false - -# Auto-delete queues in AMQP. (boolean value) -# Deprecated group/name - [DEFAULT]/amqp_auto_delete -#amqp_auto_delete = false - -# Send a single AMQP reply to call message. The current behaviour -# since oslo-incubator is to send two AMQP replies - first one with -# the payload, a second one to ensure the other have finish to send -# the payload. We are going to remove it in the N release, but we must -# keep backward compatible at the same time. This option provides such -# compatibility - it defaults to False in Liberty and can be turned on -# for early adopters with a new installations or for testing. Please -# note, that this option will be removed in the Mitaka release. -# (boolean value) -#send_single_reply = false - -# SSL version to use (valid only if SSL enabled). Valid values are -# TLSv1 and SSLv23. SSLv2, SSLv3, TLSv1_1, and TLSv1_2 may be -# available on some distributions. (string value) -# Deprecated group/name - [DEFAULT]/kombu_ssl_version -#kombu_ssl_version = - -# SSL key file (valid only if SSL enabled). (string value) -# Deprecated group/name - [DEFAULT]/kombu_ssl_keyfile -#kombu_ssl_keyfile = - -# SSL cert file (valid only if SSL enabled). (string value) -# Deprecated group/name - [DEFAULT]/kombu_ssl_certfile -#kombu_ssl_certfile = - -# SSL certification authority file (valid only if SSL enabled). -# (string value) -# Deprecated group/name - [DEFAULT]/kombu_ssl_ca_certs -#kombu_ssl_ca_certs = - -# How long to wait before reconnecting in response to an AMQP consumer -# cancel notification. (floating point value) -# Deprecated group/name - [DEFAULT]/kombu_reconnect_delay -#kombu_reconnect_delay = 1.0 - -# How long to wait before considering a reconnect attempt to have -# failed. This value should not be longer than rpc_response_timeout. -# (integer value) -#kombu_reconnect_timeout = 60 - -# The RabbitMQ broker address where a single node is used. (string -# value) -# Deprecated group/name - [DEFAULT]/rabbit_host -#rabbit_host = 127.0.0.1 - -# The RabbitMQ broker port where a single node is used. (integer -# value) -# Deprecated group/name - [DEFAULT]/rabbit_port -#rabbit_port = 5672 - -# RabbitMQ HA cluster host:port pairs. (list value) -# Deprecated group/name - [DEFAULT]/rabbit_hosts -#rabbit_hosts = $rabbit_host:$rabbit_port - -# Connect over SSL for RabbitMQ. (boolean value) -# Deprecated group/name - [DEFAULT]/rabbit_use_ssl -#rabbit_use_ssl = false - -# The RabbitMQ userid. (string value) -# Deprecated group/name - [DEFAULT]/rabbit_userid -#rabbit_userid = guest - -# The RabbitMQ password. (string value) -# Deprecated group/name - [DEFAULT]/rabbit_password -#rabbit_password = guest - -# The RabbitMQ login method. (string value) -# Deprecated group/name - [DEFAULT]/rabbit_login_method -#rabbit_login_method = AMQPLAIN - -# The RabbitMQ virtual host. (string value) -# Deprecated group/name - [DEFAULT]/rabbit_virtual_host -#rabbit_virtual_host = / - -# How frequently to retry connecting with RabbitMQ. (integer value) -#rabbit_retry_interval = 1 - -# How long to backoff for between retries when connecting to RabbitMQ. -# (integer value) -# Deprecated group/name - [DEFAULT]/rabbit_retry_backoff -#rabbit_retry_backoff = 2 - -# Maximum number of RabbitMQ connection retries. Default is 0 -# (infinite retry count). (integer value) -# Deprecated group/name - [DEFAULT]/rabbit_max_retries -#rabbit_max_retries = 0 - -# Use HA queues in RabbitMQ (x-ha-policy: all). If you change this -# option, you must wipe the RabbitMQ database. (boolean value) -# Deprecated group/name - [DEFAULT]/rabbit_ha_queues -#rabbit_ha_queues = false - -# Number of seconds after which the Rabbit broker is considered down -# if heartbeat's keep-alive fails (0 disable the heartbeat). -# EXPERIMENTAL (integer value) -#heartbeat_timeout_threshold = 60 - -# How often times during the heartbeat_timeout_threshold we check the -# heartbeat. (integer value) -#heartbeat_rate = 2 - -# Deprecated, use rpc_backend=kombu+memory or rpc_backend=fake -# (boolean value) -# Deprecated group/name - [DEFAULT]/fake_rabbit -#fake_rabbit = false - - -[pecan] - -# -# From mistral.config -# - -# Pecan root controller (string value) -#root = mistral.api.controllers.root.RootController - -# A list of modules where pecan will search for applications. (list -# value) -#modules = mistral.api - -# Enables the ability to display tracebacks in the browser and -# interactively debug during development. (boolean value) -#debug = false - -# Enables user authentication in pecan. (boolean value) -#auth_enable = true -auth_enable = false diff --git a/packages/st2mistral/conf/policy.json b/packages/st2mistral/conf/policy.json deleted file mode 100644 index c5df702a..00000000 --- a/packages/st2mistral/conf/policy.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "admin_only": "is_admin:True", - "admin_or_owner": "is_admin:True or project_id:%(project_id)s", - "default": "rule:admin_or_owner", - - "action_executions:delete": "rule:admin_or_owner", - "action_execution:create": "rule:admin_or_owner", - "action_executions:get": "rule:admin_or_owner", - "action_executions:list": "rule:admin_or_owner", - "action_executions:update": "rule:admin_or_owner", - - "actions:create": "rule:admin_or_owner", - "actions:delete": "rule:admin_or_owner", - "actions:get": "rule:admin_or_owner", - "actions:list": "rule:admin_or_owner", - "actions:update": "rule:admin_or_owner", - - "cron_triggers:create": "rule:admin_or_owner", - "cron_triggers:delete": "rule:admin_or_owner", - "cron_triggers:get": "rule:admin_or_owner", - "cron_triggers:list": "rule:admin_or_owner", - - "environments:create": "rule:admin_or_owner", - "environments:delete": "rule:admin_or_owner", - "environments:get": "rule:admin_or_owner", - "environments:list": "rule:admin_or_owner", - "environments:update": "rule:admin_or_owner", - - "executions:create": "rule:admin_or_owner", - "executions:delete": "rule:admin_or_owner", - "executions:get": "rule:admin_or_owner", - "executions:list": "rule:admin_or_owner", - "executions:update": "rule:admin_or_owner", - - "members:create": "rule:admin_or_owner", - "members:delete": "rule:admin_or_owner", - "members:get": "rule:admin_or_owner", - "members:list": "rule:admin_or_owner", - "members:update": "rule:admin_or_owner", - - "services:list": "rule:admin_or_owner", - - "tasks:get": "rule:admin_or_owner", - "tasks:list": "rule:admin_or_owner", - "tasks:update": "rule:admin_or_owner", - - "workbooks:create": "rule:admin_or_owner", - "workbooks:delete": "rule:admin_or_owner", - "workbooks:get": "rule:admin_or_owner", - "workbooks:list": "rule:admin_or_owner", - "workbooks:update": "rule:admin_or_owner", - - "workflows:create": "rule:admin_or_owner", - "workflows:delete": "rule:admin_or_owner", - "workflows:get": "rule:admin_or_owner", - "workflows:list": "rule:admin_or_owner", - "workflows:update": "rule:admin_or_owner" -} diff --git a/packages/st2mistral/conf/rhel-functions-sysvinit b/packages/st2mistral/conf/rhel-functions-sysvinit deleted file mode 100644 index 687535aa..00000000 --- a/packages/st2mistral/conf/rhel-functions-sysvinit +++ /dev/null @@ -1,241 +0,0 @@ -# -*-Shell-script-*- - -# Redhat daemon function with process group change ability -# preserving supplementary groups. -# -daemon() { - # Test syntax. - local gotbase= force= nicelevel corelimit - local pid base= user= nice= bg= pid_file= - local cgroup= - local group= group_opts= suppgroup_opts= - local background= daemoncmd= - nicelevel=0 - while [ "$1" != "${1##[-+]}" ]; do - case $1 in - '') echo $"$0: Usage: daemon [+/-nicelevel] {program}" - return 1;; - --check) - base=$2 - gotbase="yes" - shift 2 - ;; - --check=?*) - base=${1#--check=} - gotbase="yes" - shift - ;; - --user) - user=$2 - shift 2 - ;; - --user=?*) - user=${1#--user=} - shift - ;; - --group) - group=$2 - shift 2 - ;; - --group=?*) - group=${1#--group=} - shift - ;; - --pidfile) - pid_file=$2 - shift 2 - ;; - --pidfile=?*) - pid_file=${1#--pidfile=} - shift - ;; - --force) - force="force" - shift - ;; - --background) - background="yes" - shift - ;; - [-+][0-9]*) - nice="nice -n $1" - shift - ;; - *) echo $"$0: Usage: daemon [+/-nicelevel] {program}" - return 1;; - esac - done - - # Save basename. - [ -z "$gotbase" ] && base=${1##*/} - - # See if it's already running. Look *only* at the pid file. - __pids_var_run "$base" "$pid_file" - - [ -n "$pid" -a -z "$force" ] && return - - # make sure it doesn't core dump anywhere unless requested - corelimit="ulimit -S -c ${DAEMON_COREFILE_LIMIT:-0}" - - # if they set NICELEVEL in /etc/sysconfig/foo, honor it - [ -n "${NICELEVEL:-}" ] && nice="nice -n $NICELEVEL" - - # if they set CGROUP_DAEMON in /etc/sysconfig/foo, honor it - if [ -n "${CGROUP_DAEMON}" ]; then - if [ ! -x /bin/cgexec ]; then - echo -n "Cgroups not installed"; warning - echo - else - cgroup="/bin/cgexec"; - for i in $CGROUP_DAEMON; do - cgroup="$cgroup -g $i"; - done - fi - fi - - # Echo daemon - [ "${BOOTUP:-}" = "verbose" -a -z "${LSB:-}" ] && echo -n " $base" - - # Group and supplementary group list options (-G grp1 -G grp2). - # If group is not overrided runuser will pick up supplementary groups, - # so no need to set them specifically. - if [ ! -z "$group" ]; then - group_opts="-g $group" - suppgroup_opts=$(id -nG $user | sed 's/^\| / -G /g') - fi - - # Wrap daemon command call with nohup, if background options is given. - [ -z "$background" ] && daemoncmd="$*" || - daemoncmd="nohup /dev/null 2>&1 $* &" - - # And start it up. - : ${user:=root} - $cgroup $nice runuser $group_opts $suppgroup_opts $user \ - -s /bin/bash -c "$corelimit >/dev/null 2>&1 ; $daemoncmd" - - # Write completion message only when starting a real daemon. - if [ -z "$background" ]; then - [ "$?" -eq 0 ] && success $"$base startup" || failure $"$base startup" - fi -} - - -# Write pid of a starting daemon into the pidfile. -# By default wait for the pid up to 3 seconds. -pgrep_waitforpid() { - local pid= pid_file= base= trailer= - local pgrep_opts="-n" timeout="3.0" - - while [ "$1" != "${1##--}" ]; do - case $1 in - '') echo $"$0: Usage: pgrep_waitforpid {program}" - return 1;; - --masterpid) - pgrep_opts="-o" - shift - ;; - --pidfile) - pid_file=$2 - shift 2 - ;; - --pidfile=?*) - pid_file=${1#--pidfile=} - shift - ;; - --scriptname) - base=$2 - shift 2 - ;; - --scriptname=?*) - base=${1#--scriptname=} - shift - ;; - --timeout) - timeout=$2 - shift 2 - ;; - --timeout=?*) - timeout=${1#--timeout=} - shift - ;; - - *) echo $"$0: Usage: pgrep_waitforpid {program}" - return 1;; - esac - done - - # Locate pid of a started daemon (oldest pid in case if masterpid is given). - [ -z "$scriptname"] || trailer=".*${scriptname}" - - # Check for pid in a cycle until found or timed-out. - # - for s in $(seq 0.0 0.1 $timeout); do - pid=$(pgrep $pgrep_opts -f "$1${trailer}") - if [ ! -z "$pid" ]; then - # In case of false-positve during forking, double check that pid exists. - sleep 0.1; checkpid $pid && break || continue - else - sleep 0.1 - fi - done - - # Define pid_file path. - [ -z "$base" ] && base=${1##*/} - pid_file=${pid_file:-/var/run/$base.pid} - - if checkpid $pid; then - echo $pid > $pid_file - success $"$base startup" - else - failure $"$base startup" - fi -} - -# Waits for a process startup and when it writes the pidfile. -waitforpid() { - local pid= pid_file= base= timeout="3.0" - - while [ "$1" != "${1##--}" ]; do - case $1 in - '') echo $"$0: Usage: waitforpid [options]" - return 1;; - --pidfile) - pid_file=$2 - shift 2 - ;; - --pidfile=?*) - pid_file=${1#--pidfile=} - shift - ;; - --timeout) - timeout=$2 - shift 2 - ;; - --timeout=?*) - timeout=${1#--timeout=} - shift - ;; - - *) echo $"$0: Usage: waitforpid [options]" - return 1;; - esac - done - - # Define pid_file path. - [ -z "$base" ] && base=${1##*/} - pid_file=${pid_file:-/var/run/$base.pid} - - # Check for pid in a cycle until found or timed-out. - # - for s in $(seq 0.0 0.1 $timeout); do - if [ -f "$pid_file" ]; then - # In case process dies or anything, we keep iterating - pid=$(cat $pid_file) - sleep 0.1; checkpid $pid && break || continue - else - sleep 0.1 - fi - done - - checkpid $pid && success $"$base startup" || failure $"$base startup" -} diff --git a/packages/st2mistral/debian/README b/packages/st2mistral/debian/README deleted file mode 100644 index 5d5bcf47..00000000 --- a/packages/st2mistral/debian/README +++ /dev/null @@ -1,6 +0,0 @@ -The Debian Package st2mistral ----------------------------- - -Comments regarding the Package - - -- StackStorm Engineering Mon, 14 Sep 2015 16:42:52 +0000 diff --git a/packages/st2mistral/debian/README.Debian b/packages/st2mistral/debian/README.Debian deleted file mode 100644 index f01a2f41..00000000 --- a/packages/st2mistral/debian/README.Debian +++ /dev/null @@ -1,6 +0,0 @@ -st2mistral for Debian ---------------------- - - - - -- StackStorm Engineering Mon, 14 Sep 2015 16:42:52 +0000 diff --git a/packages/st2mistral/debian/README.source b/packages/st2mistral/debian/README.source deleted file mode 100644 index 301da38b..00000000 --- a/packages/st2mistral/debian/README.source +++ /dev/null @@ -1,10 +0,0 @@ -st2mistral for Debian ---------------------- - - - - - - -- StackStorm Engineering <> Mon, 14 Sep 2015 16:42:52 +0000 - diff --git a/packages/st2mistral/debian/changelog b/packages/st2mistral/debian/changelog deleted file mode 100644 index 6c73909c..00000000 --- a/packages/st2mistral/debian/changelog +++ /dev/null @@ -1,5 +0,0 @@ -st2mistral (0.1.0) unstable; urgency=low - - * Initial Release. - - -- StackStorm Engineering Mon, 14 Sep 2015 16:42:52 +0000 diff --git a/packages/st2mistral/debian/compat b/packages/st2mistral/debian/compat deleted file mode 100644 index ec635144..00000000 --- a/packages/st2mistral/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/packages/st2mistral/debian/conffiles b/packages/st2mistral/debian/conffiles deleted file mode 100644 index 9c3d1427..00000000 --- a/packages/st2mistral/debian/conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/logrotate.d/mistral diff --git a/packages/st2mistral/debian/control b/packages/st2mistral/debian/control deleted file mode 100644 index 4275982b..00000000 --- a/packages/st2mistral/debian/control +++ /dev/null @@ -1,17 +0,0 @@ -Source: st2mistral -Section: Python -Priority: optional -Maintainer: StackStorm Engineering -Build-Depends: debhelper (>= 9), python, dh-virtualenv (>= 0.8) -Standards-Version: 3.9.5 -Homepage: https://stackstorm.com/ -Vcs-Git: git://github.com/stackstorm/mistral.git -Vcs-Browser: https://github.com/stackstorm/mistral - -Package: st2mistral -Architecture: any -Pre-Depends: dpkg (>= 1.16.16), python2.7, adduser -Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, procps -Description: st2 Mistral workflow service. - Task orchestration and workflow engine with powerful strategies like parallelism, loops, retries, - nested tasks, execution order capabilities. Rules defined in YAML, extended with YAQL expressions. diff --git a/packages/st2mistral/debian/copyright b/packages/st2mistral/debian/copyright deleted file mode 100644 index e4ee0412..00000000 --- a/packages/st2mistral/debian/copyright +++ /dev/null @@ -1,33 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: st2mistral -Source: - -Files: * -Copyright: - -License: Apache-2.0 - -Files: debian/* -Copyright: 2015 StackStorm Engineering <> -License: Apache-2.0 - -License: Apache-2.0 - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - . - http://www.apache.org/licenses/LICENSE-2.0 - . - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - . - On Debian systems, the complete text of the Apache version 2.0 license - can be found in "/usr/share/common-licenses/Apache-2.0". - -# Please also look if there are files or directories which have a -# different copyright/license attached and list them here. -# Please avoid to pick license terms that are more restrictive than the -# packaged work, as it may make Debian's contributions unacceptable upstream. diff --git a/packages/st2mistral/debian/docs b/packages/st2mistral/debian/docs deleted file mode 100644 index e69de29b..00000000 diff --git a/packages/st2mistral/debian/install b/packages/st2mistral/debian/install deleted file mode 100644 index 00fa030a..00000000 --- a/packages/st2mistral/debian/install +++ /dev/null @@ -1,3 +0,0 @@ -conf/mistral.conf /etc/mistral -bin/mistral /usr/bin -conf/policy.json /etc/mistral diff --git a/packages/st2mistral/debian/postinst b/packages/st2mistral/debian/postinst deleted file mode 100644 index c9b45f71..00000000 --- a/packages/st2mistral/debian/postinst +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# postinst script for st2mistral -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -MISTRAL_USER=mistral -UPGRADESTAMP="/tmp/.stamp-stackstorm-st2mistral-deb-package" -upgrading=0 - -## Permissions of files which should be set on install -SET_PERMS=$(cat <&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/packages/st2mistral/debian/preinst b/packages/st2mistral/debian/preinst deleted file mode 100644 index c2b6cc43..00000000 --- a/packages/st2mistral/debian/preinst +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# preinst script for st2mistral -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `install' -# * `install' -# * `upgrade' -# * `abort-upgrade' -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -MISTRAL_USER=mistral -UPGRADESTAMP="/tmp/.stamp-stackstorm-st2-deb-package" - -## Create stackstorm users and groups -create_users() { - # create st2 user (services user) - (id $MISTRAL_USER 1>/dev/null 2>&1) || - adduser --group --disabled-password --no-create-home --system $MISTRAL_USER -} - -case "$1" in - install) - create_users - ;; - upgrade) - create_users - touch $UPGRADESTAMP - ;; - abort-upgrade) - ;; - *) - echo "preinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/packages/st2mistral/debian/rules b/packages/st2mistral/debian/rules deleted file mode 100755 index 8c348f4f..00000000 --- a/packages/st2mistral/debian/rules +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/make -f -# DH_VERBOSE = 1 - -# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* -#DPKG_EXPORT_BUILDFLAGS = 1 -#include /usr/share/dpkg/default.mk - -# Virtualenv and pip should be updated (better not to use the distro defaults). -# Updated ones can be found under /use/local. -PATH = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -WHEELDIR ?= /tmp/wheelhouse -DH_VIRTUALENV_INSTALL_ROOT := /opt/stackstorm -export DH_VIRTUALENV_INSTALL_ROOT - -%: - dh $@ --with python-virtualenv - - -override_dh_installdirs: - dh_installdirs - # Restore dh_auto_install behaviour, because it was removed by dh_virtualenv - # dh_auto_install same with: - $(MAKE) install - -override_dh_installinit: - # So far don't start services - dh_installinit --no-start --name=mistral - dh_installinit --no-start --name=mistral-api - dh_installinit --no-start --name=mistral-server - -override_dh_installdeb: - $(MAKE) post_install - dh_installdeb - -override_dh_virtualenv: - # NB! Use '--no-download' arg for 'virtualenv' is required, - # otherwise it downloads latest PIP version instead of bundled/pinned one. - dh_virtualenv --extra-virtualenv-arg='--no-download' \ - --extra-pip-arg '--find-links=$(WHEELDIR)' \ - --extra-pip-arg '--no-index' --install-suffix mistral --no-test diff --git a/packages/st2mistral/debian/source/format b/packages/st2mistral/debian/source/format deleted file mode 100644 index 89ae9db8..00000000 --- a/packages/st2mistral/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/packages/st2mistral/debian/st2mistral.dirs b/packages/st2mistral/debian/st2mistral.dirs deleted file mode 100644 index 3598d4ff..00000000 --- a/packages/st2mistral/debian/st2mistral.dirs +++ /dev/null @@ -1,4 +0,0 @@ -/etc/mistral -/var/log/mistral -/var/run/mistral -/etc/logrotate.d diff --git a/packages/st2mistral/rpm/mistral-api.service b/packages/st2mistral/rpm/mistral-api.service deleted file mode 100644 index 054d7c12..00000000 --- a/packages/st2mistral/rpm/mistral-api.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Mistral workflow service api -After=network.target - -[Service] -Type=simple -User=mistral -Group=mistral -Environment="COMPONENTS=api,engine,executor,notifier" -Environment="API_ARGS=--log-file /var/log/mistral/mistral-api.log -b 127.0.0.1:8989 -w 2 mistral.api.wsgi --graceful-timeout 10" -EnvironmentFile=-/etc/sysconfig/mistral -ExecStart=/bin/sh -c ". /opt/stackstorm/mistral/share/sysvinit/helpers; enabled_list -q api || exit 0; exec /opt/stackstorm/mistral/bin/gunicorn $API_ARGS" -PrivateTmp=true - -[Install] -WantedBy=multi-user.target diff --git a/packages/st2mistral/rpm/mistral-server.service b/packages/st2mistral/rpm/mistral-server.service deleted file mode 100644 index d086a981..00000000 --- a/packages/st2mistral/rpm/mistral-server.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Mistral workflow service (engine/executor) -After=network.target - -[Service] -Type=simple -User=mistral -Group=mistral -Environment="SERVER_ARGS=--config-file /etc/mistral/mistral.conf --log-file /var/log/mistral/mistral-server.log" -Environment="COMPONENTS=api,engine,executor,notifier" -EnvironmentFile=-/etc/sysconfig/mistral -ExecStart=/bin/sh -c ". /opt/stackstorm/mistral/share/sysvinit/helpers; enabled_list -q server || exit 0; exec /opt/stackstorm/mistral/bin/mistral-server --server $(enabled_list server) $SERVER_ARGS" - -[Install] -WantedBy=multi-user.target diff --git a/packages/st2mistral/rpm/mistral.service b/packages/st2mistral/rpm/mistral.service deleted file mode 100644 index e1e4f20a..00000000 --- a/packages/st2mistral/rpm/mistral.service +++ /dev/null @@ -1,14 +0,0 @@ -[Unit] -Description=Mistral workflow service invocation wrapper -After=network.target - -[Service] -Type=oneshot -EnvironmentFile=-/etc/sysconfig/mistral -ExecStartPost=/usr/bin/systemctl start mistral-api mistral-server -ExecStop=/usr/bin/systemctl stop mistral-api mistral-server -ExecStart=/bin/sh -c true -RemainAfterExit=true - -[Install] -WantedBy=multi-user.target diff --git a/packages/st2mistral/rpm/st2mistral.spec b/packages/st2mistral/rpm/st2mistral.spec deleted file mode 100644 index a9b35941..00000000 --- a/packages/st2mistral/rpm/st2mistral.spec +++ /dev/null @@ -1,67 +0,0 @@ -%define package st2mistral -%define venv_name mistral -%define svc_user mistral -%define version %(echo -n "${MISTRAL_VERSION:-0.1}") -%define release %(echo -n "${MISTRAL_RELEASE:-1}") - -%define _sourcedir ./ -%define _builddir %{SOURCE0} -%include rpmspec/helpers.spec -%include rpmspec/package_venv.spec - -Name: %{package} -Version: %{version} -Release: %{release} -Group: System/Management -License: Apache 2.0 -Url: https://github.com/StackStorm/mistral -Source0: . -Requires: bash, procps -Provides: openstack-mistral -Summary: st2 Mistral workflow service - - -%description - Task orchestration and workflow engine with powerful strategies like parallelism, loops, retries, - nested tasks, execution order capabilities. Rules defined in YAML, extended with YAQL expressions. - -%define _builddir %{SOURCE0} - -%install - %default_install - %pip_install_venv - %service_install mistral mistral-api mistral-server - make post_install DESTDIR=%{?buildroot} - - %cleanup_python_abspath - -%prep - rm -rf %{buildroot} - mkdir -p %{buildroot} - -%clean - rm -rf %{buildroot} - -%pre - adduser --no-create-home --system --user-group %{svc_user} 2>/dev/null - exit 0 - -%post - %service_post mistral mistral-api mistral-server - -%preun - %service_preun mistral mistral-api mistral-server - -%postun - %service_postun mistral mistral-api mistral-server - -%files - %{_bindir}/mistral - /opt/stackstorm/mistral - %config(noreplace) %{_sysconfdir}/mistral/* - %config(noreplace) %{_sysconfdir}/logrotate.d/mistral - %attr(755, %{svc_user}, root) %{_localstatedir}/log/mistral - %attr(755, %{svc_user}, root) %{_localstatedir}/run/mistral - %{_unitdir}/mistral.service - %{_unitdir}/mistral-api.service - %{_unitdir}/mistral-server.service diff --git a/rake/build/environment.rb b/rake/build/environment.rb index 6c5647c8..403f3903 100644 --- a/rake/build/environment.rb +++ b/rake/build/environment.rb @@ -14,7 +14,7 @@ st2tests) # Default list of packages to build -BUILDLIST = 'st2 st2mistral' +BUILDLIST = 'st2' ## Helper procs convert_to_ipaddr = ->(v) {(v !~ Resolv::AddressRegex) ? Resolv.getaddress(v) : v} @@ -59,7 +59,6 @@ # Default hostnames of dependat services (the value can take an address also) envpass :rabbitmqhost, 'rabbitmq', proc: convert_to_ipaddr envpass :mongodbhost, 'mongodb', proc: convert_to_ipaddr - envpass :postgreshost, 'postgres', proc: convert_to_ipaddr # upload_sources - a list of directories which should be propogated # to remote nodes. @@ -76,12 +75,3 @@ envpass :st2pkg_release, 1 envpass :st2_circle_url end - -pipeopts 'st2mistral' do - envpass :checkout, 1, from: 'ST2MISTRAL_CHECKOUT', proc: convert_to_int - envpass :giturl, 'https://github.com/StackStorm/mistral', from: 'ST2MISTRAL_GITURL' - envpass :gitrev, 'master', from: 'ST2MISTRAL_GITREV' - envpass :gitdir, make_tmpname('mistral-'), from: 'ST2MISTRAL_GITDIR' - envpass :mistral_version, '3.3dev' - envpass :mistral_release, 1 -end diff --git a/rake/build/package_st2mistral.rake b/rake/build/package_st2mistral.rake deleted file mode 100644 index d7df1e64..00000000 --- a/rake/build/package_st2mistral.rake +++ /dev/null @@ -1,51 +0,0 @@ -namespace :package do - - ## Create wheels for components and write them to the wheelhouse directory. - # - task :prebuild_st2mistral do - pipeline 'st2mistral' do - run hostname: opts[:buildnode] do |opts| - command show_uuid: false - with opts.env do - within opts.gitdir do - make :bdist_wheel, label: 'bdist: st2mistral' - make :wheelhouse, label: 'wheelhouse: st2mistral' - end - end - end - end - end - - ## Prepare st2 bundle package to be built - # - task :post_checkout_st2mistral do - pipeline 'st2mistral' do - run hostname: opts[:buildnode] do |opts| - command show_uuid: false, label: "checkout: update st2mistral" - with opts.env do - # Update gitdir with rpmspecs and st2mistral updates. - within opts.basedir do - execute :cp, '-r rpmspec/ packages/st2mistral/* $GITDIR' - end - end - end - end - end - - ## Build st2mistral bundle package - # - task :st2mistral do - pipeline 'st2mistral' do - run hostname: opts[:buildnode] do |opts| - command label: 'package: st2mistral', show_uuid: false - with opts.env do - within opts.gitdir do - make :changelog - execute :bash, '$BASEDIR/scripts/build_os_package.sh st2mistral' - end - end - end - end - end - -end diff --git a/rake/build/setup.rake b/rake/build/setup.rake index 7a03dd6f..ad434e10 100644 --- a/rake/build/setup.rake +++ b/rake/build/setup.rake @@ -24,9 +24,6 @@ namespace :setup do if opts.packages.include? 'st2' execute :bash, "$BASEDIR/scripts/generate_st2_config.sh" end - if opts.packages.include? 'st2mistral' - execute :bash, "$BASEDIR/scripts/generate_mistral_config.sh" - end end end end diff --git a/rake/spec/default/50-installed-cli-versions_spec.rb b/rake/spec/default/50-installed-cli-versions_spec.rb index 33206cfd..475edd1b 100644 --- a/rake/spec/default/50-installed-cli-versions_spec.rb +++ b/rake/spec/default/50-installed-cli-versions_spec.rb @@ -9,13 +9,4 @@ end end - if spec[:mistral_enabled] - describe command("mistral --version") do - its(:exit_status) { is_expected.to eq 0 } - # show version number in Rspec output - after(:all) do - puts " " + described_class.stderr - end - end - end end diff --git a/rake/spec/default/60-st2_all-services-ok_spec.rb b/rake/spec/default/60-st2_all-services-ok_spec.rb index 83c979fa..a594a253 100644 --- a/rake/spec/default/60-st2_all-services-ok_spec.rb +++ b/rake/spec/default/60-st2_all-services-ok_spec.rb @@ -15,40 +15,6 @@ it { is_expected.to be_reachable.with :port => 27017, :timeout => 1 } end - if spec[:mistral_enabled] - describe 'postgres' do - subject { host(spec[:postgreshost]) } - it { is_expected.to be_reachable.with :port => 5432, :timeout => 1 } - end - end -end - -describe 'run mistral DB migration' do - if spec[:mistral_enabled] - # Run mistral DB upgrade head - describe command(spec[:mistral_db_head_command]) do - its(:exit_status) { is_expected.to eq 0 } - after(:all) do - if described_class.exit_status > 0 - puts "\nMistral DB upgrade head has failed (:", '>>>>>', - described_class.stderr - puts - end - end - end - - # Run mistral DB populate - describe command(spec[:mistral_db_populate_command]) do - its(:exit_status) { is_expected.to eq 0 } - after(:all) do - if described_class.exit_status > 0 - puts "Mistral DB populate has failed!", '>>>>>', - described_class.stderr - puts - end - end - end - end end describe 'start st2 components and services' do @@ -97,12 +63,6 @@ it { should be_listening } end - if spec[:mistral_enabled] - describe 'mistral', prompt_on_failure: true do - subject { port(8989) } - it { should be_listening } - end - end end # all st2 services should work immediately after restart diff --git a/rake/spec/default/65-st2mistral_actions_spec.rb b/rake/spec/default/65-st2mistral_actions_spec.rb deleted file mode 100644 index 2ad2e829..00000000 --- a/rake/spec/default/65-st2mistral_actions_spec.rb +++ /dev/null @@ -1,11 +0,0 @@ -require 'spec_helper' - -# Check that st2mistral can run internal actions successfully -describe 'st2mistral actions integrity checks' do - if spec[:mistral_enabled] - describe command(%(mistral run-action std.echo '{"output": "It works!"}')) do - its(:exit_status) { is_expected.to eq 0 } - its(:stdout) { should include '{"result": "It works!"}' } - end - end -end diff --git a/rake/spec/spec_helper.rb b/rake/spec/spec_helper.rb index 43e9a817..43ec53e6 100644 --- a/rake/spec/spec_helper.rb +++ b/rake/spec/spec_helper.rb @@ -28,10 +28,8 @@ class ST2Spec bin_prefix: '/usr/bin', conf_dir: '/etc/st2', log_dir: '/var/log/st2', - mistral_enabled: pipeopts.packages.include?('st2mistral'), package_list: pipeopts.packages, rabbitmqhost: pipeopts.rabbitmqhost, - postgreshost: pipeopts.postgreshost, mongodbhost: pipeopts.mongodbhost, loglines_to_show: 100, logdest_pattern: { @@ -41,19 +39,12 @@ class ST2Spec ' --register-fail-on-failure' \ ' --register-all' \ ' --config-dir /etc/st2', - mistral_db_head_command: '/opt/stackstorm/mistral/bin/mistral-db-manage' \ - ' --config-file /etc/mistral/mistral.conf upgrade head', - mistral_db_populate_command: '/opt/stackstorm/mistral/bin/mistral-db-manage' \ - ' --config-file /etc/mistral/mistral.conf populate', st2_services: ST2_SERVICES, package_opts: {}, package_has_services: { st2: ST2_SERVICES, - st2mistral: [ - ['mistral', binary_name: 'mistral-server'] - ] }, package_has_binaries: { @@ -61,7 +52,6 @@ class ST2Spec st2-trigger-refire st2 st2-self-check st2-track-result st2-validate-pack-config st2-check-license st2-generate-symmetric-crypto-key st2-submit-debug-info), - st2mistral: %w(mistral) }, package_has_directories: { @@ -71,17 +61,10 @@ class ST2Spec '/opt/stackstorm/packs', [ '/var/log/st2', example: Proc.new {|_| be_writable.by('owner')} ] ], - st2mistral: [ - '/etc/mistral', - '/etc/logrotate.d', - '/opt/stackstorm/mistral', - [ '/var/log/mistral', example: Proc.new {|_| be_writable.by('owner')} ] - ] }, package_has_files: { st2: %w(/etc/st2/st2.conf /etc/logrotate.d/st2), - st2mistral: %w(/etc/mistral/mistral.conf /etc/logrotate.d/mistral) }, package_has_users: { @@ -89,7 +72,6 @@ class ST2Spec 'st2', ['stanley', example: Proc.new {|_| have_home_directory '/home/stanley'} ] ], - st2mistral: %w(mistral) } } @@ -110,7 +92,6 @@ def [](key) def service_list @services_available ||= begin list = ST2_SERVICES - list << 'mistral' if spec[:mistral_enabled] list end end diff --git a/rake/spec/spec_package_iterables.rb b/rake/spec/spec_package_iterables.rb index 35dba1ef..47b3c1c4 100644 --- a/rake/spec/spec_package_iterables.rb +++ b/rake/spec/spec_package_iterables.rb @@ -6,7 +6,6 @@ def set_context_vars(name, opts) @opts = Hashie::Mash.new.merge(opts || {}) # we use different venv name for st2 package (bundle) @venv_name = (name.to_s == 'st2' ? 'st2' : name).to_s - @venv_name = (name.to_s == 'st2mistral' ? 'mistral' : name).to_s end # Collection iterating methods over spec lists diff --git a/scripts/setup-vagrant.sh b/scripts/setup-vagrant.sh index 89c6d35f..b02cb012 100644 --- a/scripts/setup-vagrant.sh +++ b/scripts/setup-vagrant.sh @@ -48,13 +48,7 @@ fi if [[ "${ST2_GITREV}" != "" ]]; then ST2REV="-e ST2_GITREV=$ST2_GITREV" fi -if [[ "${ST2MISTRAL_GITURL}" != "" ]]; then - ST2MISTRALURL="-e ST2MISTRAL_GITURL=$ST2MISTRAL_GITURL" -fi -if [[ "${ST2MISTRAL_GITREV}" != "" ]]; then - ST2MISTRALREV="-e ST2MISTRAL_GITREV=$ST2MISTRAL_GITREV" -fi -sudo sh -c "(cd /vagrant && $DC_BIN run $ST2PACKAGES $ST2URL $ST2REV $ST2MISTRALURL $ST2MISTRALREV --rm $ST2_TARGET)" +sudo sh -c "(cd /vagrant && $DC_BIN run $ST2PACKAGES $ST2URL $ST2REV --rm $ST2_TARGET)" if [ "$ST2_INSTALL" = "yes" ]; then echo 'Install st2 packages' @@ -65,7 +59,6 @@ if [ "$ST2_INSTALL" = "yes" ]; then # Install the packages we just built if [[ $ST2_TARGET != 'el7' ]]; then sudo /usr/bin/gdebi -n /tmp/st2-packages/st2_*.deb - sudo /usr/bin/gdebi -n /tmp/st2-packages/st2mistral*.deb else sudo $INSTALL_CMD install -y /tmp/st2-packages/st2*.rpm fi @@ -110,10 +103,6 @@ EOF' sudo mkdir -p /etc/st2/keys sudo st2-generate-symmetric-crypto-key --key-path /etc/st2/keys/datastore_key.json - # Setup Mistral DB - /opt/stackstorm/mistral/bin/mistral-db-manage --config-file /etc/mistral/mistral.conf upgrade head - git init && /opt/stackstorm/mistral/bin/mistral-db-manage --config-file /etc/mistral/mistral.conf populate && rm -rf .git - # Start ST2 services sudo st2ctl start sudo st2ctl reload