You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

Portal:Cloud VPS/Admin/Horizon

From Wikitech-static
Jump to navigation Jump to search

deploying updates to Horizon

Horizon is deployed using scap3 using a release branch that corresponds to OpenStack upstream release branches. Horizon is generally backwards-compatible with older OpenStack APIs, so its release cadence does not need to be perfectly in sync with the rest of Cloud-VPS; generally Horizon is several releases newer.

To upgrade to a new branch:

  • TODO

Refreshing upstream code base

On your local development system clone the WMCS and upstream git repositories

$ git clone "ssh://<username>@gerrit.wikimedia.org:29418/openstack/horizon/designate-dashboard" && \
  scp -p -P 29418 <username>@gerrit.wikimedia.org:hooks/commit-msg "designate-dashboard/.git/hooks/"

$ cd designate-dashboard

$ git remote add upstream https://opendev.org/openstack/designate-dashboard.git

$ git checkout -b train origin/train

$ git pull upstream stable/train --rebase --stat

If there are no conflicts you can rebase the upstream changes on top of any local customizations

$ git rebase origin/train

Requires the labs-striker group https://gerrit.wikimedia.org/r/admin/groups/3db64b50b88a848f800e95c946fab6a84b8fec2b

$ git push origin HEAD:refs/for/train%topic=upstream_refresh

Deploying to production

To apply a specific patch:

  • Apply patch to the master branch of <submodule>
  • Cherry-pick that patch to <release branch> (e.g. 'train') of <submodule> and merge
  • make a submodule update patch on <release branch> in openstack/horizon/deploy and merge
  • log into a deploy server (currently deploy1002.eqiad.wmnet)

Example process

On your local development system clone Horizon deploy git repository

$ git clone "ssh://<username>@gerrit.wikimedia.org:29418/openstack/horizon/deploy" && \
  scp -p -P 29418 <username>@gerrit.wikimedia.org:hooks/commit-msg "deploy/.git/hooks/"

$ cd deploy

$ git checkout -b train origin/train

$ git submodule update --init

$ cd designate-dashboard

$ git pull origin train

$ cd ..

$ git add designate-dashboard

$ git commit

$ git push origin HEAD:refs/for/train

Deploy the changes using scap

$ ssh deploy1002.eqiad.wmnet

$ cd /srv/deployment/horizon/deploy/

$ git fetch

$ git rebase

$ scap deploy "update horizon designate-dashboard submodule"
15:57:55 Started deploy [horizon/deploy@ad60c2b]
15:57:55 Deploying Rev: HEAD = ad60c2b0f954e0be7b37b3bb3f5f57754340f4fe
15:57:56 Started deploy [horizon/deploy@ad60c2b]: update horizon designate-dashboard submodule
15:57:56 
== DEFAULT ==
:* labweb1002.wikimedia.org
:* labweb1001.wikimedia.org
horizon/deploy: fetch stage(s): 100% (ok: 2; fail: 0; left: 0)                  
horizon/deploy: config_deploy stage(s): 100% (ok: 2; fail: 0; left: 0)          
horizon/deploy: promote and restart_service stage(s): 100% (ok: 2; fail: 0; left: 0)
16:01:24 
== DEFAULT ==
:* labweb1002.wikimedia.org
:* labweb1001.wikimedia.org
horizon/deploy: finalize stage(s): 100% (ok: 2; fail: 0; left: 0)               
16:01:27 Finished deploy [horizon/deploy@ad60c2b]: update horizon designate-dashboard submodule (duration: 03m 31s)
16:01:27 Finished deploy [horizon/deploy@ad60c2b] (duration: 03m 31s)