Skip to content

Latest commit

 

History

History
99 lines (66 loc) · 1.55 KB

File metadata and controls

99 lines (66 loc) · 1.55 KB

beacon-reactor-runner

Setup

Start master container:

docker run --rm -d \
    -v $(pwd)/master/etc:/root/etc \
    -v $(pwd)/master/srv:/srv \
    -h dev-salt-master \
    --name dev-salt-master \
    simplyadrian/allsalt:debian_master_2017.7.2
docker exec -it dev-salt-master bash

Start minion container:

docker run --rm -d \
    -v $(pwd)/minion/etc:/root/etc \
    -h dev-ubuntu-minion \
    --name dev-ubuntu-minion \
    simplyadrian/allsalt:ubuntu_minion_2017.7.2
docker exec -it dev-ubuntu-minion bash

Do things on the master

Accept the keys:

salt-key
salt-key -A -y
salt dev-ubuntu-minion test.ping

Install vim:

salt '*' pkg.install vim refresh=True
salt dev-ubuntu-minion pkg.install python-pyinotify

Reactor config:

cp /root/etc/salt/master.d/reactor.conf /etc/salt/master.d/reactor.conf

Runner config:

cp /root/etc/salt/master.d/runners.conf /etc/salt/master.d/runners.conf

Do things on the minion

Beacon config:

mkdir -p /srv/.cark-logs
cp /root/etc/salt/minion.d/beacons.conf /etc/salt/minion.d/beacons.conf

Restart master and minion containers

docker restart dev-salt-master
docker restart dev-ubuntu-minion

Run it

View events on the master

salt-run state.event pretty=true

Trigger the beacon from the minion

touch /srv/.cark-logs/.cyberark_api_call.log

Watch the event log

When it's done cat the file:

cat /srv/.cark-logs/.cyberark_api_call.log