Public Repository

Last pushed: 2 years ago
Short Description
POC SaltMaster connected to hoolie-states github repo for state files.
Full Description

SSH CONFIG
Host github.com
Hostname github.com
StrictHostKeyChecking no
User git
IdentityFile /etc/salt/master.d/salt-poc-docker.priv
IdentitiesOnly yes

Host srv-poc
Hostname github.com
StrictHostKeyChecking no
User git
IdentityFile /etc/salt/master.d/salt-poc-srv.priv
IdentitiesOnly yes

START-SALT.SH

#! /bin/bash
/etc/init.d/ssh start
salt-master start &
salt-minion start &
salt-api start

DOCKER FILE BELOW

FROM ubuntu:14.04
MAINTAINER Robert Booth "rbooth@saltstack.com"

RUN mkdir -p /etc/pki/tls/certs && \
mkdir -p /srv/poc/pillar && \
mkdir -p /srv/poc/reactor

COPY start-salt.sh /tmp/
COPY sshconfig /root/.ssh/config
COPY localhost* /etc/pki/tls/certs/

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install curl openssh-server python-tornado python-pip python-git -y && \
rm /usr/sbin/policy-rc.d && \
chmod 700 /tmp/start-salt.sh

RUN pip install pyvmomi slackclient CherryPy

RUN useradd -c "SaltStack default user" -G adm,sudo -ms /bin/bash salt && \
echo "salt:saltme"|chpasswd

RUN curl -L https://bootstrap.saltstack.com -o install_salt.sh && \
sh install_salt.sh -P -d -M -i saltmaster -A 127.0.0.1 git v2015.8.3; exit 0

COPY master.d /etc/salt/master.d/

EXPOSE 4506 4505 22 80 8000
CMD sh /tmp/start-salt.sh

Docker Pull Command
Owner
saltme