You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In docker-ized environment, there are some use cases that we would like to put all packs, configs and virtualenvs contents baked on the image. Usually st2ctl reload --register-setup-virtualenvs can be used to setup virtualenvs for packs, but this script cannot be used in docker build step because it requires connection to MongoDB and RabbitMQ which does not exist in the image build process.
It would be great if st2 could ship a similar script in /opt/stackstorm/st2/bin or somewhere appropriate.
Before I wrote this script, I've come up with a fairly quick solution that manually activates st2 virtualenv in the build step and then run pip install for each pack, but apparently there are some platform managed dependencies for all packes, so I thought it is better to follow more st2-ish way.
The text was updated successfully, but these errors were encountered:
At the moment it's not possible to st2 pack install during the Docker build stage, because it requires fully-ready st2 app with Mongo/Rabbitmq connections.
We'll need to take the following logic from the existing pack install fuctionality:
download pack in the 100% the same reproducible official way with:
version validation
settings in st2.conf, exchange index
pack versioning schema, git, from branch, multiple packs etc
setup virtualenv for those packs
It's OK to ship that as a standalone script with st2 core, re-using existing pack install primitives so it won't need Mongo/Rabbit.
Background
In docker-ized environment, there are some use cases that we would like to put all packs, configs and virtualenvs contents baked on the image. Usually
st2ctl reload --register-setup-virtualenvs
can be used to setup virtualenvs for packs, but this script cannot be used indocker build
step because it requires connection to MongoDB and RabbitMQ which does not exist in the image build process.Suggested solution
I've made a sample script:
https://github.com/shusugmt/st2-docker-pack-prebuild-example/blob/master/setup-pack-virtualenv.py
It would be great if st2 could ship a similar script in
/opt/stackstorm/st2/bin
or somewhere appropriate.Before I wrote this script, I've come up with a fairly quick solution that manually activates st2 virtualenv in the build step and then run
pip install
for each pack, but apparently there are some platform managed dependencies for all packes, so I thought it is better to follow more st2-ish way.The text was updated successfully, but these errors were encountered: