The creation of Jenkins Slave

Source: Internet
Author: User

For more and more build tasks, it is important to create slave (which can be understood as a proxy server), one is to share the pressure of master, to increase the speed of construction, and second, when there are multiple development teams, each team can build their own slave, and then connect to master, so that it is easy to manage.

Creating a Slave can be broadly divided into three main steps, the first step: adding a node to master, the second step: Configuring the slave server, and the third step: Configuring the Build task to slave.

Master/slave Architecture

Slave can be understood as the agent for Master, and a master can associate multiple slave. Master provides a web interface for users to manage jobs and Slave,job can run on master or assigned to slave. You can look at the Master/slave architecture of Jenkins, for example.

Adding nodes to Master

1, enter node management

Select the menu ' System Management/Management node ' to enter the node management page, such as.

2, adding nodes

Click the link ' new node ', enter the node name, select Dumb Slave, such as.

3, edit node

Many of these machines can write the same label, allowing the task to be balanced between machines, such as.

4, Go to Node list

You can see the node we just created, such as.

5, slave-agent download page

Click slave name appears the following interface, click to download the two files, after the configuration of the slave server will be used, to the end of the page operation, such as.

Configuring the Slave server

Configuring the Slave server is complex, and there are many steps that you might want to configure in order of precedence.

1, install VS2010

Because vs2010 defaults to installing ASP. NET mvc2,visual Studio Tools and Web deploy, including the TFS components (which are needed to get source code from TFS), which may be used when deploying the site.

2, install ASP. MVC3 and ASP. NET MVC4

Because our public framework, such as CtripSZ.Frameworks.Offline, refers to ASP. NET MVC3 related DLLs, it is best to install and install MVC3 First, and then install MVC4.

3, installing MSBuild

: Https://www.visualstudio.com/downloads/download-visual-studio-vs

Here is the MSBuild 2015 download

4, copy the target required for the build

Because folders are not created in this directory at this time, they are required at build time or when they are published C:\Program Files (x86) \msbuild\microsoft\visualstudio
For example, you need to manually copy related folders from this directory locally to the slave server.

5, installing the GAC

Obtain the latest GAC and install it on the slave server. Because the public class libraries in our project are referenced in the GAC, the GAC must be installed on the slave server.

6. Install Web Deploy

\\172.18.21.12\ Technology Development Department \ Bus station \software\common\webdeploy_3.6_x64.msi

Used for deployment of the site.

7, install Git

\\172.18.21.12\ Technology Development Department \ Bus station \software\git\git-2.5.0-64-bit.exe

8, install slave client

1) Install Java JDK

2) Configure the working directory D:\Jenkins and copy the two files you downloaded earlier (or not).

3) Double-click the slave-agent.jnlp file to install and select Install as Windows service, for example.

9. See if the slave is configured.

Go to the UI view of master, such as.

Configuring the build task to Slave

1, specify label publishing

Go to the configuration page of the build task, tick the ' Restrict where this project can is run ' option, and select label expression to specify slave, such as.

2, when you build the task, you see that it really runs on slave

Such as.

The creation of Jenkins Slave

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.