CIDuty/How To/How To Loan BD: Difference between revisions

no edit summary
m (Jlund moved page Buildduty/How To/How To Loan BD to CIDuty/How To/How To Loan BD: changing team name)
No edit summary
Line 10: Line 10:




= OSX Yosemite r7 - Test - Build Bot =
= OSX Yosemite r7 =
==  Find a server ==
==  Find a server ==
Head to SlaveAlloc, following this link: [https://secure.pub.build.mozilla.org/slavealloc/ui/#slaves https://secure.pub.build.mozilla.org/slavealloc/ui/#slaves] and in the top-right search for '''yosemite-r7''':
Head to TaskCluster, following this link: [https://tools.taskcluster.net/provisioners/releng-hardware/worker-types/gecko-t-osx-1010] and search for a worker that doesn't have a running job and it's not quarantined.
Look for a server that '''DOESN'T''' have a note to it, such as the note in the example below, keep in mind servers with "'''migration to taskcluster'''" are not good  for loaning either:
 
[[File:Slavealloc-search-example.png]]
If all workers are running jobs come back in 30 minutes and check again.
----
Take note of the server number, then lets find out if there is a task running on the server.
Follow [https://secure.pub.build.mozilla.org/buildapi/running THIS LINK] and in the top-right search for '''10.10.5''' (version of OSX yosemite). At this point there should be 2 things:
1) Nothing shows up. Make sure your search query is correct and if it is, it's safe to assume there are no tasks running on any of the selected servers, so feel free to pick whichever you find fancy.
----
----
----
Now if you have the server '''[https://wiki.mozilla.org/Buildduty/How_To/How_To_Loan_BD#Connect_to_the_server SKIP TO Connect to the server section]'''.
----
----
----
2) There is stuff that shows up, which means we need to do some more investigation. If after the search you see anything (as shown below) click on all the '''Buildmaster''' column links:
[[File:Slavealloc-search-with-results.png]]
----
The link will lead you to the task-execution page which shows you what's happening on the slave. At this point (if there are more than 5 results) I would '''recommend''' you to open a text editor as we need to keep track of which server is running. You can extract the number from the textfield in the example below:
[[File:Slave-alloc-buildmaster-tasknumber.png]]
----
After you have a complete list of all the busy servers, see if there are servers that are free/idle. If not, come back again 30 minutes later and check again.


== Connect to the server ==
== Connect to the server ==
Now that we have a server number, we need to SSH into it, you can do that by typing this into the terminal. Change the DLAP to your mozilla username and XXX to the server number which you want to loan:
Now that we have a server number, we need to SSH into it, you can do that by typing this into the terminal:
ssh LDAP@t-yosemite-r7-XXXX.test.releng.scl3.mozilla.com
ssh root@t-yosemite-r7-462.test.releng.xxxx.mozilla.com
xxxx- represents the datacenter the worker is located into.


Now run the following to commands:
Now run the following to commands:
Line 43: Line 26:
  And change the passwords to the ones offered by your team leader.
  And change the passwords to the ones offered by your team leader.


== Cleaning up BuildBot and Puppet files ==
== Terminate TC Worker and Clean up TC files ==
At this step we gonna run, again, 3 commands, to clean up some files from server. Like last time, run this commands one at a time.
At this step we gonna run, again, 3 commands, to clean up some files from server. Like last time, run this commands one at a time.
  <nowiki> rm -rf /var/lib/puppet/ssl/private_keys /Library/LaunchDaemons/com.mozilla.puppet.plist \
  <nowiki> rm -rf /var/lib/puppet/ssl/private_keys /Library/LaunchDaemons/com.mozilla.puppet.plist \
Line 53: Line 36:
   /Library/LaunchDaemons/org.mozilla.pflog.plist \
   /Library/LaunchDaemons/org.mozilla.pflog.plist \
   /Library/LaunchAgents/net.generic.worker.plist
   /Library/LaunchAgents/net.generic.worker.plist
 
  find /builds -maxdepth 1 -type f -print -delete
  find /builds -maxdepth 1 -type f -print -delete
   
  </nowiki>
  sudo reboot</nowiki>
  <nowiki>rm -f /usr/local/bin/{taskcluster,generic}-worker
'''IMPORTANT''': Make sure you '''waste no time with the reboot''' after running the 2 commands. Puppet might try to be sneaky and re-puppetize the machine.
  rm -f /etc/generic-worker.config
----
  pkill -f '(generic|taskcluster)-worker'
----
----
At this point you can skip to the next step, which is: [https://wiki.mozilla.org/Buildduty/How_To/How_To_Loan_BD#Setup.2C_test_and_grant_VNC_access Setup Test and Grant VNC access]
----
----
----


= OSX Yosemite r7 - Test - TaskCluster =
sudo reboot</nowiki>
==  Find a server ==
TBA


== Connect to the server ==
== Activate VNC on the server ==
TBA
Copy and Paste the following commands, run them one by one and give it a few seconds for the output to come.
<nowiki>vncpw=moz1234
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-configure -allowAccessFor -allUsers -privs -all
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-configure -clientopts -setvnclegacy -vnclegacy yes
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-configure -clientopts -setvncpw -vncpw ${vncpw}
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-restart -agent -console</nowiki>


== Terminate the TC Worker ==
Add the requester to the LDAPAdmin -> Group -> List. (https://wiki.mozilla.org/ReleaseEngineering/How_To/Update_VPN_ACL)
TBA


== Cleaning up TC files ==
If you don't have access in order to grant access to requester and add the ip & host of the loaned machine, you should create a bug for MOC: Service Requests. You can use this bug as reference. To speedup the process, check on #moc for the admin on duty and tell him about your request and the bug that you've created.
TBA
At this point all thats left if to send the credentials to the requester.


= Setup, test and grant VNC access =
== Grant access to keychain ==
== Activate VNC on the server ==
If the loaner needs to access the keychain, you can reset the password issuing the following command:
TBA
<nowiki>security set-keychain-password /Users/cltbld/Library/Keychains/login.keychain</nowiki>
( enter the cltbld password from private repo as old password then use the loaner cltbld password as new password value. )


== Test the VNC connection ==
Finally reboot the machine.
TBA
= Send the credentials for the server to the requester =


== Grant VNC access/rights to the requester ==
Follow this link and copy the first code block, as your email template: https://wiki.mozilla.org/ReleaseEngineering/How_To/Loan_a_Slave#Notifying
TBA


At this point all thats left if to send the credentials to the requester.
Change the needed information and send it.


= Send the credentials for the server to the requester =
The second code block,  from the above link, copy it, paste it inside the Bugzilla Bug, modify it and then assign the ticket to the requester, as shown below.
Pro-Tip: If you don't see all those field, click on the Blue "Edit" button. Don't forget to Save changes!
Confirmed users
22

edits