Search code examples
salt-project

How can I manage application binaries using SaltStack?


I would like to have Salt manage my application binaries that will be hosted on each minion. If possible, I would like Salt to:

  • Ensure my program is always running
  • Pull the latest binaries from the master server (but allow selecting application versions for specific minions)
  • Not have to host source code on the minions

What's the best way to do this with Salt? So far, I've thought of having Salt manage the binaries as regular files via the file.managed state, or creating a debian package and having Salt manage the app through the pkg module, or using the docker module (though all my minions will be identical, so using Docker seems like overkill). Is there a standard or "best-practice" way of letting Salt manage my application?


Solution

  • We create deb pkg and manage them just like any other. You can setup your own repo location with salt pretty easily.

    myrepo-custom:
      pkgrepo.managed:
        - key_url: https://myrepo.com/custom.gpg.key
        - name: deb https://myrepo.com/ trusty main