Wikimedia Cloud Services team/Onboarding Hieu/Sessions

Access to bastion-restricted.wmflabs.org
To get access to bastion-restricted.wmflabs.org, you need to be added to the bastion project in Openstack

ssh cloudcontrol1004.wikimedia.org sudo wmcs-openstack role add --user --project bastion user

Also ensure that your public key is added to https://wikitech.wikimedia.org/wiki/Special:Preferences#mw-prefsection-openstack

Using cumin to update tool-worker nodes
In this example, we are updating prometheus-node-exporter on servers tools-worker-1030 to tools-worker-1040

First we, login to the puppet master server

ssh labpuppetmaster1001.wikimedia.org

Confirm that it's the older version sudo cumin "O{project:tools name:^tools-worker-10[34].*}" "apt-cache policy prometheus-node-exporter"

Run in simulation mode

sudo cumin "O{project:tools name:^tools-worker-10[34].*}" "apt-get install prometheus-node-exporter -s"

Invoke the package update

sudo cumin "O{project:tools name:^tools-worker-10[34].*}" "apt-get install prometheus-node-exporter"

Confirm that it's now the newer version sudo cumin "O{project:tools name:^tools-worker-10[34].*}" "apt-cache policy prometheus-node-exporter"

We must log our actions in the Server Admin Log, so others are aware of our operations in the #wikimedia-cloud channel, type the following in the IRC channel

!log tools updated prometheus-node-exporter from 0.14.0~git20170523-1 to 0.17.0+ds-3 in tools-worker-[1030-1040] nodes (T230147)

Git-Review
Install git-review on Mac sudo easy_install pip sudo pip install -U setuptools pip install --user git-review export PATH=$PATH:$HOME/Library/Python/2.7/bin
 * 1) download and install git-review plugin

For example. let's update the operations/puppet project

git clone "ssh:// @gerrit.wikimedia.org:29418/operations/puppet" && scp -p -P 29418 @gerrit.wikimedia.org:hooks/commit-msg "puppet/.git/hooks/" git config --global --add gitreview.username " " git config --global --add gitreview.email " @wikimedia.org" git review -s
 * 1) https://gerrit.wikimedia.org/r/admin/projects/operations/puppet

Make the change. When you're ready, run:

git commit -a git review

In case you need to modify the original comment (this is also possible if you do it through Gerrit)

git commit --amend git review

To update your email

git commit --amend --reset-author

An example commit message (note the format) This commit marks as absent and adds  as replacement

Bug: T123456 Change-Id: 

When you are ready to commit, login to puppetmaster1001.eqiad.wmnet and run

sudo puppet-merge