Backport windows/Deployers/Script
Appearance
(Redirected from SWAT deploys/Deployers/Script)
The following Bash script automates the steps in Backport windows/Deployers#SSH Connections and Error Logs: Set up before deploying:
function backport {
# open browser window
firefox \
https://wikitech.wikimedia.org/wiki/Backport_windows/Deployers \
https://logstash.wikimedia.org/app/dashboards#/view/mediawiki-errors \
https://logstash.wikimedia.org/app/dashboards#/view/mwdebug1002 \
https://integration.wikimedia.org/zuul/ \
https://versions.toolforge.org/ \
https://wikitech.wikimedia.org/wiki/Deployments#!/deploycal/current \
https://spiderpig.wikimedia.org/
# ensure the ssh key is in the agent and the ControlMaster connection (if any) is alive
ssh deployment.eqiad.wmnet true
# ensure the new tmux session will still be able to connect to the agent
# (in case the tmux server was started before the agent was set up)
tmux set-environment -g SSH_AUTH_SOCK "$SSH_AUTH_SOCK"
# set up the backport/config terminal window:
# logspam-watch
# deployment
gnome-terminal --maximize \
tmux \
new-session -s backport ssh mwlog1002.eqiad.wmnet \; \
split-window -v ssh deployment.eqiad.wmnet \; \
send-keys -t {top} "exec logspam-watch" Enter \; \
send-keys -t {bottom} "cd /srv/mediawiki-staging" Enter \; \
select-pane -t {bottom} \;
}
It will open a new Firefox window with some relevant tabs, and a GNOME Terminal window with two SSH sessions arranged like this:
| logspam-watch on mwlog1002, keep an eye on this |
deployment, run git fetch, scap sync-file etc. here
|