<p>So first of all, Chef is just a manner of upgrading/configuring, it will help you keep a reproducible state and keeping configuration in line but it won't do black magic and translate your jobs for you.</p>

<p>Now for Jenkins 1 to Jenkins 2, Jenkins-ci site says Jenkins 2 is <a href="https://jenkins.io/2.0/#compat" rel="nofollow noreferrer">Backward Compatible</a>.<br>
While this is true, when you update the pipeline plugin, not all plugins are compatible yet. There's a <a href="https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md" rel="nofollow noreferrer">compatibility list</a> on the pipeline plugin github page.</p>

<p>I would recommend installing a fresh Jenkins 2 and porting your jobs from Jenkins 1 to Jenkins 2. This will spot breaking plugins in Jenkins 2, allow you to strip up not needed anymore plugins and refactor your jobs.<br>
This way you can also take advantage of defining the pipelines with a <a href="https://jenkins.io/doc/book/pipeline/" rel="nofollow noreferrer">Jenkinsfile</a> along with the code of your application.</p>

CC BY-SA 3.0
2017-10-25T12:59:39.677Z
Assuming there are more than a handful of jobs to port, your approach can't be done without either having two instances of Jenkins running parallel or some considerable amount of downtime. Neither of which is feasible IMHO. Do you have any thoughts/experience regarding this?
peetasan
CC BY-SA 3.0
2017-10-25T13:06:53.917Z
My answer is exactly that, have 2 jenkins instance running in parallel, I worded it as it's exactly what we're doing at my company actually for roughly 230 jobs. Write the jenkinsfile for jenkins2 (and take advantage of it for pipelines), stop building on jenkins 1, build on Jenkins 2 to validate, if fail re-enable on jenkins 1 and restart at 1, if ok you're done for this one, start the next. that's not an easy task obviously.
Tensibai
CC BY-SA 3.0
2017-04-11T09:45:58.470Z
2017-04-11T09:45:58.470Z
Tensibai
<p>Can you please help me out how to upgrade an existing application which is jenkins using chef. I am trying to upgrade Jenkins from 1.x to 2.x and I have a cookbook for 1.x. what steps do I need to take to upgrade 1.x version to 2.x along with plugins. Environment: Rhel and using rpm package to install jenkins</p>

CC BY-SA 3.0
2017-04-07T20:03:39.677Z
Do you mean your current jenkins application is using chef and you'd like to upgrade it? Or you mean using chef as a means to perform the jenkins upgrade?
Dan Cornilescu
CC BY-SA 3.0
2017-04-07T20:53:03.843Z
@DanCornilescu using chef as a means to perform the jenkins upgrade
pandey
CC BY-SA 3.0
2017-04-07T21:08:46.297Z
Chef is just manner. here, jenkins1 to jenkins2, I would not recommend upgrading in place, a major version change mean breaking changes. I may extend this comment in an answer after the week end.
Tensibai
<jenkins><continuous-integration><chef>
Upgrading jenkins using chef
pandey
# Upgrading jenkins using chef

(Asked by: username_0 on 2017-04-07)

Can you please help me out how to upgrade an existing application which is jenkins using chef. I am trying to upgrade Jenkins from 1.x to 2.x and I have a cookbook for 1.x. what steps do I need to take to upgrade 1.x version to 2.x along with plugins. Environment: Rhel and using rpm package to install jenkins

**Tags:** jenkins, continuous-integration, chef

> **Comments:**
> **username_1**: Do you mean your current jenkins application is using chef and you'd like to upgrade it? Or you mean using chef as a means to perform the jenkins upgrade?  
> **username_0**: @DanCornilescu using chef as a means to perform the jenkins upgrade  
> **username_2**: Chef is just manner. here, jenkins1 to jenkins2, I would not recommend upgrading in place, a major version change mean breaking changes. I may extend this comment in an answer after the week end.  

---

## 1 answers

### Answer by username_2 on 2017-04-11. Score: 3

So first of all, Chef is just a manner of upgrading/configuring, it will help you keep a reproducible state and keeping configuration in line but it won't do black magic and translate your jobs for you.

Now for Jenkins 1 to Jenkins 2, Jenkins-ci site says Jenkins 2 is [Backward Compatible](https://jenkins.io/2.0/#compat).  
While this is true, when you update the pipeline plugin, not all plugins are compatible yet. There's a [compatibility list](https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md) on the pipeline plugin github page.

I would recommend installing a fresh Jenkins 2 and porting your jobs from Jenkins 1 to Jenkins 2. This will spot breaking plugins in Jenkins 2, allow you to strip up not needed anymore plugins and refactor your jobs.  
This way you can also take advantage of defining the pipelines with a [Jenkinsfile](https://jenkins.io/doc/book/pipeline/) along with the code of your application.

> **Comments:**
> **username_3**: Assuming there are more than a handful of jobs to port, your approach can't be done without either having two instances of Jenkins running parallel or some considerable amount of downtime. Neither of which is feasible IMHO. Do you have any thoughts/experience regarding this?  
> **username_2**: My answer is exactly that, have 2 jenkins instance running in parallel, I worded it as it's exactly what we're doing at my company actually for roughly 230 jobs. Write the jenkinsfile for jenkins2 (and take advantage of it for pipelines), stop building on jenkins 1, build on Jenkins 2 to validate, if fail re-enable on jenkins 1 and restart at 1, if ok you're done for this one, start the next. that's not an easy task obviously.  

---

