Howto add a new mac node to Jenkins

Available MAC machines in IT

  • macitois17: macOS 10.11
  • macitois19: macOS 10.12
  • macitois21: macOS 10.14
  • macitois22: macOS 10.13

Mac machines in SFT

  • macphsft08: macOS 10.13
  • macphsft16: macOS 10.12

 

On the Mac you need to have installed:

  • Xcode last version (from AppStore) - if latest version is not compatible with the OS then you need to use a developer account and get a previous version from https://developer.apple.com
    • install command line tools:  xcode-select --install
    • accept license: sudo xcodebuild -license
  • CMake last version  (http://www.cmake.org/download)
    • install cmake command line tools: sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install
  • Java JDK from Oracle (http://www.oracle.com/technetwork/java/javase/downloads)
    • install latest Java SE Development Kit for MacOSX
  • gfortran (https://gcc.gnu.org/wiki/GFortranBinaries)
  • cvmfs
  • XQuartz
  • BREW-CCACHE-NINJA-GSL (2.4)
    • run command : /bin/sh -c '/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"'
    • then : /usr/local/bin/brew install ccache
    • and :​/usr/local/bin/brew install ninja
    • and :​/usr/local/bin/brew install gsl

On the node rename the volumes HD1 and HD2, then:

  • create /Volumes/HD2/build : mkdir /Volumes/HD2/build
  • create the link /build -> /Volumes/HD2/build : sudo ln -s /Volumes/HD2/build /build
  • create as sftnight /build/jenkins: cd /build; mkdir jenkins; sudo chown -R sftnight jenkins

​Open Jenkins web interface : https://epsft-jenkins.cern.ch

  • Log in on the node as sftnight and run the command ssh-keygen -t rsa
    macitois17:.ssh sftnight$ ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/Users/sftnight/.ssh/id_rsa): 
    Enter passphrase (empty for no passphrase): 
    Enter same passphrase again: 
    Your identification has been saved in /Users/sftnight/.ssh/id_rsa.
    Your public key has been saved in /Users/sftnight/.ssh/id_rsa.pub.
    The key fingerprint is:
    ...

    to create the file id_rsa.pub as described in https://docs.joyent.com/public-cloud/getting-started/ssh-keys/generating-an-ssh-key-manually/manually-generating-your-ssh-key-in-mac-os-x
  • ​Log in on node epsft-jenkins as sftnight and copy the previous file content into .ssh/authorized_keys: cd .ssh; ssh sftnight@macitois17:.ssh/id_rsa.pub ./id_rsa.pub.macitois17; cat id_rsa.pub.macitois17 >> authorized_keys; rm id_rsa.pub.macitois17;
    if this does not work copy the file content /etc/ssh/ssh_host_rsa_key.pub as SSH key into Jenkins node config of macitois17 "Host Key Verification Strategy" set to "Manually provided key Verification Strategy" 
  • Login on the new mac node and copy file /var/lib/jenkins/.ssh/id_rsa.pub from epsft-jenkins into sftnight@macitois17:~/.ssh/authorized_keys
    to allow sftnight@epsft-jenkins to log in as sftnight@macitois17.
  • Log in on https://epsft-jenkins.cern.ch (be sure you have write access to it - in case of problem ask Patricia)
  • -> Manage Jenkins -> Manage Nodes
  • -> New node and copy the configuration form another existing node 
  • Verify the configuration of the new node : description and label should correspond to the OS version, change the host name with the name of the node, add the notification when the node online status changes adding Patricia and Javier emails Save
  • Launch slave agent