New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
st2 pack install/register is not usable in a HA setup #3191
Comments
Current recommend approach for multi node / HA setup is to do the following on each server where you want to run actions and sensors (aka where you want to deploy the packs):
|
Does "sudo st2ctl --register-setup-virtualenvs" also do a st2 pack register? That does not seems the case if I read st2ctl --help => "Create Python virtual environments for all the registered packs." I assume it also doesn't install pip dependencies? |
@pietervogelaar Sorry, forgot that step - you also need to run And All those commands are also designed to be idempotent so you can run them every time as part of your "deploy pack(s) to servers" flow. Will also update the comment above to reflect that. |
Okay, thanks for your help! I will change it and implement it this way. I think it would be valuable to make more notice of this in the documentation. |
One other question, at the moment I have the following code in Puppet to remove a pack:
Is there a better way? |
You are welcome. And yes, I will make sure this gets documented :) As far as removal goes - right now that's the best way to do it (you do need to run pack remove to make sure content gets removed / unregistered from the database). |
One addition, the command is The reload subcommand was missing. |
Yeah, sorry - will update the comment above and add missing "reload". |
I discovered that when a rule, trigger, action or workflow is removed from a git repository and is no longer on the disk of a stackstorm server, the command It would be very nice if there was a purge flag or something. Is there something available at the moment for this? |
No, I don't think there are any out of the box commands for this, apart from |
For now I will go with st2 pack remove, but this obviously has the downside that actions are not available for a short time. I created an issue for this #3313 |
I think one a good mid-term solution would be to add "--purge" or similar flag to This way it can be used in distributed / HA environment with the existing What do other people think? |
I found out that the "st2 pack remove" workaround is not really an option. It removes the pack from the database but also from disk. So the code below will result in a removed pack instead of a replaced pack:
|
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically marking is as stale. If this issue is not relevant or applicable anymore (problem has been fixed in a new version or similar), please close the issue or let us know so we can close it. On the contrary, if the issue is still relevant, there is nothing you need to do, but if you have any additional details or context which would help us when working on this issue, please include it as a comment to this issue. |
This is no longer the case. The new ha-setup is based on kubernetes and the installation of (custom) packs is described well. |
We just released v0.70.0 of our official stackstorm-ha helm chart (to run StackStorm in Kubernetes). This version makes it possible to use There are a few things mentioned in this issue that have not been implemented (like the Thanks! |
I have StackStorm running with a custom Puppet module in a High Available setup. Two identical nodes with all API's, packs etc.
However the st2 pack command is completely useless for this setup. What the command does is register some settings in the database and installs the pack on the disk of one of the nodes. And not even the node on which the command is run, but can happen on the OTHER node. Completely weird behaviour.
At the moment I have the following steps to workaround this:
It would be ideal if Puppet could run st2 pack install on each node and that each node would contain all the files that way.
The text was updated successfully, but these errors were encountered: