1.安装业务系统需要的中间件或数据库
如果系统用到这些中间件或数据库,线安装好JDK、MySQL、Nginx、Tomcat、Zookeeper、Memcache、Python等。
2.编写pipe脚本
(1)前端:
step1.Pulling web codes阶段,修改为svn内网实际分支路径:http://192.168.1.19:82/svn/codes/ServiceWeb
step2.Deploy web阶段,修改目标服务器:192.168.1.25;
step3.Deploy web阶段,修改remoteDirectory 远程目录中的正确路径,这里主要改前端项目名;
step4.Pulling config files阶段,修改为svn内网实际分支路径:http://192.168.1.19:82/svn/codes/ServiceConfig
step5. Final阶段,修改目标服务器:192.168.1.25
step6. mail to 修改邮箱地址 test@test.com 改成接收人的邮箱地址
(2)前端回滚:
step1. 修改目标服务器:192.168.1.25
step2. 修改邮箱地址 test@test.com 改成接收人的邮箱地址
(3)后台:
step1. parameters 修改tomcat端口:47772
step2. Pulling code阶段,修改为svn内网实际分支路径:http://192.168.1.19:82/svn/codes/Service
step3. Deploy阶段,修改目标服务器:192.168.1.25
step4. Pulling config files阶段,修改为svn内网配置文件的实际分支路径:http://192.168.1.19:82/svn/codes/ServiceConfig
step5. Final阶段,修改目标服务器:192.168.1.25
step6. mail to修改邮箱地址:test@test.com 改成接收人的邮箱地址
(4)后台回滚:
step1.修改tomcat端口
step2.修改目标服务器:192.168.1.25
step3.修改邮箱地址 test@test.com 改成接收人的邮箱地址
3.Jenkins任务配置
(1)增加视图名称
在jenkins后台点击+,按规范要求增加项目的视图名称,选择列表视图,点解确定。
(2)新建后台任务
点击刚刚创建好的新增视图名称,点击左边菜单的新建任务,输入任务名称test,选择流水线,点击ok;
(3)点击左边菜单的配置,在流水线,脚本中,输入已经根据实际情况修改好的后台任务pipeline脚本,并点击应用和保存;
(4)前端任务参考后台任务,流程一样。
4.如果配置和pipeline脚本没问题,系统是能正常跑起来。