Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 1 | #!/bin/bash -xe |
Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 2 | |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 3 | SALT_OPTS="-l debug -t 10 --retcode-passthrough --no-color" |
| 4 | |
Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 5 | #aptly |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 6 | # FIXME: remove duplicate run after fix: PROD-21387 |
| 7 | # RC: aptly may fail to import gpg key's randomly(most probably,nw issue), so lets run it twice |
azvyagintsev | 0955f72 | 2018-07-13 21:01:19 +0300 | [diff] [blame] | 8 | salt-call ${SALT_OPTS} state.sls aptly.server || true |
| 9 | sleep 5 |
| 10 | salt-call ${SALT_OPTS} state.sls aptly.server |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 11 | salt-call ${SALT_OPTS} state.sls aptly.publisher |
azvyagintsev | 0955f72 | 2018-07-13 21:01:19 +0300 | [diff] [blame] | 12 | salt-call ${SALT_OPTS} state.sls aptly || true |
| 13 | sleep 5 |
| 14 | salt-call ${SALT_OPTS} state.sls aptly |
Richard Felkl | 4775790 | 2018-03-02 22:44:43 +0100 | [diff] [blame] | 15 | aptly_mirror_update.sh -sv |
azvyagintsev | 29410ee | 2018-07-12 20:02:30 +0300 | [diff] [blame] | 16 | aptly-publisher --url http://10.99.0.1:18084 --timeout=1200 publish -v -d -c /etc/aptly/publisher.yaml --architectures amd64 --recreate --force-overwrite |
Richard Felkl | 4775790 | 2018-03-02 22:44:43 +0100 | [diff] [blame] | 17 | |
| 18 | #docker registry |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 19 | salt-call ${SALT_OPTS} state.sls docker.client.registry |
| 20 | docker system prune --all --force || true |
Richard Felkl | 4775790 | 2018-03-02 22:44:43 +0100 | [diff] [blame] | 21 | |
| 22 | #debmirror |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 23 | salt-call ${SALT_OPTS} state.sls debmirror |
Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 24 | |
Richard Felkl | d59c565 | 2018-02-08 13:14:05 +0100 | [diff] [blame] | 25 | #git |
azvyagintsev | 41bc80d | 2018-07-12 13:46:56 +0300 | [diff] [blame] | 26 | salt-call ${SALT_OPTS} state.sls git.server |