Re: Jenkins master automatic setup

2015-06-28 Thread David Resnick
Thanks for sharing your setup. I'm setting up a new server and am going all 
docker as well -- master and slaves, with the slaves using the swarm plugin 
so that they find the master instead of the other way around.

As you said, all the tools are already set up in containers. I'd really 
like to be able to do the final step via some kind of script or preparation 
in advance that doesn't include going from a previously set up master 
persisted in a config.xml file.

- David

On Sunday, June 28, 2015 at 10:12:32 PM UTC+3, tfasz wrote:
>
> We have been using the Job DSL plugin as well and are very happy with it. 
> We probably generate ~90% of our jobs using it with the rest created by 
> hand.
>
> Our Jenkins master and slaves are all setup running in Docker containers. 
> The master has the Jenkins home directory mounted from a directory on the 
> host, so it persists across Docker container restarts. The containers are 
> started from Docker images built with a Dockerfile, so all of the software 
> install (Git, Java, Ant, Maven, etc) and initial configuration (ssh keys, 
> etc) is in these Dockerfiles. Once the Jenkins master is started up, there 
> is some manual configuration through Jenkins to setup slaves, settings, 
> etc. We then have a backup job run daily to do a thin backup of the Jenkins 
> home directory to S3. Setting up a new master from scratch takes about 15 
> minutes and requires downloading the backup from S3 and spinning up the 
> Docker container. Spinning up a slave is as simple as starting a Docker 
> container with the slave image somewhere and then hooking it up to the 
> master.
>
> We are also using Docker as the basis for all of our test environments. 
> After a build is complete in Jenkins, downstream jobs spin up a set of 
> Docker containers and deploy the built software to those containers. All in 
> all, we have been pretty happy with the setup and Docker has been getting 
> more stable and mature over the past year. Looking forward to their new 
> multi-host networking coming soon - will allow us to spin up test 
> containers across a fleet of machines instead of our one really large 
> instance we use now.
>
> On Sun, Jun 28, 2015 at 1:13 AM, David Resnick  > wrote:
>
>> I'm very pleased with using the Job DSL plugin to keep job configuration 
>> in SCM, both for setting up a new Jenkins instance as well as for keeping 
>> track of job changes over time.
>>
>> Does anyone have a similar solution for setting up and maintaining a 
>> Jenkins master?
>>
>> This would include such settings as tool installations, email defaults 
>> and, most important, slave definitions.
>>
>> I'm hoping to find a groovy or DSL based solution; anything that is 
>> cleaner than checking in the master config.xml.
>>
>> I'd really appreciate hearing what other people have worked out.
>>
>> Thanks!
>>
>> - David
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Jenkins Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to jenkinsci-use...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/jenkinsci-users/94e52e15-dab9-475e-bf0d-9c4110c24658%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/a8a3123a-4cfb-403f-9808-d7213a6ca32b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Jenkins master automatic setup

2015-06-28 Thread toddfas
We have been using the Job DSL plugin as well and are very happy with it.
We probably generate ~90% of our jobs using it with the rest created by
hand.

Our Jenkins master and slaves are all setup running in Docker containers.
The master has the Jenkins home directory mounted from a directory on the
host, so it persists across Docker container restarts. The containers are
started from Docker images built with a Dockerfile, so all of the software
install (Git, Java, Ant, Maven, etc) and initial configuration (ssh keys,
etc) is in these Dockerfiles. Once the Jenkins master is started up, there
is some manual configuration through Jenkins to setup slaves, settings,
etc. We then have a backup job run daily to do a thin backup of the Jenkins
home directory to S3. Setting up a new master from scratch takes about 15
minutes and requires downloading the backup from S3 and spinning up the
Docker container. Spinning up a slave is as simple as starting a Docker
container with the slave image somewhere and then hooking it up to the
master.

