Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

1- Old Juniper option

2- other 



https://dev.to/trickvi/let-s-get-started-with-salt-55hb
pull the Master containerdocker pull datica/salt-master
start the container

docker run -it  datica/salt-master bash

edit the /etc/salt/master file

vi /etc/salt/master


mount the local file to container directory
start the master daemonsalt-minion -l debug  [ debug mode ]    or     salt-minion -d  [ deamon mode ]
accept the key

salt-key L

salt-key -a fw1   or -A for all

pull the Minion containerdocker pull datica/salt-minion



https://hub.docker.com/r/juniper/saltstack
pull the image
create/run the container

docker run -it -d -v $PWD:/etc/salt/ juniper/saltstack salt-master -l debug

#docker run -d juniper/saltstack salt-master -l debug

log into the containerdocker exec -it <container_Name>

/home/labuser/.local/bin/salt-key
start minion

salt-minion -d  [ deamon mode ]  or  -l debug 

salt-key -l  and salt-key -A  [ all keys ]
salt '*' test.ping
salt '*' grains.items

start proxy

salt-proxy 

salt-key -l  and salt-key -A -y    [ all keys ]
salt '*' test.ping
salt '*' grains.items



Issue : python interpreter

/home/labuser/.local/bin/master

/home/labuser/.local/bin/salt-key

issue
labuser@saltsackmaster:/etc/salt$ salt --version
-bash: /home/labuser/.local/bin/salt: /usr/bin/python: bad interpreter: No such file or directory



labuser@saltsackmaster:/etc/salt$ vi /home/labuser/.local/bin/salt
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import re
import sys
from salt.scripts import salt_main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(salt_main())

https://hub.docker.com/r/saltstack/salt
pull the image
create/run the container

install junos-eznc

+



log into the container








  • No labels