David Williams
David Williams

Reputation: 8654

SaltStack: Getting Up and Running Minion on EC2

I am working through the SaltStack walk through to set up salt on my ec2 cluster. I just edited /etc/salt/minion and added the public dns of my salt master.

master: ec2-54-201-153-192.us-west-2.compute.amazonaws.com

Then I restarted the minion. In debug mode, this put out the following

$ sudo salt-minion -l debug
[DEBUG   ] Reading configuration from /etc/salt/minion
[INFO    ] Using cached minion ID: localhost.localdomain
[DEBUG   ] loading log_handlers in ['/var/cache/salt/minion/extmods/log_handlers', '/usr/lib/python2.6/site-packages/salt/log/handlers']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/log_handlers, it is not a directory
[DEBUG   ] None of the required configuration sections, 'logstash_udp_handler' and 'logstash_zmq_handler', were found the in the configuration. Not loading the Logstash logging handlers module.
[DEBUG   ] Configuration file path: /etc/salt/minion
[INFO    ] Setting up the Salt Minion "localhost.localdomain"
[DEBUG   ] Created pidfile: /var/run/salt-minion.pid
[DEBUG   ] Chowned pidfile: /var/run/salt-minion.pid to user: root
[DEBUG   ] Reading configuration from /etc/salt/minion
[DEBUG   ] loading grain in ['/var/cache/salt/minion/extmods/grains', '/usr/lib/python2.6/site-packages/salt/grains']
[DEBUG   ] Skipping /var/cache/salt/minion/extmods/grains, it is not a directory
[DEBUG   ] Attempting to authenticate with the Salt Master at 172.31.21.27
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem
[DEBUG   ] Loaded minion key: /etc/salt/pki/minion/minion.pem

Sure enough, 172.31.21.27 is the private ip of the master. So far this looks ok. According to the walkthrough, the next step is to accept the minions key on the master:

"Now that the minion is started it will generate cryptographic keys and attempt to 
connect to the master. The next step is to venture back to the master server and 
accept the new minion's public key."

However, when I go to the master node and look for new keys I don't see any pending requests.

$ sudo salt-key -L
Accepted Keys:
Unaccepted Keys:
Rejected Keys:

And the ping test does not see the minion either:

$ sudo salt '*' test.ping

This is where Im stuck, what should I do next to get up and running?

Upvotes: 1

Views: 2165

Answers (2)

Mo Ali
Mo Ali

Reputation: 629

You likely need to add rules for 4505/4506 between the salt master and minion security group. Salt master needs these ports to be able to communicate with the minions.

Upvotes: 0

nmadhok
nmadhok

Reputation: 1784

Turn off iptables and do salt-key -L to check if the key shows up. If it does, then you need to open port 4505 and 4506 on the master for the minion to be able to connect to it. You could do lokkit -p tcp:4505 -p tcp:4506 to open these ports.

Upvotes: 1

Related Questions