Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31094

Proposal: Jenkins Configuration DSL

    Details

    • Type: Epic
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Labels:
      None
    • Epic Name:
      Jenkins Configuration DSL
    • Similar Issues:

      Description

      Problem

      Users of Jenkins who use configuration management tools like chef/puppet/ansible want to manage Jenkins and its configuration entirely from those tools. The motivation for this "configuration as code" practice is well understood — see this for one example.

      Today some efforts exist, such as Puppet Jenkins module, but according to its maintainers, Jenkins don't behave well for this purpose.

      Proposal

      My proposal is to take the success of Job DSL plugin and expand the same idea to other configuation of Jenkins. That is, we define a DSL that allows users to configure such things like security realm, slaves, credentials, clouds, and other global configurations.

      Such DSL definitions can be placed under $JENKINS_HOME/init.groovy.d so that it gets executed during the boot.

      Jenkins used in this mode should also refuse to show the system configuration page, do not write $JENKINS_HOME/config.xml and other global configuration files from Descriptor, and generally do not allow users to make changes in GUI for parts that are coming from the initialization DSL script.

      With something like this, Puppet/Chef/Ansible now only needs to lay down files inside $JENKINS_HOME. Combined with Job DSL plugin, the entire Jenkins deployment can be fully managed by code.

        Attachments

          Activity

          Hide
          rtyler R. Tyler Croy added a comment -

          John Hill, I don't believe Jenkins Job Builder (jjb) is in this same space. Pipeline, Job DSL plugin, and jjb all occupy a somewhat similar space. Whereas this ticket is a level deeper, about automating the management and configuration of the Jenkins environment itself, rather than the workloads that execute on top of it.

          Show
          rtyler R. Tyler Croy added a comment - John Hill , I don't believe Jenkins Job Builder (jjb) is in this same space. Pipeline, Job DSL plugin, and jjb all occupy a somewhat similar space. Whereas this ticket is a level deeper, about automating the management and configuration of the Jenkins environment itself, rather than the workloads that execute on top of it.
          Hide
          sag47 Sam Gleske added a comment -

          I've also been taking all of my experience in that script console configuration space and I've created a project to implement some of my ideas as an experiment.

          Eventually it will be able to configure the master settings.  I'm brainstorming ways in which it can be dynamically compatible with plugins as well.  Check it out -> https://github.com/sandscape

          Show
          sag47 Sam Gleske added a comment - I've also been taking all of my experience in that script console configuration space and I've created a project to implement some of my ideas as an experiment. Eventually it will be able to configure the master settings.  I'm brainstorming ways in which it can be dynamically compatible with plugins as well.  Check it out -> https://github.com/sandscape
          Hide
          andrey9kin Andrey Devyatkin added a comment -

          Hi!

          We have been doing Jenkins configuration through groovy scripts and already accumulated number of the scripts that used by our customers and us internally.

          You can check them out here https://github.com/Praqma/JenkinsAsCodeReference/tree/master/dockerizeit/master

          Next step for us would be to separate what from how and find a good way to distribute those scripts. Currently, we have a lot of forks of the repo and that is not the best way of distributing updates. We thought about wrapping them into a plugin. Thanks to rsandell who pointed us to config-dsl. Ewelina Wilkosz and I will try to put some work into config-dsl during the summer.

          Is anyone working on it already? Or have wishes, requirements that we should take into account?

          BR, Andrey

          Show
          andrey9kin Andrey Devyatkin added a comment - Hi! We have been doing Jenkins configuration through groovy scripts and already accumulated number of the scripts that used by our customers and us internally. You can check them out here https://github.com/Praqma/JenkinsAsCodeReference/tree/master/dockerizeit/master Next step for us would be to separate what from how and find a good way to distribute those scripts. Currently, we have a lot of forks of the repo and that is not the best way of distributing updates. We thought about wrapping them into a plugin. Thanks to rsandell who pointed us to config-dsl. Ewelina Wilkosz and I will try to put some work into config-dsl during the summer. Is anyone working on it already? Or have wishes, requirements that we should take into account? BR, Andrey
          Hide
          kohsuke Kohsuke Kawaguchi added a comment - - edited

          CloudBees and Praqma are joining hands on this effort, and Ewelina Wilkosz and Nicolas De Loof have started a new project that combines existing efforts. See the mission statement and the goal at JEP #201

          Show
          kohsuke Kohsuke Kawaguchi added a comment - - edited CloudBees and Praqma are joining hands on this effort, and Ewelina Wilkosz and Nicolas De Loof have started a new project that combines existing efforts. See the mission statement and the goal at  JEP #201
          Hide
          jhoblitt Joshua Hoblitt added a comment -

          Pardon my ignorance, is this the correct venue to comment on JEP #201 or is there a more appropriate location?

          Show
          jhoblitt Joshua Hoblitt added a comment - Pardon my ignorance, is this the correct venue to comment on JEP #201 or is there a more appropriate location?

            People

            • Assignee:
              Unassigned
              Reporter:
              kohsuke Kohsuke Kawaguchi
            • Votes:
              52 Vote for this issue
              Watchers:
              67 Start watching this issue

              Dates

              • Created:
                Updated: