{"id":19601477,"url":"https://github.com/stackstorm/st2-packages","last_synced_at":"2025-09-24T17:26:13.914Z","repository":{"id":34241811,"uuid":"38112294","full_name":"StackStorm/st2-packages","owner":"StackStorm","description":"StackStorm deb/rpm packages (automated docker build pipeline)","archived":false,"fork":false,"pushed_at":"2025-02-08T07:48:45.000Z","size":2375,"stargazers_count":28,"open_issues_count":35,"forks_count":61,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-02T07:07:36.710Z","etag":null,"topics":["circleci","deb","docker","docker-compose","rhel8","rhel9","rpm","st2","stackstorm","ubuntu2004","ubuntu2204"],"latest_commit_sha":null,"homepage":"https://stackstorm.com/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StackStorm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"community_bridge":"stackstorm"}},"created_at":"2015-06-26T13:20:51.000Z","updated_at":"2025-02-08T07:48:50.000Z","dependencies_parsed_at":"2023-11-07T01:08:21.662Z","dependency_job_id":"12529e8d-5ddc-418a-845e-50f175f664fa","html_url":"https://github.com/StackStorm/st2-packages","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fst2-packages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fst2-packages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fst2-packages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StackStorm%2Fst2-packages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StackStorm","download_url":"https://codeload.github.com/StackStorm/st2-packages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247999859,"owners_count":21031046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["circleci","deb","docker","docker-compose","rhel8","rhel9","rpm","st2","stackstorm","ubuntu2004","ubuntu2204"],"created_at":"2024-11-11T09:18:35.119Z","updated_at":"2025-09-24T17:26:08.857Z","avatar_url":"https://github.com/StackStorm.png","language":"Shell","readme":"# Stackstorm packages build environment\n\n[![Circle CI Build Status](https://circleci.com/gh/StackStorm/st2-packages/tree/master.svg?style=shield)](https://circleci.com/gh/StackStorm/st2-packages)\n[![Go to Docker Hub](https://img.shields.io/badge/Docker%20Hub-%E2%86%92-blue.svg)](https://hub.docker.com/r/stackstorm/)\n[![Download deb/rpm](https://img.shields.io/badge/Download-deb/rpm-blue.svg)](https://packagecloud.io/StackStorm/)\n\n## Highlights\n\n - **Docker based**. Leveraging docker it's possible to deliver packages for any OS distro in a fast and reliable way.  *Use the latest Docker version with a Docker Compose plugin that supports V2 syntax.*\n - [Rake](https://github.com/ruby/rake) + [sshkit](https://github.com/capistrano/sshkit)-based execution enables easy configuration via **simple DSL** and brings **parallel task processing** out of the box.\n - **Test-driven workflow**. Artifacts built are not only available for any enabled OS distro but at the same time tested on a bunch of platforms, providing feedback such as can be installed, services can start up, operations can be executed etc.\n\n## Overview\n\nPackages build environment is a _multi-container docker_ application defined and managed with [docker-compose](https://github.com/docker/compose). It consists of four types of containers:\n\n- **Packaging runner** (https://quay.io/stackstorm/packagingrunner) - the main entry point, package build and test processing controller container.\n- **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:rocky8_, _packagingbuild:focal_, _packagingbuild:jammy_,  correspondingly for RockyLinux 8, Ubuntu Focal, and Ubuntu Jammy.\n- **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_.\n- **Services** - these are different containers required for testing such as _rabbitmq and mongodb_\n\n`Dockerfiles` sources are available at [StackStorm/st2-dockerfiles](https://github.com/stackstorm/st2-dockerfiles).\n\nThe Packages build environment compose application brings a self-sufficient pipeline to deliver ready to use packages.\n\n# Usage\n\nIt's very simple to invoke the whole build-test pipeline. First just make sure that [docker-compose.yml](docker-compose.yml) has your distro specification, after that issue the following commands:\n\n```shell\n# (Optional) First clean out previous build containers\ndocker compose kill\ndocker compose rm -f\n\n# To build packages for ubuntu focal (--rm will wipe packaging runner container. All others will remain active).\ndocker compose run --rm focal\n```\n\nExecution takes a while, so grab a cup of tea or coffee and wait until it finishes. When build and test processes succeed, you'll find the StackStorm packages in `/tmp/st2-packages` on your host machine:\n\n```shell\nls -l1 | grep \".deb$\"\n-rw-r--r-- 1 root root 30872652 Feb  9 18:32 st2_1.4dev-1_amd64.deb\n```\n\n## Manual testing inside the docker environment\n\nAfter the build and test stages are finished all docker containers remain active, so you are welcome to do more in-depth testing if desired. To do so simply run:\n\n```shell\ndocker ps\n# Find the required testing container\n# In our case it will be st2packages_jammytest_1\n\n# Simply exec to docker\ndocker exec -it st2packages_jammytest_1 bash\n```\n\nOnce done, you are inside the testing environment where all services are up and running. Don't forget to do (after exec):\n\n```shell\nexport TERM=xterm\n```\n\nAt this point you can do any manual testing which is required.\n\n# Vagrant based build and test\n\nIn order to build, package, install and test ST2 in an isolated Vagrant VM, run the following:\n\n```shell\nvagrant up $TARGET\n```\n\nWhere `$TARGET` is one of `focal`, `jammy`, `el8` or `el9`. If you are using `el8`, comment\nout the `vm_config.vm.provision :docker` line in the Vagrantfile. There is logic in `setup-vagrant.sh`\nto install docker in `el8`.\n\nThe following steps are run while provisioning the Vagrant VM:\n\n1. Install `docker` that includes `docker compose` V2.\n2. Run `docker compose run --rm $TARGET` to build, test and package ST2 as described in prior\n   sections.\n3. Install the packages built in step 2, unless the host `$ST2_INSTALL` environment variable is set to\n   a value other than `yes`.\n4. Execute the `st2-self-check` script, unless the host `$ST2_VERIFY` environment variable is set to\n   a value other than `yes`.\n\nAs currently implemented, it is not possible to bypass steps 1 and 2. In the future, we may want to\nconsider allowing the host to provide existing ST2 packages, and install/self-check those in the\nVagrant VM.\n\nTo specify the ST2 source URL and REV (i.e., branch), use `ST2_GITURL` and `ST2_GITREV` environment\nvariables on the host prior to provisioning the VM.\n\nPrior to running `st2-self-check`, the required auth token is generated using `st2 auth`. If necessary,\nyou can change the default username and password passed to `st2 auth`. To do this, set the `ST2USER`\nand `ST2PASSWORD` environment variables on the host prior to provisioning the VM. The default values\nare `st2admin` and `Ch@ngeMe` respectively.\n\n# Installation\n\nCurrent community packages are hosted on https://packagecloud.io/StackStorm. For detailed instructions how install st2 and perform basic configuration follow these instructions:\n\n- [Ubuntu/Debian](https://docs.stackstorm.com/install/deb.html)\n- [RHEL8/RockyLinux8](https://docs.stackstorm.com/install/rhel8.html)\n\n## Adding Support For a New Distribution\n\nIf you are adding support for a new distribution for which `packagingbuild` and `packagingtest`\nimages are not yet published to Docker Hub and you want to test the build pipeline locally, you\nneed to update `docker-compose.yml` file to use locally built Docker images.\n\nFor example:\n\n```yaml\nservices:\n  ...\n  jammy:\n    ...\n    image: quay.io/stackstorm/packagingrunner\n    ...\n  ...\n  jammybuild:\n    ...\n    image: jammybuild\n    ...\n  ...\n  jammytest:\n    ...\n    image: jammytest\n    ...\n```\n\nNOTE: Main ``distro`` definition (e.g. ``focal``, ``el8`` etc.) needs to use packaging runner image.\n\nAs you can see, `image` attribute references local image tagged `jammybuild` instead of a\nremote image (e.g. `stackstorm/packagingbuild:jammy` or similar).\n\nBefore that will work, you of course also need to build those images locally.\n\nFor example:\n\n```bash\ncd ~/st2packaging-dockerfiles/packagingbuild/jammy\ndocker build -t jammybuild .\n\ncd ~/st2packaging-dockerfiles/packagingtest/jammy/systemd\ndocker build -t jammytest .\n```\n\n# License and Authors\n\n- Author:: StackStorm (st2-dev) (\u003cinfo@stackstorm.com\u003e)\n- Author:: Denis Baryshev (\u003cdennybaa@gmail.com\u003e)\n","funding_links":["https://funding.communitybridge.org/projects/stackstorm"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackstorm%2Fst2-packages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackstorm%2Fst2-packages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackstorm%2Fst2-packages/lists"}