Continuous integration Jenkins windows advanced version of / linux build a mixed cluster (b)

We have said before, to use ssh way to configure windows from the node, if ssh way, the windows and linux configuration is almost no difference from the node, the only difference is that currently found in the windows directory from the node to be set in the c drive, linux may be any position. the reason is because the windows environment, the cd command without parameters, the other can not cd disk tray than c.

Jenkins slave node configuration

Open jenkins interface, select the left side of the Manage Jenkinstab, select the interface that appears in Manage Nodes, then click on the left side of the screen that appearsNew node

img

In the screen that appears inside Node name, it can be any name, but it is strongly recommended that the name is easily recognizable.

Selecting the first radio buttonPermanent Agent

Click this time OKthere will be a more detailed information to fill the page

  • DescriptionThis node is a custom description

  • # of executorsThe number of actuators, the default is 1, if a plurality of designated, the node of this parallel jenkins will schedule more than one task (perform multiple tasks at the same time). This is provided according to the actual configuration and operation of the master node set.

  • Remote root directoryRemote working directory, this is actually from the working directory node, as required, fill out, this node scheduling tasks to be performed in this directory.

  • LabelsLabel, we see the beginning of the label may make it similar to the Descriptiondescription, no functional features, in fact, on the contrary, it plays a key role in resource scheduling. Label can make multiple nodes form a logical unit. For example, said traditional .net project must be built on the windows, we can give all the nodes in the cluster windows add a name windows(here, windows and no special meaning, can be any name, but to facilitate management). in this way, when creating a task can be specified only windowsperformed on the machine, so that when the master node create a task, the task scheduler will only contain windowsthe label machine. this is just an example, not only the tag may identify the machine type of system, you may also identify other information, such as some say java project allows the compiler on windows and linux, but jdk environment must be 1.7, we can give jdk 1.7 includes a host of branded labels, to create such a task when the specified label, jenkins will only tasks scheduled on these nodes .

From the name Lablescan be seen, the node can specify a plurality of label, between a plurality of 空格divided.

  • UsagePurposes, is a check type, there are two options

1) Use this node as much as possible the default option, jenkins will be free to use this node, (there is no limit when creating the job when there are tasks can be scheduled to this node, and does not reach the maximum degree of parallelism, you can schedule a task to jenkins this node), jenkins it might scheduling this node.

2) Only build jobs with label expressions matching this nodeonly label this node task scheduling matches. In this mode, only the label specified when creating the task and the tag match this node will be jenkins task scheduling up to this node.

When this mode will be reserved jenkins node-specific tasks, such as performance testing you want, you might just want to run this task. This is when you can use this model on a particular configuration of the machine, only the specified label the task will be scheduled to run on these machines

Still performance test, for example, when you run performance tests on a particular machine, using the label to ensure that tasks are assigned to the correct node, but may result in the case of multiple performance tests are assigned to the same node, this situation will seriously affect the performance test results are to be avoided, we can # of executorsset the value to 1, when the node has the task of running, jenkins task will not be redistributed to the node.

  • Launch methodStart-up mode, where we choose Launch agent agents via SSHto start by ssh way.

  • HostFill in the host Ip

  • CredentialsKey, if not the key, you can click on the back addto add a, add a dialog box will appear. kindSelect ssh username with private key, usernamefor the 主节点user name Private Keycheck enter directly. We c:/Users/当前用户名/.ssh/id_rsacopy and paste the contents here.

At the same time, we need to put on the master node c:/Users/当前用户/.ssh/id_rsa.pubto copy the contents to the slave node c:/Users/当前用户/.ssh/authorized_keys. Do not understand ssh login user can access relevant information inside.

Note that if you specify Passphrase and when generating ssh key is id, there also needs to configure.

Click OK after the expiry

After the addition was completed Credentialsin select key just added.

The other is the default option, click over Save, if the node starts correctly, listed in the left jenkins home, and not on an icon 红叉to identify, if there is a red cross logo, you need to look at the configuration where there are problems, then do the processing

Complete configuration is as follows

img

Successful node configuration is shown below

img

Guess you like

Origin www.cnblogs.com/tylerzhou/p/11462816.html