Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .circle/buildenv_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
44 changes: 0 additions & 44 deletions .circle/buildenv_mistral.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .circle/configure-postgres.sh

This file was deleted.

1 change: 0 additions & 1 deletion .circle/configure-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ cd $(dirname `readlink -f $0`)

set -x
sudo ./configure-rabbitmq.sh
sudo ./configure-postgres.sh
9 changes: 1 addition & 8 deletions .circle/docker-compose.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ set -e
# Source the build environment defintion (details in buildenv.sh)
. ~/.buildenv

# Used for `RABBITMQHOST` `POSTGRESHOST` `MONGODBHOST`, see docker-compose.override.yml
# Used for `RABBITMQHOST` `MONGODBHOST`, see docker-compose.override.yml
HOST_IP=$(ifconfig docker0 | grep 'inet addr' | awk -F: '{print $2}' | awk '{print $1}')

set -x
Expand All @@ -25,7 +25,6 @@ case "$1" in
-e ST2PKG_VERSION=${ST2PKG_VERSION} \
-e ST2PKG_RELEASE=${ST2PKG_RELEASE} \
-e RABBITMQHOST=${HOST_IP} \
-e POSTGRESHOST=${HOST_IP} \
-e MONGODBHOST=${HOST_IP} \
-e ST2_CIRCLE_URL=${CIRCLE_BUILD_URL} \
$2 /bin/true
Expand All @@ -37,12 +36,7 @@ case "$1" in
-e ST2_GITREV=${ST2_GITREV} \
-e ST2PKG_VERSION=${ST2PKG_VERSION} \
-e ST2PKG_RELEASE=${ST2PKG_RELEASE} \
-e ST2MISTRAL_GITURL=${ST2MISTRAL_GITURL} \
-e ST2MISTRAL_GITREV=${ST2MISTRAL_GITREV} \
-e MISTRAL_VERSION=${MISTRAL_VERSION} \
-e MISTRAL_RELEASE=${MISTRAL_RELEASE} \
-e RABBITMQHOST=${HOST_IP} \
-e POSTGRESHOST=${HOST_IP} \
-e MONGODBHOST=${HOST_IP} \
-e ST2_PACKAGES="${ST2_PACKAGES}" \
-e ST2_CIRCLE_URL=${CIRCLE_BUILD_URL} \
Expand All @@ -57,7 +51,6 @@ case "$1" in
-e ST2PKG_VERSION=${ST2PKG_VERSION} \
-e ST2PKG_RELEASE=${ST2PKG_RELEASE} \
-e RABBITMQHOST=${HOST_IP} \
-e POSTGRESHOST=${HOST_IP} \
-e MONGODBHOST=${HOST_IP} \
-e ST2_PACKAGES="${ST2_PACKAGES}" \
-e ST2_CIRCLE_URL=${CIRCLE_BUILD_URL} \
Expand Down
6 changes: 0 additions & 6 deletions .circle/docker-compose2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,6 @@ case "$1" in
-e ST2_GITDIR=${ST2_GITDIR} \
-e ST2PKG_VERSION=${ST2PKG_VERSION} \
-e ST2PKG_RELEASE=${ST2PKG_RELEASE} \
-e ST2MISTRAL_CHECKOUT=${ST2MISTRAL_CHECKOUT} \
-e ST2MISTRAL_GITURL=${ST2MISTRAL_GITURL} \
-e ST2MISTRAL_GITREV=${ST2MISTRAL_GITREV} \
-e ST2MISTRAL_GITDIR=${ST2MISTRAL_GITDIR} \
-e MISTRAL_VERSION=${MISTRAL_VERSION} \
-e MISTRAL_RELEASE=${MISTRAL_RELEASE} \
-e ST2_PACKAGES="${ST2_PACKAGES}" \
-e ST2_CIRCLE_URL=${CIRCLE_BUILD_URL} \
$2 build
Expand Down
4 changes: 1 addition & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

version: 2
jobs:
# Build & Test st2 & st2mistral packages
# Build & Test st2 packages
packages:
parallelism: 4
# 4CPUs & 8GB RAM CircleCI machine
Expand All @@ -24,7 +24,6 @@ jobs:
# with build parameters. st2cd prep tasks will uncomment these on a branch, and replace with proper
# gitrefs.
# ST2_GITREV: ""
# ST2MISTRAL_GITREV: ""
steps:
- checkout
- setup_remote_docker:
Expand All @@ -47,7 +46,6 @@ jobs:
command: |
set -x
.circle/buildenv_st2.sh
.circle/buildenv_mistral.sh
# Verify that Docker environment is properly cleaned up and there is nothing left from the previous build
# See issue: https://discuss.circleci.com/t/no-space-left-on-device-while-creating-mongo/11532/13
- run:
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ relevant information.

