Aleksandr Rain
3 min readOct 28, 2021

--

Overview

Basic Docker Setup

Minion Direct To Mongo

Create Credentials For The Minions To Connect With

docker exec -it mongo bash
root@19ca06917037:/# mongosh
use salt-minions
db.createUser({user: "minion", pwd: "testpassword", roles: ["readWrite"]})

Minion Pre-Requisites

pip3 install pymongo

Make The Credentials Available To The Minions

Conf File

mongo.db: salt-minions
mongo.host: mongo-hostname.yourdomain.com
mongo.port: 27017
mongo.user: minion
mongo.password: testpassword

Grains

Pillar

mongo:
db: salt-minions
host: mongo-hostname.yourdomain.com
port: 27017
user: minion
password: testpassword

Send Data To Mongo

salt-call test.ping --return mongo

--

--

Aleksandr Rain
0 Followers

Climber, surfer, yogi, dad who does some IT on the side to get by.