Skip to content

Commit

Permalink
Merge pull request #5011 from amanda11/remove_mistral
Browse files Browse the repository at this point in the history
Initial mistral removal from st2
  • Loading branch information
amanda11 authored Aug 31, 2020
2 parents af9c6d6 + 049a559 commit 0e83fc5
Show file tree
Hide file tree
Showing 330 changed files with 376 additions and 14,048 deletions.
9 changes: 0 additions & 9 deletions .circle/configure-postgres.sh

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ Fixed
Removed
~~~~~~~

* Removed ``Mistral`` workflow engine (deprecation) #5011

Contributed by Amanda McGuinness (@amanda11 Ammeon Solutions)
* Removed ``CentOS 6``/``RHEL 6`` support #4984

Contributed by Amanda McGuinness (@amanda11 Ammeon Solutions)
Expand Down
92 changes: 19 additions & 73 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ BINARIES := bin
# All components are prefixed by st2 and not .egg-info.
COMPONENTS := $(shell ls -a | grep ^st2 | grep -v .egg-info)
COMPONENTS_RUNNERS := $(wildcard contrib/runners/*)
MOCK_RUNNERS := $(wildcard st2common/tests/runners/*)
COMPONENTS_WITHOUT_ST2TESTS := $(shell ls -a | grep ^st2 | grep -v .egg-info | grep -v st2tests | grep -v st2exporter)

COMPONENTS_WITH_RUNNERS := $(COMPONENTS) $(COMPONENTS_RUNNERS)
COMPONENTS_WITH_RUNNERS_WITHOUT_MISTRAL_RUNNER := $(foreach component,$(filter-out contrib/runners/mistral_v2,$(COMPONENTS_WITH_RUNNERS)),$(component))

COMPONENTS_TEST_DIRS := $(wildcard st2*/tests) $(wildcard contrib/runners/*/tests)

Expand All @@ -43,12 +43,11 @@ space_char :=
space_char +=
COMPONENT_PYTHONPATH = $(subst $(space_char),:,$(realpath $(COMPONENTS_WITH_RUNNERS)))
COMPONENTS_TEST := $(foreach component,$(filter-out $(COMPONENT_SPECIFIC_TESTS),$(COMPONENTS_WITH_RUNNERS)),$(component))
COMPONENTS_TEST_WITHOUT_MISTRAL_RUNNER := $(foreach component,$(filter-out $(COMPONENT_SPECIFIC_TESTS),$(COMPONENTS_WITH_RUNNERS_WITHOUT_MISTRAL_RUNNER)),$(component))
COMPONENTS_TEST_COMMA := $(subst $(slash),$(dot),$(subst $(space_char),$(comma),$(COMPONENTS_TEST)))
COMPONENTS_TEST_MODULES := $(subst $(slash),$(dot),$(COMPONENTS_TEST_DIRS))
COMPONENTS_TEST_MODULES_COMMA := $(subst $(space_char),$(comma),$(COMPONENTS_TEST_MODULES))

COVERAGE_GLOBS := .coverage.unit.* .coverage.integration.* .coverage.mistral.*
COVERAGE_GLOBS := .coverage.unit.* .coverage.integration.*
COVERAGE_GLOBS_QUOTED := $(foreach glob,$(COVERAGE_GLOBS),'$(glob)')

REQUIREMENTS := test-requirements.txt requirements.txt
Expand Down Expand Up @@ -114,8 +113,6 @@ play:
@echo
@echo COMPONENTS_WITH_RUNNERS=$(COMPONENTS_WITH_RUNNERS)
@echo
@echo COMPONENTS_WITH_RUNNERS_WITHOUT_MISTRAL_RUNNER=$(COMPONENTS_WITH_RUNNERS_WITHOUT_MISTRAL_RUNNER)
@echo
@echo COMPONENTS_TEST=$(COMPONENTS_TEST)
@echo
@echo COMPONENTS_TEST_COMMA=$(COMPONENTS_TEST_COMMA)
Expand All @@ -126,8 +123,6 @@ play:
@echo
@echo COMPONENTS_TEST_MODULES_COMMA=$(COMPONENTS_TEST_MODULES_COMMA)
@echo
@echo COMPONENTS_TEST_WITHOUT_MISTRAL_RUNNER=$(COMPONENTS_TEST_WITHOUT_MISTRAL_RUNNER)
@echo
@echo COMPONENT_PYTHONPATH=$(COMPONENT_PYTHONPATH)
@echo
@echo TRAVIS_PULL_REQUEST=$(TRAVIS_PULL_REQUEST)
Expand Down Expand Up @@ -163,6 +158,18 @@ install-runners:
(. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python setup.py develop --no-deps); \
done

.PHONY: install-mock-runners
install-mock-runners:
@echo ""
@echo "================== INSTALL MOCK RUNNERS ===================="
@echo ""
@for component in $(MOCK_RUNNERS); do \
echo "==========================================================="; \
echo "Installing mock runner:" $$component; \
echo "==========================================================="; \
(. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python setup.py develop --no-deps); \
done

.PHONY: check-requirements
.check-requirements:
@echo
Expand Down Expand Up @@ -455,16 +462,6 @@ compilepy3:
@mongo --eval "rs.initiate()"
@sleep 15

.PHONY: .cleanmysql
.cleanmysql:
@echo "==================== cleanmysql ===================="
@echo "----- Dropping all Mistral MYSQL databases -----"
@mysql -uroot -pStackStorm -e "DROP DATABASE IF EXISTS mistral"
@mysql -uroot -pStackStorm -e "CREATE DATABASE mistral"
@mysql -uroot -pStackStorm -e "GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'127.0.0.1' IDENTIFIED BY 'StackStorm'"
@mysql -uroot -pStackStorm -e "FLUSH PRIVILEGES"
@/opt/openstack/mistral/.venv/bin/python /opt/openstack/mistral/tools/sync_db.py --config-file /etc/mistral/mistral.conf

.PHONY: .cleanrabbitmq
.cleanrabbitmq:
@echo "==================== cleanrabbitmq ===================="
Expand All @@ -479,7 +476,7 @@ compilepy3:
@echo "Removing all coverage results directories"
@echo
rm -rf .coverage $(COVERAGE_GLOBS) \
.coverage.unit .coverage.integration .coverage.mistral
.coverage.unit .coverage.integration

.PHONY: distclean
distclean: clean
Expand Down Expand Up @@ -524,7 +521,7 @@ distclean: clean
@echo "==========================================================="

.PHONY: requirements
requirements: virtualenv .requirements .sdist-requirements install-runners
requirements: virtualenv .requirements .sdist-requirements install-runners install-mock-runners
@echo
@echo "==================== requirements ===================="
@echo
Expand Down Expand Up @@ -669,7 +666,7 @@ endif
@echo
@echo "----- Dropping st2-test db -----"
@mongo st2-test --eval "db.dropDatabase();"
for component in $(COMPONENTS_TEST_WITHOUT_MISTRAL_RUNNER); do\
for component in $(COMPONENTS_TEST); do\
echo "==========================================================="; \
echo "Running tests in" $$component; \
echo "-----------------------------------------------------------"; \
Expand Down Expand Up @@ -820,43 +817,8 @@ endif
.PHONY: .itests-coverage-html
.itests-coverage-html: .integration-tests-coverage-html

.PHONY: mistral-itests
mistral-itests: requirements .mistral-itests

.PHONY: .mistral-itests
.mistral-itests:
@echo
@echo "==================== MISTRAL integration tests ===================="
@echo "The tests assume both st2 and mistral are running on 127.0.0.1."
@echo
. $(VIRTUALENV_DIR)/bin/activate; nosetests $(NOSE_OPTS) -s -v st2tests/integration/mistral || exit 1;

.PHONY: .run-mistral-itests-coverage
ifdef INCLUDE_TESTS_IN_COVERAGE
.run-mistral-itests-coverage: NOSE_COVERAGE_PACKAGES := $(NOSE_COVERAGE_PACKAGES),st2tests.mistral.integration
endif
.run-mistral-itests-coverage:
@echo
@echo "==================== MISTRAL integration tests with coverage ===================="
@echo "The tests assume both st2 and mistral are running on 127.0.0.1."
@echo
. $(VIRTUALENV_DIR)/bin/activate; \
COVERAGE_FILE=.coverage.mistral.integration \
nosetests $(NOSE_OPTS) -s -v $(NOSE_COVERAGE_FLAGS) \
$(NOSE_COVERAGE_PACKAGES) \
st2tests/integration/mistral || exit 1;

.coverage.mistral.integration:
if [ ! -e .coverage.mistral.integration ]; then \
make .run-mistral-itests-coverage; \
fi

.PHONY: .mistral-itests-coverage-html
.mistral-itests-coverage-html: .coverage.mistral.integration
. $(VIRTUALENV_DIR)/bin/activate; COVERAGE_FILE=.coverage.mistral.integration coverage html

.PHONY: .coverage-combine
.coverage-combine: .run-unit-tests-coverage .run-integration-tests-coverage .run-mistral-itests-coverage
.coverage-combine: .run-unit-tests-coverage .run-integration-tests-coverage
. $(VIRTUALENV_DIR)/bin/activate; coverage combine $(COVERAGE_GLOBS)

# This is a real target, but we need to do our own make trickery in case some
Expand Down Expand Up @@ -998,7 +960,7 @@ debs:


.PHONY: ci
ci: ci-checks ci-unit ci-integration ci-mistral ci-packs-tests
ci: ci-checks ci-unit ci-integration ci-packs-tests

.PHONY: ci-checks
ci-checks: compile .generated-files-check .pylint .flake8 check-requirements check-sdist-requirements .st2client-dependencies-check .st2common-circular-dependencies-check circle-lint-api-spec .rst-check .st2client-install-check check-python-packages
Expand Down Expand Up @@ -1073,15 +1035,6 @@ ci-py3-integration: requirements .ci-prepare-integration .ci-py3-integration
.PHONY: ci-unit
ci-unit: .unit-tests-coverage-html

.PHONY: ci-unit-nightly
ci-unit-nightly:
# NOTE: We run mistral runner checks only as part of a nightly build to speed up
# non nightly builds (Mistral will be deprecated in the future)
@echo
@echo "============== ci-unit-nightly =============="
@echo
. $(VIRTUALENV_DIR)/bin/activate; nosetests $(NOSE_OPTS) -s -v contrib/runners/mistral_v2/tests/unit

.PHONY: .ci-prepare-integration
.ci-prepare-integration:
sudo -E ./scripts/travis/prepare-integration.sh
Expand All @@ -1092,13 +1045,6 @@ ci-integration: .ci-prepare-integration .itests-coverage-html
.PHONY: ci-runners
ci-runners: .ci-prepare-integration .runners-itests-coverage-html

.PHONY: .ci-prepare-mistral
.ci-prepare-mistral:
sudo -E ./scripts/travis/setup-mistral.sh

.PHONY: ci-mistral
ci-mistral: .ci-prepare-integration .ci-prepare-mistral .mistral-itests-coverage-html

.PHONY: ci-orquesta
ci-orquesta: .ci-prepare-integration .orquesta-itests-coverage-html

Expand Down
20 changes: 0 additions & 20 deletions conf/HA/nginx/st2.conf.blueprint.sample
Original file line number Diff line number Diff line change
Expand Up @@ -104,24 +104,4 @@ server {
proxy_cache off;
proxy_set_header Host $host;
}

location /mistral/ {
rewrite ^/mistral/(.*) /$1 break;

proxy_pass http://127.0.0.1:8989/;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_redirect off;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Authorization;

proxy_set_header Connection '';
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_set_header Host $host;
}
}
18 changes: 0 additions & 18 deletions conf/HA/nginx/st2.conf.controller.sample
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,6 @@ server {
proxy_cache off;
}

location /mistral/ {
proxy_pass https://st2/mistral/;
proxy_next_upstream error timeout http_500 http_502 http_503 http_504;
proxy_read_timeout 90;
proxy_connect_timeout 90;
proxy_redirect off;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass_header Authorization;

proxy_set_header Connection '';
chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
}

location / {
root /opt/stackstorm/static/webui/;
index index.html;
Expand Down
4 changes: 0 additions & 4 deletions conf/HA/st2.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,3 @@ use_paramiko_ssh_runner = True

[database]
host = st2-multi-node-controller

[mistral]
v2_base_url = https://st2-multi-node-controller/mistral/v2
api_url = https://st2-multi-node-controller/api
4 changes: 0 additions & 4 deletions conf/mistral.dev/README.md

This file was deleted.

32 changes: 0 additions & 32 deletions conf/mistral.dev/logging.conf

This file was deleted.

9 changes: 0 additions & 9 deletions conf/mistral.dev/mistral.dev.conf

This file was deleted.

58 changes: 0 additions & 58 deletions conf/mistral.dev/policy.json

This file was deleted.

Loading

0 comments on commit 0e83fc5

Please sign in to comment.