* [ ] Operating system: `uname -a`, `./etc/lsb_release` or `cat /etc/redhat-release`
* [ ] StackStorm version: `st2 --version`
* [ ] Actual package versions of all packages (st2, st2web, st2chatops, st2mistral, nginx, mongo, rabbitmq-server, postrgresql; Enterprise: st2flow, st2-auth-ldap)
* [ ] Actual package versions of all packages (st2, st2web, st2chatops, nginx, mongo, rabbitmq-server)
DEB: apt-cache policy ${PACKAGE_NAME} will give you the version of package.
RPM: yum info ${PACKAGE_NAME} will you give the version of package.
Note the exact name of mongo, nginx, rabbitmq and postgres changes based on OS.
Note the exact name of mongo, nginx, rabbitmq changes based on OS.
* [ ] Contents of /etc/st2/st2.conf
* [ ] Output of st2ctl status
* [ ] Optional - Details about target box. E.g. vagrant box link or AWS AMI link.
Expand Down
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Packages build environment is a *multi-container docker* application defined and
- **Packaging runner** (https://quay.io/stackstorm/packagingrunner) - the main entry point, package build and test processing controller container.
- **Packaging build** (https://hub.docker.com/r/stackstorm/packagingbuild/) - container where actual `.deb`/`.rpm` artifacts build takes place. It's used to bring up the build environment specific for OS distro. This means that different containers are available such as *packagingbuild:centos7*, *packagingbuild:xenial* correspondingly for CentOS 7 and Ubuntu Xenial.
- **Packaging test** (https://hub.docker.com/r/stackstorm/packagingtest/) - containers where built artifacts are tested, i.e. *artifacts are installed, configuration is written and tests are performed*.
- **Services** - these are different containers required for testing such as *rabbitmq, mongodb and postgresql*
- **Services** - these are different containers required for testing such as *rabbitmq and mongodb*

`Dockerfiles` sources are available at [StackStorm/st2-dockerfiles](https://github.com/stackstorm/st2-dockerfiles).

Expand All @@ -41,7 +41,6 @@ Execution takes a while, so grab a cup of tea or coffee and wait until it finish
```shell
ls -l1 | grep ".deb$"
-rw-r--r-- 1 root root 30872652 Feb 9 18:32 st2_1.4dev-1_amd64.deb
-rw-r--r-- 1 root root 31582068 Feb 9 18:32 st2mistral_1.3.0-1_amd64.deb
```

## Manual testing inside the docker environment
Expand Down Expand Up @@ -91,9 +90,7 @@ consider allowing the host to provide existing ST2 packages, and install/self-ch
Vagrant VM.

To specify the ST2 source URL and REV (i.e., branch), use `ST2_GITURL` and `ST2_GITREV` environment
variables on the host prior to provisioning the VM. Likewise, to specify the ST2 Mistral source URL
and REV, use `ST2MISTRAL_GITURL` and `ST2MISTRAL_GITREV` environment variables on the host prior to
provisioning the VM.
variables on the host prior to provisioning the VM.

Prior to running `st2-self-check`, the required auth token is generated using `st2 auth`. If necessary,
you can change the default username and password passed to `st2 auth`. To do this, set the `ST2USER`
Expand Down
4 changes: 1 addition & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
"ST2_TARGET" => "#{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
Expand Down
8 changes: 0 additions & 8 deletions docker-compose.circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 0 additions & 7 deletions docker-compose.circle2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ xenial:
- xenialtest
- rabbitmq
- mongodb
- postgres

bionic:
image: quay.io/stackstorm/packagingrunner
Expand All @@ -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
Expand All @@ -45,7 +40,6 @@ el8:
- centos8test
- rabbitmq
- mongodb
- postgres

el7:
image: quay.io/stackstorm/packagingrunner
Expand All @@ -60,7 +54,6 @@ el7:
- centos7test
- rabbitmq
- mongodb
- postgres

## Package build nodes
#
Expand Down
9 changes: 0 additions & 9 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand All @@ -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
10 changes: 0 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ xenial:
- xenialtest
- rabbitmq
- mongodb
- postgres

bionic:
image: quay.io/stackstorm/packagingrunner
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -65,7 +56,6 @@ el7:
- centos7test
- rabbitmq
- mongodb
- postgres

## Package build nodes
#
Expand Down
20 changes: 6 additions & 14 deletions packages/st2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand we'll need another PR in st2-packages, once the mistral removal happens in the st2 repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - it's a bit chicken and egg. It will still work when we take out mistral from contrib/runners in ST2 - but we should tidy up afterwards.
But this code can be used before and after the ST2 changes.

# 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__),")
Expand Down Expand Up @@ -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
Expand Down
Loading