ReleaseEngineering/How To/Self Provision a TaskCluster Windows Instance

From MozillaWiki
Jump to: navigation, search

For generic-worker 10.5.0 onwards

Integration with taskcluster one-click loaner workflow will be done in bug 1368961.

1) If you are connecting to a hardware worker in our data center (provisionerId: "releng-hardware") such as a MoonShot machine, make sure to announce in #ci and/or create a bug under CiDuty - Buzilla announcing the fact that you will take a loaner.

2) Find a the task you want to play with in treeherder, and follow the link to the Taskcluster Task Inspector.
3) Go to Actions -> Edit Task.
4) Add rdpInfo to the payload section:

  rdpInfo: 'login-identity/<login-identity>/rdpinfo.txt'

For example:

  rdpInfo: 'login-identity/mozilla-auth0/ad|Mozilla-LDAP|pmoore/rdpinfo.txt'

(check to see what your login identity is, e.g. you should have the scope assume:login-identity:<login-identity>).

4) Check which workerType the task uses from the task definition, and then add the following scope to the list of task scopes:

  - 'generic-worker:allow-rdp:gecko-t/<workerType>'

For example:

  - 'generic-worker:allow-rdp:gecko-t/t-win7-32-gpu'

5) If you will require administrator privileges:

5.1) Ensure you have scope generic-worker:os-group:<provisionerId>/<workerType>/Administrators in

If you do not have the scope, request it using a Service Request or by asking in #taskcluster IRC channel.

5.2) Add the following to the task payload:

  - generic-worker:os-group:<provisionerId>/<workerType>/Administrators
    - Administrators

6) Make sure that if your payload mounts any artifacts, that the task ID(s) are included as a list in top level property dependencies (not under payload)

So if it says

   - directory: .
       taskId: HUqhbXTMTXSXYEM6K2H3wA

Add (at the top level indent)


7) Submit the task. If the task resolves as exception and doesn't run, check the task log file. It should provide more information about the cause.
8) When the task successfully starts, go to Run Artifacts to see the rdpInfo.txt file appear with rdp connection information.
9) Enter the connection information into your RDP client of choice.
10) Connect with screen resolution 1280x1024 ! Note, it is important to use this resolution for gecko tests, since this is the screen size used by the tests, and the screen size cannot change once you have made a connection.

Performing operations as Administrator

Until bug 1465374 is resolved this can be a little tricky.

1) Make sure you followed step 5 above!
2) Open a regular command shell (e.g. Start Menu -> Run -> cmd.exe)
3) From there check which users are in the Administrators group:

C:\Windows\System32>net localgroup Administrators
Alias name     Administrators
Comment        Administrators have complete and unrestricted access to the computer/domain


The command completed successfully.

4) Check the user you are logged in as is one of the above listed users:


5) Open a new UAC elevated command shell:

C:\Windows\System32>powershell.exe Start-Process cmd.exe -Verb runAs

6) This will require you enter Administrative credentials. You will be presented with a prompt similar to this:

Screenshot of dialogue box asking for Administrative credentials

Click on More choices and select the task user, and copy/paste the task password (Ctrl-V).

You should now have a command shell running as Administrator!

Rerunning tasks after they have completed

If you want to rerun a step after the task has completed, there is a script for each command in the task payload. They are named like this:


Simply run them by hand to reproduce any of the task steps. If you wish to make changes, feel free to edit them. After the loan expires, the task directory, including all your changes, will be deleted. Therefore make sure to keep track of any changes that need to be put back in the gecko build system.