Actions as Code

Recently I have had the chance to play around with Stackstorm. We have been in need of such software for quite some team, but it seems it is quite difficult to find the right software for this.

To not lose focus and ask about the whole setup, I want to mainly focus on the Configuration as Code for actions.

Question: Where are Actions saved and can they automatically be saved as YAML files

I am wondering how other users are doing this as I think Configuration as Code with a containerized setup is pretty common these days.

Actions are code (is it python, bash script or any other programming language), while Workflows trying to operate these actions are stored as yaml.

All the automation artifacts like actions, workflows, rules, sensors you need forming the pack which you can save as git repository and then re-use, modify, version, distribute, install.

See documentation which covers your questions in more detail:

@armab Thanks for your response. This sounds very promising, but I am still not able to get this working.

To give a better context: I am trying to use the recentrly depreceated 1ppc (st2-docker/runtime/compose-1ppc at master · StackStorm/st2-docker · GitHub) docker stack. Trying to mount the necessary volumes as a server mount (for example /opt/stackstorm/packs), does not work and does not show any files in the mounted location.

I am not sure what direction Stackstorm recommends for the Docker stack now that there is a new community setup. Is it recommended to use GitHub - StackStorm/st2-dockerfiles: StackStorm Community Dockerfiles (one-service-per-container) used to build and push images to the StackStorm registry, used in 'stackstorm-ha' K8s Helm chart? And will the given scenario of mounting packs, actually work for showing the created actions as code?

Thanks for the help.

Hi @Nkmol, I think install it from scratch is better.
But it’s ok to test in stackstorm-dockerfiles, In the description it supports 3.1.0. I’ve tried 3.2dev and it also works.
The fastest way is to install from stackstorm-dockerfiles, change your py & yaml in and reload then test running flow/actions.
After that if you want to deploy the code to PROD with python 3.x support (stackstorm running with python 3 & your own packs running with python 3), it’s better to deploy on centos or ubuntu until the stackstorm-dockerfiles is updated in the future.
Also deploy with K8s helm chart in PROD is a good idea, it was constructed based on ubuntu with python 3. But that is a little complex for developer locally since you cannot just change your py and yaml then reload.