diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 4c674cf1..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,69 +0,0 @@ -version: 2.1 -jobs: - # Verify docker-compose.yml format for any immediate linting issues - docker-compose-lint: - docker: - - image: docker/compose:latest - steps: - - checkout - - run: - name: Docker-compose lint check - command: docker-compose config - - # Run docker-compose install and verify st2 deployment - docker-compose-up: - working_directory: ~/st2-docker - machine: - # Available images https://circleci.com/docs/2.0/configuration-reference/#available-machine-images - image: ubuntu-1604:201903-01 - steps: - - checkout - - run: - name: Pull Docker Images - command: docker-compose pull - - run: - name: Start st2 with docker-compose - command: docker-compose up --detach - - run: - name: Run st2 smoke-tests - command: | - sleep 60 - docker-compose -f tests/st2tests.yaml up - - run: - when: on_fail - name: Troubleshooting the build failure - command: | - docker-compose ps - # Display logs to help troubleshoot build failures, etc - docker-compose logs --tail="500" st2api - - -workflows: - version: 2 - docker-compose: - jobs: - - docker-compose-lint - - docker-compose-up: - requires: - - docker-compose-lint - - # Nightly run docker-compose install and ensure no regressions for st2 deployment in 'master' branch - docker-compose-nightly: - jobs: - - docker-compose-lint - - docker-compose-up: - requires: - - docker-compose-lint - triggers: - - schedule: - cron: "0 1 * * *" - filters: - branches: - only: - - master - -experimental: - notify: - branches: - only: - - master diff --git a/.github/workflows/st2-docker.yml b/.github/workflows/st2-docker.yml new file mode 100644 index 00000000..1c47c511 --- /dev/null +++ b/.github/workflows/st2-docker.yml @@ -0,0 +1,45 @@ +name: st2-docker + +on: + pull_request: + push: + branches: + - main + - master + schedule: + - cron: 0 1 * * * + workflow_dispatch: + +jobs: + docker-compose-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Docker-compose lint check + run: docker-compose config + + docker-compose-up: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Pull Docker Images + run: | + docker-compose pull + + - name: Start st2 with docker-compose + run: | + docker-compose up --detach + + - name: Run st2 smoke-tests + run: | + sleep 60 + docker-compose -f tests/st2tests.yaml up + + - name: Troubleshooting the build failure + if: ${{ failure() }} + run: | + docker-compose ps + # Display logs to help troubleshoot build failures, etc + docker-compose logs --tail="500" st2api diff --git a/README.md b/README.md index f0885a8f..53d23032 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # StackStorm in Docker Compose -[![Circle CI Build Status](https://circleci.com/gh/StackStorm/st2-docker/tree/master.svg?style=shield)](https://circleci.com/gh/StackStorm/st2-docker) + +[![CI Build Status](https://github.com/StackStorm/st2-docker/actions/workflows/st2-docker.yml/badge.svg)](https://github.com/StackStorm/st2-docker/actions/workflows/st2-docker.yml) This docker-compose is provided as a way to allow "get up and running" quickly with StackStorm using Docker (based on [st2-dockerfiles](https://github.com/stackstorm/st2-dockerfiles)). It is not designed to be used in production, but rather a way to test out StackStorm and facilitate pack development. > If you need Highly Availability experience, there is Kubernetes installation available via Helm charts at https://docs.stackstorm.com/install/k8s_ha.html. @@ -36,7 +37,7 @@ The image version, exposed ports, chatops, and "packs.dev" directory are configu The `files/htpasswd` file is provided with a default username of `st2admin` and a default password of `Ch@ngeMe`. This can be changed using the [htpasswd utility](https://httpd.apache.org/docs/2.4/programs/htpasswd.html). -Another file (`files/st2-cli.conf`) contains default credentials and is mounted into the "st2client" container. If you change credentials in htpasswd, you will probably want to change them in `st2-cli.conf`. +Another file (`files/st2-cli.conf`) contains default credentials and is mounted into the "st2client" container. If you change credentials in htpasswd, you will probably want to change them in `st2-cli.conf`. ### Further configuration @@ -69,7 +70,7 @@ restart your st2 stack. #### RBAC Configuration Starting with v3.4.0 RBAC is now included, but not enabled, by default. There are some default assignments, mappings, and roles -that ship with st2-docker. All the configuration files for RBAC are kept in `./files/rbac`. +that ship with st2-docker. All the configuration files for RBAC are kept in `./files/rbac`. Consult the [st2 RBAC documentation](https://docs.stackstorm.com/rbac.html) for further information. To enable RBAC you can edit st2.user.conf and add the following options: @@ -254,7 +255,7 @@ First, find the actual container name of st2api by running `docker-compose ps st ```shell $ docker-compose ps st2api - Name Command State Ports + Name Command State Ports -------------------------------------------------------------------- compose_st2api_1 /opt/stackstorm/st2/bin/st ... Up 9101/tcp ``` @@ -380,7 +381,7 @@ docker-compose down --remove-orphans -v # Testing -Testing st2-docker is now powered by [BATS](https://github.com/sstephenson/bats) Bash Automated Testing System. +Testing st2-docker is now powered by [BATS](https://github.com/sstephenson/bats) Bash Automated Testing System. A "sidecar" like container loads the BATS libraries and binaries into a st2client-like container to run the tests To run the tests