Skip to content

Commit 0e83fc5

Browse files
authored
Merge pull request #5011 from amanda11/remove_mistral
Initial mistral removal from st2
2 parents af9c6d6 + 049a559 commit 0e83fc5

File tree

330 files changed

+376
-14048
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

330 files changed

+376
-14048
lines changed

.circle/configure-postgres.sh

Lines changed: 0 additions & 9 deletions
This file was deleted.

CHANGELOG.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ Fixed
7979
Removed
8080
~~~~~~~
8181

82+
* Removed ``Mistral`` workflow engine (deprecation) #5011
83+
84+
Contributed by Amanda McGuinness (@amanda11 Ammeon Solutions)
8285
* Removed ``CentOS 6``/``RHEL 6`` support #4984
8386

8487
Contributed by Amanda McGuinness (@amanda11 Ammeon Solutions)

Makefile

Lines changed: 19 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ BINARIES := bin
2222
# All components are prefixed by st2 and not .egg-info.
2323
COMPONENTS := $(shell ls -a | grep ^st2 | grep -v .egg-info)
2424
COMPONENTS_RUNNERS := $(wildcard contrib/runners/*)
25+
MOCK_RUNNERS := $(wildcard st2common/tests/runners/*)
2526
COMPONENTS_WITHOUT_ST2TESTS := $(shell ls -a | grep ^st2 | grep -v .egg-info | grep -v st2tests | grep -v st2exporter)
2627

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

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

@@ -43,12 +43,11 @@ space_char :=
4343
space_char +=
4444
COMPONENT_PYTHONPATH = $(subst $(space_char),:,$(realpath $(COMPONENTS_WITH_RUNNERS)))
4545
COMPONENTS_TEST := $(foreach component,$(filter-out $(COMPONENT_SPECIFIC_TESTS),$(COMPONENTS_WITH_RUNNERS)),$(component))
46-
COMPONENTS_TEST_WITHOUT_MISTRAL_RUNNER := $(foreach component,$(filter-out $(COMPONENT_SPECIFIC_TESTS),$(COMPONENTS_WITH_RUNNERS_WITHOUT_MISTRAL_RUNNER)),$(component))
4746
COMPONENTS_TEST_COMMA := $(subst $(slash),$(dot),$(subst $(space_char),$(comma),$(COMPONENTS_TEST)))
4847
COMPONENTS_TEST_MODULES := $(subst $(slash),$(dot),$(COMPONENTS_TEST_DIRS))
4948
COMPONENTS_TEST_MODULES_COMMA := $(subst $(space_char),$(comma),$(COMPONENTS_TEST_MODULES))
5049

51-
COVERAGE_GLOBS := .coverage.unit.* .coverage.integration.* .coverage.mistral.*
50+
COVERAGE_GLOBS := .coverage.unit.* .coverage.integration.*
5251
COVERAGE_GLOBS_QUOTED := $(foreach glob,$(COVERAGE_GLOBS),'$(glob)')
5352

5453
REQUIREMENTS := test-requirements.txt requirements.txt
@@ -114,8 +113,6 @@ play:
114113
@echo
115114
@echo COMPONENTS_WITH_RUNNERS=$(COMPONENTS_WITH_RUNNERS)
116115
@echo
117-
@echo COMPONENTS_WITH_RUNNERS_WITHOUT_MISTRAL_RUNNER=$(COMPONENTS_WITH_RUNNERS_WITHOUT_MISTRAL_RUNNER)
118-
@echo
119116
@echo COMPONENTS_TEST=$(COMPONENTS_TEST)
120117
@echo
121118
@echo COMPONENTS_TEST_COMMA=$(COMPONENTS_TEST_COMMA)
@@ -126,8 +123,6 @@ play:
126123
@echo
127124
@echo COMPONENTS_TEST_MODULES_COMMA=$(COMPONENTS_TEST_MODULES_COMMA)
128125
@echo
129-
@echo COMPONENTS_TEST_WITHOUT_MISTRAL_RUNNER=$(COMPONENTS_TEST_WITHOUT_MISTRAL_RUNNER)
130-
@echo
131126
@echo COMPONENT_PYTHONPATH=$(COMPONENT_PYTHONPATH)
132127
@echo
133128
@echo TRAVIS_PULL_REQUEST=$(TRAVIS_PULL_REQUEST)
@@ -163,6 +158,18 @@ install-runners:
163158
(. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python setup.py develop --no-deps); \
164159
done
165160

161+
.PHONY: install-mock-runners
162+
install-mock-runners:
163+
@echo ""
164+
@echo "================== INSTALL MOCK RUNNERS ===================="
165+
@echo ""
166+
@for component in $(MOCK_RUNNERS); do \
167+
echo "==========================================================="; \
168+
echo "Installing mock runner:" $$component; \
169+
echo "==========================================================="; \
170+
(. $(VIRTUALENV_DIR)/bin/activate; cd $$component; python setup.py develop --no-deps); \
171+
done
172+
166173
.PHONY: check-requirements
167174
.check-requirements:
168175
@echo
@@ -455,16 +462,6 @@ compilepy3:
455462
@mongo --eval "rs.initiate()"
456463
@sleep 15
457464

458-
.PHONY: .cleanmysql
459-
.cleanmysql:
460-
@echo "==================== cleanmysql ===================="
461-
@echo "----- Dropping all Mistral MYSQL databases -----"
462-
@mysql -uroot -pStackStorm -e "DROP DATABASE IF EXISTS mistral"
463-
@mysql -uroot -pStackStorm -e "CREATE DATABASE mistral"
464-
@mysql -uroot -pStackStorm -e "GRANT ALL PRIVILEGES ON mistral.* TO 'mistral'@'127.0.0.1' IDENTIFIED BY 'StackStorm'"
465-
@mysql -uroot -pStackStorm -e "FLUSH PRIVILEGES"
466-
@/opt/openstack/mistral/.venv/bin/python /opt/openstack/mistral/tools/sync_db.py --config-file /etc/mistral/mistral.conf
467-
468465
.PHONY: .cleanrabbitmq
469466
.cleanrabbitmq:
470467
@echo "==================== cleanrabbitmq ===================="
@@ -479,7 +476,7 @@ compilepy3:
479476
@echo "Removing all coverage results directories"
480477
@echo
481478
rm -rf .coverage $(COVERAGE_GLOBS) \
482-
.coverage.unit .coverage.integration .coverage.mistral
479+
.coverage.unit .coverage.integration
483480

484481
.PHONY: distclean
485482
distclean: clean
@@ -524,7 +521,7 @@ distclean: clean
524521
@echo "==========================================================="
525522

526523
.PHONY: requirements
527-
requirements: virtualenv .requirements .sdist-requirements install-runners
524+
requirements: virtualenv .requirements .sdist-requirements install-runners install-mock-runners
528525
@echo
529526
@echo "==================== requirements ===================="
530527
@echo
@@ -669,7 +666,7 @@ endif
669666
@echo
670667
@echo "----- Dropping st2-test db -----"
671668
@mongo st2-test --eval "db.dropDatabase();"
672-
for component in $(COMPONENTS_TEST_WITHOUT_MISTRAL_RUNNER); do\
669+
for component in $(COMPONENTS_TEST); do\
673670
echo "==========================================================="; \
674671
echo "Running tests in" $$component; \
675672
echo "-----------------------------------------------------------"; \
@@ -820,43 +817,8 @@ endif
820817
.PHONY: .itests-coverage-html
821818
.itests-coverage-html: .integration-tests-coverage-html
822819

823-
.PHONY: mistral-itests
824-
mistral-itests: requirements .mistral-itests
825-
826-
.PHONY: .mistral-itests
827-
.mistral-itests:
828-
@echo
829-
@echo "==================== MISTRAL integration tests ===================="
830-
@echo "The tests assume both st2 and mistral are running on 127.0.0.1."
831-
@echo
832-
. $(VIRTUALENV_DIR)/bin/activate; nosetests $(NOSE_OPTS) -s -v st2tests/integration/mistral || exit 1;
833-
834-
.PHONY: .run-mistral-itests-coverage
835-
ifdef INCLUDE_TESTS_IN_COVERAGE
836-
.run-mistral-itests-coverage: NOSE_COVERAGE_PACKAGES := $(NOSE_COVERAGE_PACKAGES),st2tests.mistral.integration
837-
endif
838-
.run-mistral-itests-coverage:
839-
@echo
840-
@echo "==================== MISTRAL integration tests with coverage ===================="
841-
@echo "The tests assume both st2 and mistral are running on 127.0.0.1."
842-
@echo
843-
. $(VIRTUALENV_DIR)/bin/activate; \
844-
COVERAGE_FILE=.coverage.mistral.integration \
845-
nosetests $(NOSE_OPTS) -s -v $(NOSE_COVERAGE_FLAGS) \
846-
$(NOSE_COVERAGE_PACKAGES) \
847-
st2tests/integration/mistral || exit 1;
848-
849-
.coverage.mistral.integration:
850-
if [ ! -e .coverage.mistral.integration ]; then \
851-
make .run-mistral-itests-coverage; \
852-
fi
853-
854-
.PHONY: .mistral-itests-coverage-html
855-
.mistral-itests-coverage-html: .coverage.mistral.integration
856-
. $(VIRTUALENV_DIR)/bin/activate; COVERAGE_FILE=.coverage.mistral.integration coverage html
857-
858820
.PHONY: .coverage-combine
859-
.coverage-combine: .run-unit-tests-coverage .run-integration-tests-coverage .run-mistral-itests-coverage
821+
.coverage-combine: .run-unit-tests-coverage .run-integration-tests-coverage
860822
. $(VIRTUALENV_DIR)/bin/activate; coverage combine $(COVERAGE_GLOBS)
861823

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

999961

1000962
.PHONY: ci
1001-
ci: ci-checks ci-unit ci-integration ci-mistral ci-packs-tests
963+
ci: ci-checks ci-unit ci-integration ci-packs-tests
1002964

1003965
.PHONY: ci-checks
1004966
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
@@ -1073,15 +1035,6 @@ ci-py3-integration: requirements .ci-prepare-integration .ci-py3-integration
10731035
.PHONY: ci-unit
10741036
ci-unit: .unit-tests-coverage-html
10751037

1076-
.PHONY: ci-unit-nightly
1077-
ci-unit-nightly:
1078-
# NOTE: We run mistral runner checks only as part of a nightly build to speed up
1079-
# non nightly builds (Mistral will be deprecated in the future)
1080-
@echo
1081-
@echo "============== ci-unit-nightly =============="
1082-
@echo
1083-
. $(VIRTUALENV_DIR)/bin/activate; nosetests $(NOSE_OPTS) -s -v contrib/runners/mistral_v2/tests/unit
1084-
10851038
.PHONY: .ci-prepare-integration
10861039
.ci-prepare-integration:
10871040
sudo -E ./scripts/travis/prepare-integration.sh
@@ -1092,13 +1045,6 @@ ci-integration: .ci-prepare-integration .itests-coverage-html
10921045
.PHONY: ci-runners
10931046
ci-runners: .ci-prepare-integration .runners-itests-coverage-html
10941047

1095-
.PHONY: .ci-prepare-mistral
1096-
.ci-prepare-mistral:
1097-
sudo -E ./scripts/travis/setup-mistral.sh
1098-
1099-
.PHONY: ci-mistral
1100-
ci-mistral: .ci-prepare-integration .ci-prepare-mistral .mistral-itests-coverage-html
1101-
11021048
.PHONY: ci-orquesta
11031049
ci-orquesta: .ci-prepare-integration .orquesta-itests-coverage-html
11041050

conf/HA/nginx/st2.conf.blueprint.sample

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,24 +104,4 @@ server {
104104
proxy_cache off;
105105
proxy_set_header Host $host;
106106
}
107-
108-
location /mistral/ {
109-
rewrite ^/mistral/(.*) /$1 break;
110-
111-
proxy_pass http://127.0.0.1:8989/;
112-
proxy_read_timeout 90;
113-
proxy_connect_timeout 90;
114-
proxy_redirect off;
115-
116-
proxy_set_header Host $host;
117-
proxy_set_header X-Real-IP $remote_addr;
118-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
119-
proxy_pass_header Authorization;
120-
121-
proxy_set_header Connection '';
122-
chunked_transfer_encoding off;
123-
proxy_buffering off;
124-
proxy_cache off;
125-
proxy_set_header Host $host;
126-
}
127107
}

conf/HA/nginx/st2.conf.controller.sample

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -126,24 +126,6 @@ server {
126126
proxy_cache off;
127127
}
128128

129-
location /mistral/ {
130-
proxy_pass https://st2/mistral/;
131-
proxy_next_upstream error timeout http_500 http_502 http_503 http_504;
132-
proxy_read_timeout 90;
133-
proxy_connect_timeout 90;
134-
proxy_redirect off;
135-
136-
proxy_set_header Host $host;
137-
proxy_set_header X-Real-IP $remote_addr;
138-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
139-
proxy_pass_header Authorization;
140-
141-
proxy_set_header Connection '';
142-
chunked_transfer_encoding off;
143-
proxy_buffering off;
144-
proxy_cache off;
145-
}
146-
147129
location / {
148130
root /opt/stackstorm/static/webui/;
149131
index index.html;

conf/HA/st2.conf.sample

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,3 @@ use_paramiko_ssh_runner = True
8282

8383
[database]
8484
host = st2-multi-node-controller
85-
86-
[mistral]
87-
v2_base_url = https://st2-multi-node-controller/mistral/v2
88-
api_url = https://st2-multi-node-controller/api

conf/mistral.dev/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

conf/mistral.dev/logging.conf

Lines changed: 0 additions & 32 deletions
This file was deleted.

conf/mistral.dev/mistral.dev.conf

Lines changed: 0 additions & 9 deletions
This file was deleted.

conf/mistral.dev/policy.json

Lines changed: 0 additions & 58 deletions
This file was deleted.

0 commit comments

Comments
 (0)