Closed gzcwnk closed 5 years ago
@gzcwnk It's definitely possible to run the Salt master inside a Docker container, we provide Docker images but they're used for automated testing. Here is a fairly simple Dockerfile for running a Salt Master inside a container using supervisord to control it:
#
# Salt Stack Salt Master Container
#
FROM ubuntu:16.04
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y curl
RUN curl https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | apt-key add -
RUN echo "deb http://repo.saltstack.com/apt/ubuntu/16.04/amd64/latest xenial main" > /etc/apt/sources.list.d/salt.list
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y salt-master salt-syndic salt-minion salt-cloud supervisor python-pip
# Need 0.20.1 for GCE to work
RUN pip install apache-libcloud==0.20.1
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Run Command
CMD ["/usr/bin/supervisord"]
[supervisord]
nodaemon=true
[program:salt-master]
command=/usr/bin/salt-master
[program:salt-syndic]
command=/usr/bin/salt-syndic
[program:salt-minion]
command=/usr/bin/salt-minion
It's using Ubuntu but can easily be adapter to run another distribution.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.
Description of Issue/Question
Is this possible? advisable?
Our Salt-master setup is broken on RHEL6 due to a python in-compatibility issue. The way I see to fix this is move the salt-master to another server and I have a Debian 8/9 server available. In order to stop usch dependancy hells happening again is there an existing Salt master container anywhere I can simply use?
I have looked on Docker's site but I cant see anything that I can obviously use.
Setup
(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)
Steps to Reproduce Issue
(Include debug logs if possible and relevant.)
Versions Report
(Provided by running
salt --versions-report
. Please also mention any differences in master/minion versions.)