Jenkins配置master-slave模式


1.    管理员建立新账户,client使用该账户登录

使用管理员账户在用户管理中添加一个新用户,这里我是使用zwj作为举例。

2.    添加client节点

A) Manage Jenkins->New Node

B) 设置新节点信息

·Name:非必须的识别信息,一般情况使用client账户名,应避免重复;

·Description:主要描述client主机的信息

# of executors:Jenkins在该代理(client)上支持的最大并发生成数,一般情况与client的CPU核数一致即可。

       Tips:1.A good value to start with would be the number of CPU cores on themachine. Setting a higher value would cause each build to take longer, butcould increase the overall throughput. For example, one build might beCPU-bound, while a second build running at the same time might be I/O-bound —so the second build could take advantage of the spare I/O capacity at thatmoment.

2.ents must haveat least one executor. To temporarily prevent any builds from being executed onan agent, use the Mark this node temporarily offline button on the agent'spage.

3.is does notapply to the Jenkins master — setting the number of executors to zero willprevent any builds from being executed on the master.

·Remote root directory:client节点需要有一个文件夹专门用于Jenkins,这里填写路径,比如:windows环境下,是:D:\Jenkins

       Tips:1.client(代理)并不保存/持有重要数据信息。比如logs和artifacts存储在master上。Agent一般存储cache data比如installations,build workspace。

2.如果填写的是相对信息,那么将会以jenkins的Launch目录来选取相对地址信息。

·Labels:用于多个代理组组成一个逻辑组。

       Tips:1.For example, if you have multiple Windows agents and you have ajob that must run on Windows, then you could configure all your Windows agentsto have the label windows, and then tie that job to this label.

This would ensure that your job runs on oneof your Windows agents, but not on any agents without this label.

2.Labels do notnecessarily have to represent the operating system on the agent; you can alsouse labels to note the CPU architecture, or that a certain tool is installed onthe agent.

3.Multiplelabels must b

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值