Created
June 22, 2020 22:03
-
-
Save mickmcgrath13/a337d87000079a1a09bc5415b1a0c4dd to your computer and use it in GitHub Desktop.
StackStorm - Update packs pack script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# back up the existing pack just in case | |
sudo mkdir /opt/stackstorm-temp-packs | |
sudo cp -rf /opt/stackstorm/packs/packs /opt/stackstorm-temp-packs | |
# get the latest pack (v3.2) | |
sudo mkdir /opt/st2-temp | |
# clone OS repo | |
sudo git clone --branch v3.2 https://github.com/StackStorm/st2.git /opt/st2-temp | |
# debug before | |
sudo cat /opt/stackstorm/packs/packs/pack.yaml | |
# copy new files | |
sudo cp -rf /opt/st2-temp/contrib/packs /opt/stackstorm/packs | |
# debug after | |
sudo cat /opt/stackstorm/packs/packs/pack.yaml | |
# register the pack | |
sudo st2 action execute packs.setup_virtualenv no_download=true packs="packs" | |
# wait 5s so prev job can finish | |
sleep 5 | |
sudo st2 action execute packs.load packs="packs" register="all" | |
# cleanup | |
sudo rm -rf /opt/st2-temp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment