How to add new JENKINS slave nodes (clients)

Set up the jenkins user on the client node

  • Create the user jenkins on the node

Passwordless ssh from jenkins server configuration

  • If not already done, on the jenkins server enter ssh-keygen -t rsa without specifying a password as user jenkins

Passwordless ssh from jenkins client configuration

  • mkdir /home/jenkins/.ssh
  • chmod 700 /home/jenkins/.ssh/
  • vim .ssh/authorized_keys (<< copy here the content of cat .ssh/ run on jenkins server home)
  • chmod 640 .ssh/authorized_keys
  • service sshd restart (as root)

Create the node in Jenkins

  • Point your browser to the jenkins instance:
  • Log in as admin and go to Configura Jenkins -> Gestisci nodi
  • Go to New Node
  • Insert node name and select the Copy existing node radio button. Specify the node to be copied eg. ci-02
  • Modify the following fields according to your desiderata: Name, Description, Labels (important for triggering builds on this node), Host
  • Click on the Save button
  • The user which performs ssh (jenkins) is already specified. If the node is created from scratch this is another option to be specified.

In order to trigger a build on the already created node, specify the corresponding label in the build options.

Enable package deployment to nexus

In order to publish artifacts in nexus, it is necessary to define a file on each build node under the jenkins user home directory. The file is ~jenkins/.m2/settings.xml and the content should be the following:
The id is the one that must be specified in the pom.xml section for the deployment.

Install build packages

These packages are considered the minimum build environment. Install them on the slave node.
cmake bash bzip2 coreutils cpio diffutils fedora-release findutils gawk gcc gcc-c++ grep gzip info make patch redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux which xz
boost boost-devel createrepo maven (for java pacakges)
Edit | Attach | PDF | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | More topic actions
Topic revision: r6 - 2013-11-21 - CristinaAiftimiei
This site is powered by the TWiki collaboration platformCopyright © 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback