Last active
October 21, 2021 13:34
-
-
Save michaelkarrer81/5417f30278b246b7e8e6a034add068f4 to your computer and use it in GitHub Desktop.
[Update instances.sh] #odoo #update #saltstack
This file contains hidden or 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
# Get a list of all instances of a server | |
grep -l /srv/saltstack/pillar/instances/*.sls -e 'online1' | awk '$0=$2' FS=_ RS=. ORS="," | |
grep -l /srv/saltstack/pillar/instances/*.sls -e 'online2' | awk '$0=$2' FS=_ RS=. ORS="," | |
grep -l /srv/saltstack/pillar/instances/*.sls -e 'online3' | awk '$0=$2' FS=_ RS=. ORS="," | |
grep -l /srv/saltstack/pillar/instances/*.sls -e 'online4' | awk '$0=$2' FS=_ RS=. ORS="," | |
# all instances | |
grep -l /srv/saltstack/pillar/instances/*.sls -e 'online*' | awk '$0=$2' FS=_ RS=. ORS="," | |
# Check Release Tag of Online Core | |
git -C /opt/online/online_o8r166 describe --tags --exact-match --match o8r* | |
# Check instance.ini | |
grep -H "core" /opt/online/*/instance.ini | |
# Check for failed Updates | |
grep -H "update_failed" /opt/online/*/status.ini | |
# Update instance.ini on githup and therefore trigger webhook | |
# ----------------------------------------------------------- | |
# online1 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r352 dadi,demo,aiat -u michaelkarrer81 | |
# online2 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r352 care,bsvw,kino,clic,pfot,bird,proj,gl2k -u michaelkarrer81 | |
# online3 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r352 hebe,hebr,hema,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,tral,hwno -u michaelkarrer81 | |
# online4 ATTENTION: Update to o8r306 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r352 kich,lhsa,lhwi,npha,nphc,otiv,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,diak,dev1,dev2 -u michaelkarrer81 | |
# UPDATE ALL | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r352 dadi,care,bsvw,kino,clic,pfot,bird,proj,gl2k,demo,aiat,hebe,hebr,hema,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,otiv,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,dev1,dev2,tral,vian,hwno -u michaelkarrer81 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r411 dadi -u michaelkarrer81 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r411 care,bsvw,kino,clic,pfot,bird,proj,gl2k,demo,aiat,hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,dev1,dev2,tral,hwno,vian,arno,cona,roki -u michaelkarrer81 | |
# Manually trigger an update in case something went wrong with the webhook | |
# ------------------------------------------------------------------------ | |
salt 'online1' state.sls webhooks.online_webhook_update pillar='{"instance_to_update": "dadi"}' | |
salt 'online1' state.sls webhooks.online_webhook_update pillar='{"instance_list_to_update": "dadi,demo,aiat"}' | |
# All | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r375 dadi,care,bsvw,kino,clic,pfot,bird,proj,gl2k,demo,aiat,hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,arno,tral,hwno -u michaelkarrer81 | |
# Without FS-Online enabled instances | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r334 dadi,bsvw,kino,demo,aiat,hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,dev1,dev2,hwno,vian -u michaelkarrer81 | |
# Manuall Trigger Update for all: | |
salt 'online*' state.sls webhooks.online_webhook_update pillar='{"instance_list_to_update": "dadi,care,bsvw,kino,clic,pfot,bird,proj,gl2k,demo,aiat,hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,dev1,dev2,tral,hwno,vian"}' | |
salt 'online*' state.sls webhooks.online_webhook_update pillar='{"instance_list_to_update": "dadi,care,bsvw,kino,clic,pfot,bird,proj,gl2k,demo,aiat,hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,tral,hwno,arno"}' | |
salt 'online1' state.sls webhooks.online_webhook_update pillar='{"instance_list_to_update": "dadi,demo,aiat"}' | |
salt 'online2' state.sls webhooks.online_webhook_update pillar='{"instance_list_to_update": "care,bsvw,kino,clic,pfot,bird,proj,gl2k"}' | |
salt 'online3' state.sls webhooks.online_webhook_update pillar='{"instance_list_to_update": "hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,tral,hwno"}' | |
salt 'online4' state.sls webhooks.online_webhook_update pillar='{"instance_list_to_update": "kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,diak,dev1,dev2"}' | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r391 dadi,care,bsvw,kino,clic,pfot,bird,proj,gl2k,demo,hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,dev1,dev2,tral,hwno,vian,arno,cona -u michaelkarrer81 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r435 dadi,care,bsvw,kino,clic,pfot,bird,proj,gl2k,demo,aiat,hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,dev1,dev2,tral,hwno,vian,arno,cona,roki -u michaelkarrer81 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r436 care,gl2k,pfot,roki,rnde,arno,bsvw,wsca,wrtv,tiqu,tral,wita,hebr -u michaelkarrer81 | |
/srv/saltstack/salt/tools/github/instance_update_helper.py o8r436 dadi,care,bsvw,kino,clic,pfot,bird,proj,gl2k,demo,aiat,hebe,hebr,rnga,tiqu,agpo,asbl,bsvs,bsvv,freu,ggla,kich,lhsa,lhwi,npha,nphc,rain,rnde,skit,wdcs,wrtv,khma,mpsa,msst,wsca,wita,rona,deve,diak,dev1,dev2,tral,hwno,vian,arno,cona,roki -u michaelkarrer81 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment