|
|
(32 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| == moz-grid-config ==
| | Since November 2016, we are no longer actively using or maintaining a Selenium Grid instance. |
| moz-grid-config is a project for managing our Selenium infrastructure. It includes the latest version of Selenium that we're using, and a mechanism for starting the hub/nodes. You can find documentation on moz-grid-config at the [https://github.com/mozilla/moz-grid-config github project page].
| |
| | |
| == Selenium Grid Hub ==
| |
| The Selenium Grid hub is running on a VM in our data-center. For setup and administration see our [https://mana.mozilla.org/wiki/display/QA/selenium-hub1.qa.scl3.mozilla.com internal Mana page].
| |
| | |
| == Selenium Grid Nodes ==
| |
| We have several Mac minis running as Selenium nodes VMs running Windows nodes in our data-center.
| |
| | |
| === Mac OS X Nodes ===
| |
| * '''selenium'''.qa.mtv2.mozilla.com (10.252.73.143)
| |
| ** Mac OS X 10.10.4, 2.7 Ghz Intel Core i7; 8 GB
| |
| * '''selenium-5'''.qa.mtv2.mozilla.com (10.252.73.145)
| |
| ** Mac OS X 10.10.4, 2.66 GHz Intel Core 2 Duo; 8GB 1067 MHz DDR3
| |
| * '''selenium-7'''.qa.mtv2.mozilla.com (10.252.73.9)
| |
| ** Mac OS X 10.10.4, 2.5 GHz Intel Core i5; 4GB 1067 MHz DDR3
| |
| | |
| === Windows Nodes ===
| |
| * '''selenium1'''.qa.scl3.mozilla.com (10.22.73.149)
| |
| ** Windows 7, 8 GB RAM, 2 cores, 150GB disk
| |
| * '''selenium2'''.qa.scl3.mozilla.com (10.22.73.150)
| |
| ** Windows 7, 8 GB RAM, 2 cores, 150GB disk
| |
| * '''selenium3'''.qa.scl3.mozilla.com (10.22.73.151)
| |
| ** Windows 7, 8 GB RAM, 2 cores, 150GB disk
| |
| * '''selenium4'''.qa.scl3.mozilla.com (10.22.73.152)
| |
| ** Windows 7, 8 GB RAM, 2 cores, 150GB disk
| |
| * '''selenium5'''.qa.scl3.mozilla.com (10.22.73.153)
| |
| ** Windows 7, 8 GB RAM, 2 cores, 150GB disk
| |
| * '''selenium6'''.qa.scl3.mozilla.com (10.22.73.154)
| |
| ** Windows 7, 8 GB RAM, 2 cores, 150GB disk
| |
| * '''selenium-staging1'''.qa.scl3.mozilla.com (10.22.73.138)
| |
| ** Windows 7, 8 GB RAM, 2 cores, 150GB disk
| |
| | |
| === Starting Mac OS X Nodes ===
| |
| Connect to the appropriate machine, and execute the following from a terminal (you can use SSH or VNC):
| |
| | |
| cd ~/moz-grid-config
| |
| ant -Denv=production
| |
| | |
| The <code>-Denv</code> value can be either <code>production</code> or <code>staging</code>, and controls which Selenium hub the node connects to. Omitting this, or any other value will assume the hub is running on localhost.
| |
| | |
| === Starting Windows Nodes ===
| |
| We use the [http://msysgit.github.io msysgit] tool on Windows. Connect to the appropriate machine using Remote Desktop, start the MsysGit tool on the desktop, and run the following commands:
| |
| | |
| cd ~/moz-grid-config
| |
| ant -autoproxy -Denv=production
| |
| | |
| We need the <code>-autoproxy</code> helper because the these nodes run through a proxy.
| |
| | |
| The <code>-Denv</code> value can be either <code>production</code> or <code>staging</code>, and controls which Selenium hub the node connects to. Omitting this, or any other value will assume the hub is running on localhost.
| |
| | |
| === Stopping Nodes ===
| |
| Terminate the process using Ctrl+C.
| |
| | |
| == Adding a Browser ==
| |
| | |
| === Configuration ===
| |
| You will need to fork and clone from the [https://github.com/mozilla/moz-grid-config moz-grid-config github repository] and work on a new branch.
| |
| # Add the browser, alias, and path to <code>grid_configuration.yml</code>.
| |
| # Add the browser, binary and details to the JSON configuration files.
| |
| # Submit a pull request to the main GitHub repository from your branch.
| |
| | |
| === Hub/Nodes ===
| |
| # Prepare Jenkins for shutdown - this will allow all currently running jobs to finish, but will not start any new jobs.
| |
| # Once no jobs are running, stop the Selenium Grid hub
| |
| # Pull in the latest changes from moz-grid-config
| |
| # Start the Selenium Grid hub
| |
| # For each node:
| |
| ## Stop the Selenium server
| |
| ## Pull in the latest changes from moz-grid-config
| |
| ## Install the appropriate browser
| |
| ## Start the Selenium server
| |
| | |
| == Installing Firefox ==
| |
| * All new browsers should be installed with the version number in the path so that moz-grid-config can always find them.
| |
| * Install [http://pypi.python.org/pypi/mozdownload mozdownload] and [http://pypi.python.org/pypi/mozinstall mozinstall] using pip to download and install the Firefox binaries.
| |
| ** Use <code>--help</code> for both mozdownload and mozinstall to see all available options
| |
| ** To download the latest release using mozdownload you can simply use: <code>mozdownload -v latest</code>
| |
| ** To download the latest Firefox Nightly build using mozdownload you can use: <code>mozdownload -t daily --branch=mozilla-central</code>
| |
| ** To download the latest Firefox Aurora build using mozdownload you can use: <code>mozdownload -t daily --branch=mozilla-aurora</code>
| |
| ** Releases are also available to download manually [http://ftp.mozilla.org/pub/mozilla.org//firefox/releases/ here]
| |
| | |
| === Mac OS X ===
| |
| From a terminal:
| |
| | |
| mozdownload -v 37.0 -d firefox.dmg
| |
| mozinstall -d /tmp firefox.dmg
| |
| mv /tmp/Firefox.app/ "/Applications/Firefox 37.app/"
| |
| rm firefox.dmg
| |
| | |
| === Windows ===
| |
| From a command prompt:
| |
| | |
| mozdownload -v 37.0 -p win32 -d firefox.exe
| |
| mozinstall -d %TMP% firefox.exe
| |
| move %TMP%/firefox "\Program Files (x86)\Mozilla Firefox 37"
| |
| del firefox.exe
| |
| | |
| == Setting hostname on Mac OS X ==
| |
| Shamelessly copied from http://budporter.net/?p=47
| |
| | |
| If you are running a version of OSX prior to 10.5, then look in '''/etc/hostconfig''' for the '''HOSTNAME=''' parameter and set it to be the FQDN (Fully Qualified Domain Name) that you want to use. So, for host ''foo'' located in the domain ''bar.com'', the entry would be as follows:
| |
| | |
| HOSTNAME=foo.bar.com
| |
| | |
| For OSX 10.5, '''/etc/hostconfig''' is being deprecated. There are a couple of preferred methods to do this in 10.5:
| |
| | |
| sudo hostname -s foo.bar.com
| |
| | |
| or: | |
| | |
| sudo scutil –set HostName foo.bar.com
| |
| | |
| You can verify the change by issuing the following command:
| |
| | |
| hostname
| |
| | |
| The output will display the FQDN of the computer.
| |
| | |
| == Updating ==
| |
| Before updating the Grid we need to test locally with the latest Firefox and Selenium versions.
| |
| # You will need to fork and clone from the [https://github.com/mozilla/moz-grid-config moz-grid-config github repository] and work on a new branch (latest-version).
| |
| #* Install the latest Firefox version on your local machine
| |
| #* Change the Selenium version to be the latest (in <code>default.properties</code> file), then it will be downloaded automatically when starting the hub/node.
| |
| #* Update the JSON files for your operating system - add the latest browser, binary and details. (for both hub and nodes)
| |
| #* Update the Selenium client using <code>pip install -r requirements.txt</code>. Start the hub and node and start testing.
| |
| # After changes are merged into the main GitHub repository, move the main Grid to run on "latest-version" branch.
| |
| # Once testing on the main Grid instance is successful, merge the latest-version branch into master and switch back to the master branch on the hub and nodes.
| |