1.为何要将jenkins安装到mesos集群中
老的一套Jenkins使用的是固定Jenkins slave节点来构建任务,当构建任务多的时候,总是会出现排队等待的现象。为了改善这种情况,在网上找到了Jenkins On Mesos的解决方案。Jenkins Master可以在构建时根据实际需要动态的向Mesos申请slave节点,并在构建完成的一段时间后将节点归还给Mesos
---------------------
作者:felix_yujing
来源:CSDN
原文:https://blog.csdn.net/felix_yujing/article/details/52200129
版权声明:本文为博主原创文章,转载请附上博文链接!
2.如何安装?
使用marathon webUI新建一个application,
应用程序的配置如下:
{ "id": "/jenkinsmaster", "cmd": null, "cpus": 1, "mem": 600, "disk": 0, "instances": 1, "acceptedResourceRoles": [], "container": { "type": "DOCKER", "docker": { "forcePullImage": false, "image": "jenkins", "parameters": [], "privileged": false }, "volumes": [], "portMappings": [ { "containerPort": 8080, "hostPort": 31080, "labels": {}, "protocol": "tcp", "servicePort": 10002 }, { "containerPort": 31500, "hostPort": 31500, "labels": {}, "protocol": "tcp", "servicePort": 10003 } ] }, "env": { "JENKINS_SLAVE_AGENT_PORT": "31500" }, "healthChecks": [ { "gracePeriodSeconds": 300, "ignoreHttp1xx": false, "intervalSeconds": 60, "maxConsecutiveFailures": 3, "path": "/login", "portIndex": 0, "protocol": "HTTP", "ipProtocol": "IPv4", "timeoutSeconds": 20, "delaySeconds": 15 } ], "labels": { "HAPROXY_GROUP": "external", "HAPROXY_0_VHOST": "jenkins.evan.com" }, "networks": [ { "mode": "container/bridge" } ], "portDefinitions": [] }