Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial mistral removal from st2 #5011

Merged
merged 30 commits into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a3c009f
Initial mistral removal from st2
amanda11 Aug 4, 2020
ebd4e65
Add some more changes
amanda11 Aug 4, 2020
7503797
Fix some unit-tests
amanda11 Aug 6, 2020
085fc7a
Amend name in test action
amanda11 Aug 7, 2020
c688c71
Update requirements-used-for-tests
amanda11 Aug 7, 2020
3e53e6b
Add integration orquesta re-run test, as only had mistral before
amanda11 Aug 7, 2020
0762975
Fix lint and amend new test yaml
amanda11 Aug 7, 2020
5473808
Amend new orquesta test yaml file
amanda11 Aug 7, 2020
d443efa
Removing re-run orquesta with items due to https://github.com/StackSt…
amanda11 Aug 7, 2020
eab2c08
Create orquesta with-items re-run test as validated that issue seen w…
amanda11 Aug 7, 2020
6650451
Merge branch 'master' into remove_mistral
arm4b Aug 10, 2020
c2d38a4
Minor fixes
amanda11 Aug 10, 2020
71ad684
tools/launchdev.sh
amanda11 Aug 10, 2020
a20f9dc
Add simple JSON
amanda11 Aug 10, 2020
446642d
Add requirements after rebuilt
amanda11 Aug 10, 2020
ff67a99
Put back result tracker
amanda11 Aug 10, 2020
f11876f
Update py3 expected text
amanda11 Aug 10, 2020
11aec44
Added get_query_module and get_callback_modules but as commented out …
amanda11 Aug 11, 2020
c7a35c3
Put in orquesta execution tail
amanda11 Aug 11, 2020
a70d5c9
Fix flake8 error
amanda11 Aug 11, 2020
bd85071
Merge master
amanda11 Aug 11, 2020
5524784
Minor update to UT
amanda11 Aug 13, 2020
55b3ebc
Add mock query callback runner
amanda11 Aug 14, 2020
87b3c35
Amend so python 3 pick up mock runner and fix flake8 and UT error
amanda11 Aug 17, 2020
707d495
Add echo of pythonpath for investigation
amanda11 Aug 17, 2020
8c3db45
Add mock runner to python3.6
amanda11 Aug 17, 2020
d37418e
Updated travis install requirements
amanda11 Aug 17, 2020
cb501c6
Update CHANGELOG.rst
amanda11 Aug 17, 2020
a88e797
Merge branch 'master' into remove_mistral
arm4b Aug 18, 2020
049a559
Merge branch 'master' into remove_mistral
amanda11 Aug 26, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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