Results

Submitted upstream.

Blog post.

<iframe width="560" height="315" src="https://www.youtube.com/embed/2znjgf9Q7J0" frameborder="0" allowfullscreen></iframe>


Introduction

If you have an infrastructure described with a Salt state tree (.sls files) having to create Docker images with Dockerfiles means you have infrastructure defined somewhere else and in a different format.

This projects attempts to allow building Docker images from pure Salt states. In some way, it has a similar goal to ansible-container with some differences:

  • It is not a "cli" tool, but a Salt module that inherits all the features of Salt.
  • It reuses the dockerng module instead of interacting directly with Docker
  • As the tricky part is to get the configuration management engine in the container "temporarily", it does not do hacks like going to the internet and checkout Ansible master from github in /tmp. It uses the salt.thin technology to use the host Salt installation into the container.

Challenges

  • Just like it is tricky to get Salt into the container, right now the image always ends with Python installed.
  • Figure out how to pass pillar data

Progress

Working

  • Create images from a base images and a list of sls modules
  • Ability of using the host salt installation thanks to salt.thin
  • Ability to use the grains from inside of the container
  • Ability to pillar data visible to the minion in the state applied in the container

TODO

  • Better error handling (eg, cleanup containers)
  • Factor out a function to run arbitrary salt modules inside the container with salt.thin

Looking for hackers with the skills:

salt saltstack docker

This project is part of:

Hack Week 14

Activity

  • over 3 years ago: dmaiocchi liked Build Docker images with pure Salt
  • over 3 years ago: evshmarnev liked Build Docker images with pure Salt
  • over 3 years ago: dmacvicar started Build Docker images with pure Salt
  • over 3 years ago: dmacvicar added keyword "salt" to Build Docker images with pure Salt
  • over 3 years ago: dmacvicar added keyword "saltstack" to Build Docker images with pure Salt
  • over 3 years ago: dmacvicar added keyword "docker" to Build Docker images with pure Salt
  • over 3 years ago: dmacvicar originated Build Docker images with pure Salt

  • Comments

    Be the first to comment!

    Similar Projects

    Provisioning Prometheus exporters with Uyuni revisited by j_renner

    There is a number of annoyances and pending imp...


    SUSE Manager: Windows client support by pagarcia

    Let's see how much, if any, of the steps descri...


    Modernize Mash deployment by seanmarlow

    Mash is a Python based CI/CD pipeline for aut...


    Port Salt virt modules to idem by cbosdonnat

    Salt is moving towards a plugable architecture ...


    Learn SaltStack Enterprise by pagarcia

    Uyuni uses the open source version of Salt to i...


    Port Salt virt modules to idem by cbosdonnat

    Salt is moving towards a plugable architecture ...


    Learn SaltStack Enterprise by pagarcia

    Uyuni uses the open source version of Salt to i...


    Modernize Mash deployment by seanmarlow

    Mash is a Python based CI/CD pipeline for aut...


    Zero-ish downtime deploy on da cheap! by josegomezr

    Zero-ish downtime deploy on da cheap!

    This...


    Home assistant that doesn't spy on you - developer's edition by DKarakasilis

    There are various home assistant solutions out ...