Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run promoter sequancially between releases
Simplify the promoter removing the lock and running it sequencially one release after another. It also start it up as a systemd service unit. Change-Id: I5ac9daed9ed4a3957b8761bd05b647fb0244dc84
- Loading branch information
Showing
5 changed files
with
85 additions
and
28 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash -x | ||
|
||
#Activate virtualenv | ||
source ~/promoter_venv/bin/activate | ||
|
||
while true; do | ||
|
||
#fetch the latest ci-config | ||
cd ~/ci-config; git pull >/dev/null | ||
|
||
#fetch the latest dlrnapi_client and dependencies | ||
pip install -U -r ~/ci-config/ci-scripts/dlrnapi_promoter/requirements.txt | ||
|
||
# Source secrets | ||
source ~/registry_secret | ||
source ~/dlrnapi_secret | ||
|
||
# promoter script for the master branch | ||
/usr/bin/timeout --preserve-status -k 120m 115m python ~/ci-config/ci-scripts/dlrnapi_promoter/dlrnapi_promoter.py ~/ci-config/ci-scripts/dlrnapi_promoter/config/master.ini | ||
|
||
# promoter script for the pike branch | ||
/usr/bin/timeout --preserve-status -k 120m 115m python ~/ci-config/ci-scripts/dlrnapi_promoter/dlrnapi_promoter.py ~/ci-config/ci-scripts/dlrnapi_promoter/config/pike.ini | ||
|
||
# promoter script for the ocata branch | ||
/usr/bin/timeout --preserve-status -k 120m 115m python ~/ci-config/ci-scripts/dlrnapi_promoter/dlrnapi_promoter.py ~/ci-config/ci-scripts/dlrnapi_promoter/config/ocata.ini | ||
|
||
# promoter script for the queens branch | ||
/usr/bin/timeout --preserve-status -k 120m 115m python ~/ci-config/ci-scripts/dlrnapi_promoter/dlrnapi_promoter.py ~/ci-config/ci-scripts/dlrnapi_promoter/config/queens.ini | ||
|
||
# Sleep 10 minutes | ||
sleep 600 | ||
done |
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
9 changes: 9 additions & 0 deletions
9
ci-scripts/infra-setup/roles/promoter/files/dlrn-promoter.service
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[Unit] | ||
Description=Tripleo CI DLRN promoter | ||
Requires=network.target | ||
After=syslog.target network.target | ||
|
||
[Service] | ||
ExecStart=/home/centos/ci-config/ci-scripts/dlrnapi_promoter/dlrn-promoter.sh | ||
User=centos | ||
Restart=always |
8 changes: 8 additions & 0 deletions
8
ci-scripts/infra-setup/roles/promoter/files/dlrn-promoter.telegraf.conf
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[[inputs.procstat]] | ||
pattern = "^python.*dlrnapi_promoter.py .*master.*" | ||
[[inputs.procstat]] | ||
pattern = "^python.*dlrnapi_promoter.py .*queens.*" | ||
[[inputs.procstat]] | ||
pattern = "^python.*dlrnapi_promoter.py .*pike.*" | ||
[[inputs.procstat]] | ||
pattern = "^python.*dlrnapi_promoter.py .*ocata.*" |
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