We are also using Docker as the basis for all of our test environments.
After a build is complete in Jenkins, downstream jobs spin up a set of
Docker containers and deploy the built software to those containers. All in
all, we have been pretty happy with the setup and Docker has been getting
more stable and mature over the past year. Looking forward to their new
multi-host networking coming soon - will allow us to spin up test
containers across a fleet of machines instead of our one really large
instance we use now.

On Sun, Jun 28, 2015 at 1:13 AM, David Resnick  wrote:

> I'm very pleased with using the Job DSL plugin to keep job configuration
> in SCM, both for setting up a new Jenkins instance as well as for keeping
> track of job changes over time.
>
> Does anyone have a similar solution for setting up and maintaining a
> Jenkins master?
>
> This would include such settings as tool installations, email defaults
> and, most important, slave definitions.
>
> I'm hoping to find a groovy or DSL based solution; anything that is
> cleaner than checking in the master config.xml.
>
> I'd really appreciate hearing what other people have worked out.
>
> Thanks!
>
> - David
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/94e52e15-dab9-475e-bf0d-9c4110c24658%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CABARhQmEZKNnks8B81%3DVD7ayWmNojxmLm31GiBC2Z1CbSHHZZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Job without trigger building constantly because of "SCM change"

2015-06-28 Thread David Resnick
Our problem went away, unfortunately we don't know why.

- David

On Saturday, June 27, 2015 at 1:10:40 AM UTC+3, tfasz wrote:
>
> Hi David - wondering if you resolved this issue. 
>
> I'm seeing something very similar - a job that gets into a build loop. 
> When I manually hit the Build Now button I immediately see 2 instances of 
> the jobs scheduled with the second one pending completion of the first. 
> Then when the second one starts it triggers a third, etc. The first 
> instance is "Started by " and the subsequent ones are "Started by an 
> SCM change". 
>
> Job details:
> - Maven job type
> - Git repo
> - trigger on SCM poll 
> - Git option to "check out to specific local branch" specified
>
> The build #1 appears to run fine but then once a check-in happens to the 
> repo the next triggered (or manually run) build starts looping. 
>
> Jenkins 1.609.1
> Git plugin 2.3.5
> Maven plugin 2.10
>
>
> On Wednesday, May 20, 2015 at 10:40:23 PM UTC-7, David Resnick wrote:
>>
>> Unfortunately, I don't have a lot to add to the subject.
>>
>> The job has SCM but no triggers -- it is triggered using the 
>> Parameterized Trigger Plugin. 
>>
>> Yesterday we noticed that it was running continuously (using default 
>> parameters), restarting as soon as it finishes the previous build. The 
>> builds indicate that they were started by SCM change, but that there were 
>> no changes. There have been no new commits in the (git) SCM.
>>
>> Disabling and then enabling the job stopped it from building, but once it 
>> was triggered again (manually) it once again built continuously until 
>> disabled.
>>
>> The logs don't show anything out of the ordinary, just that the job 
>> completes successfully:
>> May 20, 2015 12:27:10 PM hudson.model.Run execute
>> INFO: Update Machine #5372 main build action completed: SUCCESS
>>
>> Jenkins is 1.608 with a lot of plugins. There have not been any plugins 
>> installed or upgraded recently that might be the trigger to this problem.
>>
>> Any ideas or suggestions?
>>
>> Thanks,
>> David
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/b46ecd0b-c5f9-4be7-9575-53ba8db4d152%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jenkins master automatic setup

2015-06-28 Thread David Resnick
I'm very pleased with using the Job DSL plugin to keep job configuration in 
SCM, both for setting up a new Jenkins instance as well as for keeping 
track of job changes over time.

Does anyone have a similar solution for setting up and maintaining a 
Jenkins master?

This would include such settings as tool installations, email defaults and, 
most important, slave definitions.

I'm hoping to find a groovy or DSL based solution; anything that is cleaner 
than checking in the master config.xml.

I'd really appreciate hearing what other people have worked out.

Thanks!

- David

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/94e52e15-dab9-475e-bf0d-9c4110c24658%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.