Git Product home page Git Product logo

jenkins-salt's Introduction

jenkins-salt

Jenkins salt configuration files

Contributing

All changes should be pushed first into the 'dev' branch for testing, then merged down into master once tested and correct.

Layout

All units should be organized into top level 'units', for example 'slave' or 'bsw'. These units should include an init.sls, which includes all of the local sls files. Finally, these 'units' should be added to top.sls

The following inheritance hierarchy is used:

  • base
    • slave
      • runner
      • builder
    • master

Base: shared state for all machines, regardless of role. This is state like, use the local package mirror, network configuration, etc. Slave: shared state for all jenkins slaves. Runner: shared state for all jenkins test runners Builder: shared state for all jenkins test builders. Master: shared state for all jenkins masters.

It is best to include changes in the highest level possible, ie don't put things that only apply to runners in base or slave, put them in runner.

Nothing in this hierarchy should overwrite something above it. So, if runner and builder both need a specific service, but configured differently there should not be a shared state in slave that is overwritten in one, instead runner and builder should each contain their own configuration of said service. This is in contrast to machine specific overwrites, which are usually used to modify an existing service.

Partial Files

Whenever possible leave files that may need to be unique per machine (say /etc/fstab) unmanaged, and use an alternative that can be managed more easily (like systemd .mount and .automount files). This allows us to separate files that salt doesn't need to manage from those it does.

Using the "dev" branch

We use a dev branch for testing changes on a single machine before merging them into the master.

The first thing to do is to update the top.sls file on the dev branch by adding a "dev" catagory:

dev:
    '<matches only the hardware to test on>:
        - <the package to test (slave, base, etc)>
base:
    ...

Make sure that the match will only find the hardware to test on, and not multiple pieces of hardware.

Once you've done that, update the server with the following command: sudo salt-run fileserver.update, which will pull from the git tree (it handles force pushes, so feel free). Then run sudo salt '<matches your hardware>' state.highstate saltenv="dev" It is very important to use saltenv="dev", otherwise you'll get errors.

Once everything is good, revert your changes to the top.sls file, and merge into master.

jenkins-salt's People

Contributors

dcbaker avatar developers-developers-developers-develo avatar majanes-intel avatar ngcortes avatar tokonbekov avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.