1. devops-jenkins分布式构建
1) 点击系统管理
进入节点管理
2) 点击新建节点
3) 进行节点配置
在node节点服务器配置,进行java的安装
[root@nginx-backup .ssh]# mkdir /data/jenkins-slave -p [root@nginx-backup .ssh]# yum install -y java-1.8.0
发现提示,找不到凭证,下面我们配置连接用户凭证
再次验证,查看是否还提示
查看节点是否正常
查看节点的日志
4) 我们需要master不执行构建,需要设置
点击红色标记的进入配置,设置of executors为0,不在让master有构建的执行
5) 执行构建任务
提示报错,发现slave服务器构建的时候没得git服务
我们在从服务器,安装git服务
[root@nginx-backup jenkins-slave]# yum install git
再次构建
服务正常,
验证
[root@nginx-backup workspace]# cd /data/jenkins-slave/ [root@nginx-backup jenkins-slave]# ll total 760 drwxr-xr-x 4 root root 34 Jan 25 19:50 remoting -rw-r--r-- 1 root root 776717 Jan 25 19:50 remoting.jar drwxr-xr-x 4 root root 52 Jan 25 20:00 workspace [root@nginx-backup jenkins-slave]# cd workspace/ [root@nginx-backup workspace]# ll total 0 drwxr-xr-x 3 root root 35 Jan 25 20:00 Pipeline-demo drwxr-xr-x 2 root root 6 Jan 25 20:04 Pipeline-demo@tmp [root@nginx-backup workspace]# cd Pipeline-demo [root@nginx-backup Pipeline-demo]# ll total 4