Jenkins standalone instance package with the Mesos plugin pre-installed. Besides jenkins slave auto scaling, marathon is supporting high availability with plugin scm-sync-configuration.
###How to use it quickly
- Wget the start script template
start-jenkins.app.sh.template
andmarathon.json
$wget https://raw.githubusercontent.com/Dataman-Cloud/jenkins-on-mesos/master/start-jenkins.app.sh.template
$wget https://raw.githubusercontent.com/Dataman-Cloud/jenkins-on-mesos/master/marathon.json
- Create a git repo on your private repo server or github to persist jenkins' data
We have to create a git repo named jenkins-on-mesos, such as [email protected]:core/jenkins-on-mesos.git, to persist jenkins master data, which is needed by plugin SCM Sync configuration plugin. BTW, make sure there is one user on mesos-slave can pull/push the repo.
- Edit to get your start script
$cp start-jenkins.app.sh.template start-jenkins.app.sh
$vim start-jenkins.app.sh
we need to edit 3 var in the file start-jenkins.app.sh
:
-
SCM_SYNC_GIT: The above git repo addr, here is my example
[email protected]:core/jenkins-on-mesos.git
-
APP_USER: will deploy jenkins on marathon as user APP_USER, who must have been granted to pull/push repo SCM_SYNC_GIT since jenkins will sync the configure with git repo SCM_SYNC_GIT.
-
MARATHON_PORTAL: Marathon PORTAL, for example: http://marathon.dataman.io:8080/v2/apps
-
Run the start script to deploy a new jenkins master on marathon
bash start-jenkins.app.sh
- Register jenkins master as mesos framework
We need visit jenkins-master configure page to edit section Mesos Cloud, set the Mesos Master [hostname:port] as your mesos entry. more config detail
###Features
- auto scaling jenkins slave nodes
- deployed over marathon for high availability
- pre-installed plugin scm-sync-configuration for data persistence