Gbib release: Difference between revisions

From Genecats
Jump to navigationJump to search
(Created page with "== Executive summary for the buildmeister == ssh qateam@hgwdev boxBuildBetaAndZip == QA Overview == Hgwdev has Virtualbox installed and one virtual machine (VMs) added called "...")
 
 
(36 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Executive summary for the buildmeister ==
== Executive summary for the buildmeister ==


ssh qateam@hgwdev
run this command: buildGbibAndZip
boxBuildBetaAndZip


== QA Overview ==
== Buildmeister VM (the future public VM) ==
Hgwdev has Virtualbox installed and one virtual machine (VMs) added called "browserbox". It is the "master" image of the Gbib and used by QA.  
* the build account has a virtual machine (VMs) added called "browserbox". It is the "master" image of the Gbib and used by the buildmeister.
* aliases to start and stop his/her VM: boxStart and boxStop.
* browserbox listens at port 1234 for web requests and at 1235 for ssh.
* From hgwdev, the buildmeister can do "ssh box" to connect to the box (configured in .ssh/config). There is no password, because the buildmeister's ssh key was added to the box.


qateam has aliases to start and stop the VMs: boxStart / boxStop
== beta VM ==
* the qateam account has a VM called browserboxBeta. It is the beta testing VM and used by QA.
* qateam has aliases to start and stop their VM: boxBetaStart / boxBetaStop
* browserboxBeta listens at port 1236 for web requests and at 1237 for ssh.
* one needs to use an ssh tunnel into hgwdev to use the webserver on this VM
* For ssh access, from hgwdev, qateam can do "ssh boxBeta" to connect to the box (configured in .ssh/config). There is no password, because the qateam's ssh key was added to the box.


Once started on hgwdev, browserbox listens at port 1234 for web requests and at 1235 for ssh but is bound only to the localhost interface, so one needs to use an ssh tunnel to use the webservers on these two virtual machines.
== Development ==


== SSH into the box from hgwdev ==
see [[Gbib development]]. (Note that any gbib can be converted into a hgwdev-like machine for offline development, with gcc, emacs, etc on it and even access to /hive)
From hgwdev, as qateam, you can do "ssh box" to connect to the box (this is configured in .ssh/config).


There is no password, because the qateam ssh key was added to the box.
== Alpha testing ==


== Box release overview ==
Alpha binaries from hgwdev's /usr/local/apache/cgi-bin directory can be copied into any gbib with this command:
  updateBrowser hgwdev <yourhgwdevusername> alpha


* during beta testing time
A developer can also copy the binaries from their own sandbox, e.g. if user braney wants to test braney's binaries on his gbib
** The script "boxPrep beta" on hgwdev packs up a set of htdocs + CGIs for the boxes used by QA.
  updateBrowser hgwdev braney braney
** On the boxes used by QA that run on their own laptops, the command "updateBrowser beta" is used pull in the beta CGIs that were compiled by the buildmeister
If user max wants to test braney's binaries on his gbib
* at public release time, the box in this beta state is cleaned and zipped. This zip can be (optionally) tested on Windows or OSX. This can then be pushed to hgdownload.
  updateBrowser hgwdev max braney


For development see [[Gbib development]].
In both cases, you will need to type your hgwdev password three times (unless you've setup public ssh keys in your gbib).


== Setup http access for testing the box ==
Troubleshooting: If we suddenly updated a machine, you might have to update your known_hosts <code>sudo rm /root/.ssh/known_hosts</code>


To test the browserbox, one has to connect with http to it. Browserbox accepts only connections from hgwdev, not from outside. You cannot connect from your desktop machine directly. So ssh on your desktop has to be told to forward at least one port to hgwdev. To make this happen, add this to your file ~/.ssh/config (create it if necessary) on your own OSX or linux machine:
== Beta testing ==


  Host hgwdevtunnel
QA has three options:
  Hostname hgwdev.sdsc.edu
# QA can download the new ZIP created by the buildmeister and test on their own laptops (recommended)
  User <YOURHGWDEVUSER e.g. rhead>
# If QA still has an older gbib on their own laptop, the command "updateBrowser hgwdev <username> beta" can be used to pull in the beta CGIs that were compiled by the buildmeister
  #http
# QA can tunnel into hgwdev and use the browserboxBeta virtual machine there. See below how to tunnel into hgwdev.
  #using 4321 to avoid clashing with your locally running gbib
  LocalForward 127.0.0.1:4321 127.0.0.1:1234
  # RDP for box administrator 
  # LocalForward 127.0.0.1:3389 127.0.0.1:3389
  # the following line is only needed for developers
  # LocalForward 127.0.0.1:1236 127.0.0.1:1236
  # the following line is only needed for intensive cleaning of the box
  # LocalForward 127.0.0.1:3390 127.0.0.1:3390


You can then do a "ssh devtunnel" to get connected to hgwdev and have the port 4321 on your machine forwarded to the box through the ssh connection to port 1234 on the box. Port 1234 is a http port on the box, so you can then test the browserbox that runs on hgwdev by pointing your internet browser on your laptop/desktop to http://127.0.0.1:4321
See [[GBiB Testing]] for details on the QA GBiB testing procedures.


== Beta testing the box runningn on hgwdev ==
== Tunneling into hgwdev to use browserboxBeta ==


As qateam on hgwdev, prepare the cgi-bin-beta binaries, htdocs and additional "push" files for the box:
This is for beta testing, option 3 above: to use the browserboxBeta on hgwdev, one has to connect with http to it. BrowserboxBeta accepts only connections from hgwdev, not from outside. You cannot connect from your desktop machine directly. So ssh on your desktop has to be told to forward at least one port to hgwdev. To make this happen, add this to your file ~/.ssh/config (create it if necessary) on your own OSX or linux machine:
  boxPrepare beta


Then pull the cgi-bin-beta binaries into the box:
  Host hgwdevtunnel
 
  Hostname hgwdev.gi.ucsc.edu
   ssh box updateBrowser beta
   User <YOURHGWDEVUSER e.g. rhead>
 
  #using 4321 to avoid clashing with your locally running gbib
Setup the tunnel from your desktop to hgwdev:
   LocalForward 127.0.0.1:4321 127.0.0.1:1236
   ssh hgwdevtunnel
 
Now you can test the box via http://127.0.0.1:4321.
 
== Alpha testing ==
 
Testing during development time should usually not be needed, just like hgwdev tests.
 
There are two alpha versions: one is the normal alpha version, the CGIs on hgwdev. The other are the CGIs on the devbox. They are normally on alpha state, too, but might include a special bugfix or testing code.
 
To test alpha versions, the developer will prepare a package by running, as qateam:


  boxPrep alpha
You can then do a "ssh hgwdevtunnel" to get connected to hgwdev and have the port 4321 on your machine forwarded to the box through the ssh connection to port 1236 on the box. Port 1236 is a http port of the browserboxBeta VM, so you can then test the browserbox that runs on hgwdev by pointing your internet browser on your laptop/desktop to http://127.0.0.1:4321
or
  boxPrep devbox


Then, on the box, the developer or QA can pull these special CGIs by running:
You can test the browserbox that is running on your own laptop at the same time by going to http://127.0.0.1:1234
 
  updateBrowser alpha
or
  updateBrowser devbox


== Release ==
== Release ==


To prepare the box in its current state and the CGIs as they have been prepared by "boxPrep beta" on hgwdev for download, run this as qateam on hgwdev:
At the end of the beta week, the gbibBeta.zip can be copied into the store.  
  boxRelease.csh
 
This will ssh into the box, clean it (remove temp files, sessions, etc), stop it, zip it and place it onto hgwdev on http://hgwdev.soe.ucsc.edu/gbib/gbib.zip
 
The zipfile can be downloaded to OSX or Windows and possibly tested there again, with the slowNet command (necessary?).
 
At the end of the testing week (Friday?), the zipfile can be pushed to hgdownload.
 
At the next update of hgdownload, all boxes with activated auto-updates should update themselves automatically, see [[Gbib_auto_updates]].
 
== intensive box cleaning  (optional) ==


Each time a new file is created on the box, the virtual disk file gets filled with the data, even if the file is deleted. The browserbox zipfile will therefore grow. If the zipfile is getting very big, it might be good to overwrite the empty space on the virtual disk with zeros.
All Gbibs will update themselves when they start, as hgdownload will have been updated since the build happened.


To do this, install an RDP client on your OSX machine (Microsoft RDP client for OSX, in the app store, free), uncomment the RDP 3389 port forward in your .ssh/config and do an "ssh hgwdevtunnel" your desktop.
At the every update of hgdownload which happens over the weekends, all boxes with activated auto-updates should update themselves automatically, see [[Gbib_auto_updates]].


Start your RDP client, connect to localhost. You should see the console of the browserbox. Type:
== Release config changes to GbIb ==


  sudo reboot
* change a file, like hg.conf, updateBrowser.sh, ~/.bashrc or anything else in your own GBIB and test it.
* if it's the updateBrowser.sh script, scp it to hgwdev:/usr/local/apache/htdocs/gbib/updateBrowser.sh. If it's any other file, scp it to the correct subdirectory under hgwdev:/usr/local/apache/htdocs/gbib/push. The push/ directory is rsynced into the box's root directory, so the path in there has to correspond to the path in the GBIB.
* do a <code>updateBrowser.sh hgwdev <yourHgwdevUsername> alpha</code> on your own GBIB and type your password three times to try an auto-update on your own GBIB from the CGIs and other files on hgwdev (the data will come from hgdownload. This is because we have no alpha version of hgdownload.)
* do not forget to also scp the file that you changed into the kent repo, e.g. for the update script, scp to hgwdev.gi.ucsc.edu:kent/src/browserbox/root/updateBrowser.sh (this will not affect the push, it's only so we can keep track of the changes with git commits and they get reviewed)
* if everything is still working, notify the gbib buildmeister of the change. Depending on what you changed, request a push of either hgwdev:/usr/local/apache/htdocs/gbib/push or hgwdev:/usr/local/apache/htdocs/gbib/updateBrowser.sh to hgdownload:admin/gbib/push or hgdownload:admin/gbib/updateBrowser.sh.
* timing of the push:
** many changes don't depend on the CGI version or the data version, so you can push them at any time. Most GBIBs will pick them up on the next Sunday night.
** depending on the change, the timing can be important, as all gbibs on auto-update mode will update themselves with new CGIs and the new data tables when Jorge's scripts update hgdownload which usually happens on Sunday night. Your changes to the push/ directory or the update script will get copied into the gbibs at this time. For for CGI-dependent changes, it's best to do the push to hgdownload after the release (of course) but before the next Sunday 


* Keep shift pressed while the box is rebooting.
==Troubleshooting==
* Select the Recovery mode, type "enter".
If we upgrade a machine, like hgwdev, you'll need to update the known_hosts for your GBiB:
* Type "r" to select "root". Type "enter".
<pre>sudo rm /root/.ssh/known_hosts</pre>
* Password is "browser".
* Run the script "./zeroVm.sh". run "sudo reboot".


[[Category:GBiB]]
[[Category:GBiB]]
[[Category:Browser QA]]
[[Category:Browser QA]]
[[Category:Browser Development]]
[[Category:Browser Development]]

Latest revision as of 22:21, 2 August 2019

Executive summary for the buildmeister

run this command: buildGbibAndZip

Buildmeister VM (the future public VM)

  • the build account has a virtual machine (VMs) added called "browserbox". It is the "master" image of the Gbib and used by the buildmeister.
  • aliases to start and stop his/her VM: boxStart and boxStop.
  • browserbox listens at port 1234 for web requests and at 1235 for ssh.
  • From hgwdev, the buildmeister can do "ssh box" to connect to the box (configured in .ssh/config). There is no password, because the buildmeister's ssh key was added to the box.

beta VM

  • the qateam account has a VM called browserboxBeta. It is the beta testing VM and used by QA.
  • qateam has aliases to start and stop their VM: boxBetaStart / boxBetaStop
  • browserboxBeta listens at port 1236 for web requests and at 1237 for ssh.
  • one needs to use an ssh tunnel into hgwdev to use the webserver on this VM
  • For ssh access, from hgwdev, qateam can do "ssh boxBeta" to connect to the box (configured in .ssh/config). There is no password, because the qateam's ssh key was added to the box.

Development

see Gbib development. (Note that any gbib can be converted into a hgwdev-like machine for offline development, with gcc, emacs, etc on it and even access to /hive)

Alpha testing

Alpha binaries from hgwdev's /usr/local/apache/cgi-bin directory can be copied into any gbib with this command:

 updateBrowser hgwdev <yourhgwdevusername> alpha

A developer can also copy the binaries from their own sandbox, e.g. if user braney wants to test braney's binaries on his gbib

 updateBrowser hgwdev braney braney

If user max wants to test braney's binaries on his gbib

 updateBrowser hgwdev max braney

In both cases, you will need to type your hgwdev password three times (unless you've setup public ssh keys in your gbib).

Troubleshooting: If we suddenly updated a machine, you might have to update your known_hosts sudo rm /root/.ssh/known_hosts

Beta testing

QA has three options:

  1. QA can download the new ZIP created by the buildmeister and test on their own laptops (recommended)
  2. If QA still has an older gbib on their own laptop, the command "updateBrowser hgwdev <username> beta" can be used to pull in the beta CGIs that were compiled by the buildmeister
  3. QA can tunnel into hgwdev and use the browserboxBeta virtual machine there. See below how to tunnel into hgwdev.

See GBiB Testing for details on the QA GBiB testing procedures.

Tunneling into hgwdev to use browserboxBeta

This is for beta testing, option 3 above: to use the browserboxBeta on hgwdev, one has to connect with http to it. BrowserboxBeta accepts only connections from hgwdev, not from outside. You cannot connect from your desktop machine directly. So ssh on your desktop has to be told to forward at least one port to hgwdev. To make this happen, add this to your file ~/.ssh/config (create it if necessary) on your own OSX or linux machine:

 Host hgwdevtunnel
 Hostname hgwdev.gi.ucsc.edu
 User <YOURHGWDEVUSER e.g. rhead>
 #using 4321 to avoid clashing with your locally running gbib
 LocalForward 127.0.0.1:4321 127.0.0.1:1236

You can then do a "ssh hgwdevtunnel" to get connected to hgwdev and have the port 4321 on your machine forwarded to the box through the ssh connection to port 1236 on the box. Port 1236 is a http port of the browserboxBeta VM, so you can then test the browserbox that runs on hgwdev by pointing your internet browser on your laptop/desktop to http://127.0.0.1:4321

You can test the browserbox that is running on your own laptop at the same time by going to http://127.0.0.1:1234

Release

At the end of the beta week, the gbibBeta.zip can be copied into the store.

All Gbibs will update themselves when they start, as hgdownload will have been updated since the build happened.

At the every update of hgdownload which happens over the weekends, all boxes with activated auto-updates should update themselves automatically, see Gbib_auto_updates.

Release config changes to GbIb

  • change a file, like hg.conf, updateBrowser.sh, ~/.bashrc or anything else in your own GBIB and test it.
  • if it's the updateBrowser.sh script, scp it to hgwdev:/usr/local/apache/htdocs/gbib/updateBrowser.sh. If it's any other file, scp it to the correct subdirectory under hgwdev:/usr/local/apache/htdocs/gbib/push. The push/ directory is rsynced into the box's root directory, so the path in there has to correspond to the path in the GBIB.
  • do a updateBrowser.sh hgwdev <yourHgwdevUsername> alpha on your own GBIB and type your password three times to try an auto-update on your own GBIB from the CGIs and other files on hgwdev (the data will come from hgdownload. This is because we have no alpha version of hgdownload.)
  • do not forget to also scp the file that you changed into the kent repo, e.g. for the update script, scp to hgwdev.gi.ucsc.edu:kent/src/browserbox/root/updateBrowser.sh (this will not affect the push, it's only so we can keep track of the changes with git commits and they get reviewed)
  • if everything is still working, notify the gbib buildmeister of the change. Depending on what you changed, request a push of either hgwdev:/usr/local/apache/htdocs/gbib/push or hgwdev:/usr/local/apache/htdocs/gbib/updateBrowser.sh to hgdownload:admin/gbib/push or hgdownload:admin/gbib/updateBrowser.sh.
  • timing of the push:
    • many changes don't depend on the CGI version or the data version, so you can push them at any time. Most GBIBs will pick them up on the next Sunday night.
    • depending on the change, the timing can be important, as all gbibs on auto-update mode will update themselves with new CGIs and the new data tables when Jorge's scripts update hgdownload which usually happens on Sunday night. Your changes to the push/ directory or the update script will get copied into the gbibs at this time. For for CGI-dependent changes, it's best to do the push to hgdownload after the release (of course) but before the next Sunday

Troubleshooting

If we upgrade a machine, like hgwdev, you'll need to update the known_hosts for your GBiB:

sudo rm /root/.ssh/known_hosts