How do you add existing Salt minions?

Hi,

I've got Foreman up and running on my Salt master server and have the
two Salt plugins installed but I have three minions that aren't being
picked up.

You can see that they exist:

root@saltmaster [~]

salt-key

Accepted Keys:
test-vmserver
dell-r720
saltminion1
Unaccepted Keys:
Rejected Keys:

Maybe I don't have the smart proxy configured properly? I created one
with the URL being the hostname of the Salt master, port 8443. If I
go to Infrastructure > Smart proxies, I can see the minions if I click
the Salt Keys button.

But in Foreman, the only host that is displayed is the salt master
itself. I know I must be just missing something but I've read the
docs and can't figure out exactly what it is. Can anyone point me in
the right direction?

Thanks!

> Hi,
>
> I've got Foreman up and running on my Salt master server and have the
> two Salt plugins installed but I have three minions that aren't being
> picked up.
>
> You can see that they exist:
>
> root@saltmaster [~]
> # salt-key
> Accepted Keys:
> test-vmserver
> dell-r720
> saltminion1
> Unaccepted Keys:
> Rejected Keys:
>
> Maybe I don't have the smart proxy configured properly? I created one
> with the URL being the hostname of the Salt master, port 8443. If I
> go to Infrastructure > Smart proxies, I can see the minions if I click
> the Salt Keys button.
>
> But in Foreman, the only host that is displayed is the salt master
> itself. I know I must be just missing something but I've read the
> docs and can't figure out exactly what it is. Can anyone point me in
> the right direction?

Foreman will automatically create the hosts when it gets a highstate
report or grains.

Have you configured /etc/salt/master as per the wiki?
https://github.com/theforeman/foreman_salt/wiki#2-installation

If so, then this will create the hosts:

salt '*' state.highstate

upload-salt-reports

··· On Thu, Feb 12, 2015 at 12:12:14PM -0700, Bryan Arenal wrote:

Thanks!


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

I'm sorry for the annoying newbie questions. I think I'm almost
there, I'm just having a hard time figuring this part out.

I did and have those entries in my /etc/salt/master:

root@saltmaster [~]

cat /etc/salt/master

autosign_file: /etc/salt/autosign.conf

master_tops:
ext_nodes: /usr/bin/foreman-node

ext_pillar:

  • puppet: /usr/bin/foreman-node

I also updated my foreman.yaml and restarted the foreman-proxy service.

But I think I've just got something not quite right because running
'salt '*' state.highstate, they all return errors:

salt '*' state.highstate

saltminion1:

··· On Thu, Feb 12, 2015 at 12:34 PM, Stephen Benjamin wrote: > On Thu, Feb 12, 2015 at 12:12:14PM -0700, Bryan Arenal wrote: >> Hi, >> >> I've got Foreman up and running on my Salt master server and have the >> two Salt plugins installed but I have three minions that aren't being >> picked up. >> >> You can see that they exist: >> >> root@saltmaster [~] >> # salt-key >> Accepted Keys: >> test-vmserver >> dell-r720 >> saltminion1 >> Unaccepted Keys: >> Rejected Keys: >> >> Maybe I don't have the smart proxy configured properly? I created one >> with the URL being the hostname of the Salt master, port 8443. If I >> go to Infrastructure > Smart proxies, I can see the minions if I click >> the Salt Keys button. >> >> But in Foreman, the only host that is displayed is the salt master >> itself. I know I must be just missing something but I've read the >> docs and can't figure out exactly what it is. Can anyone point me in >> the right direction? > > > Foreman will automatically create the hosts when it gets a highstate > report or grains. > > Have you configured /etc/salt/master as per the wiki? > https://github.com/theforeman/foreman_salt/wiki#2-installation > > If so, then this will create the hosts: > > # salt '*' state.highstate > # upload-salt-reports
      ID: states
Function: no.None
  Result: False
 Comment: No Top file or external nodes data matches found
 Started:
Duration:
 Changes:

Summary

Succeeded: 0
Failed: 1

Total states run: 1
test-vmserver:

      ID: states
Function: no.None
  Result: False
 Comment: No Top file or external nodes data matches found
 Started:
Duration:
 Changes:

Summary

Succeeded: 0
Failed: 1

Total states run: 1
dell-r720:

      ID: states
Function: no.None
  Result: False
 Comment: No Top file or external nodes data matches found
 Started:
Duration:
 Changes:

Summary

Succeeded: 0
Failed: 1

Total states run: 1

Again, I apologize for the newbie questions. I know how painful they
can be. But thank you for your help.

Cheers

> >> Hi,
> >>
> >> I've got Foreman up and running on my Salt master server and have the
> >> two Salt plugins installed but I have three minions that aren't being
> >> picked up.
> >>
> >> You can see that they exist:
> >>
> >> root@saltmaster [~]
> >> # salt-key
> >> Accepted Keys:
> >> test-vmserver
> >> dell-r720
> >> saltminion1
> >> Unaccepted Keys:
> >> Rejected Keys:
> >>
> >> Maybe I don't have the smart proxy configured properly? I created one
> >> with the URL being the hostname of the Salt master, port 8443. If I
> >> go to Infrastructure > Smart proxies, I can see the minions if I click
> >> the Salt Keys button.
> >>
> >> But in Foreman, the only host that is displayed is the salt master
> >> itself. I know I must be just missing something but I've read the
> >> docs and can't figure out exactly what it is. Can anyone point me in
> >> the right direction?
> >
> >
> > Foreman will automatically create the hosts when it gets a highstate
> > report or grains.
> >
> > Have you configured /etc/salt/master as per the wiki?
> > https://github.com/theforeman/foreman_salt/wiki#2-installation
> >
> > If so, then this will create the hosts:
> >
> > # salt '' state.highstate
> > # upload-salt-reports
>
> I'm sorry for the annoying newbie questions. I think I'm almost
> there, I'm just having a hard time figuring this part out.
>
> I did and have those entries in my /etc/salt/master:
>
> root@saltmaster [~]
> # cat /etc/salt/master
>
> autosign_file: /etc/salt/autosign.conf
>
> master_tops:
> ext_nodes: /usr/bin/foreman-node
>
> ext_pillar:
> - puppet: /usr/bin/foreman-node
>
> I also updated my foreman.yaml and restarted the foreman-proxy service.
>
> But I think I've just got something not quite right because running
> 'salt '
' state.highstate, they all return errors:
>
> # salt '*' state.highstate
> saltminion1:
> ----------
> ID: states
> Function: no.None
> Result: False
> Comment: No Top file or external nodes data matches found
> Started:
> Duration:
> Changes:
>
> Summary
> ------------
> Succeeded: 0
> Failed: 1
> ------------
> Total states run: 1
> test-vmserver:
> ----------
> ID: states
> Function: no.None
> Result: False
> Comment: No Top file or external nodes data matches found
> Started:
> Duration:
> Changes:
>
> Summary
> ------------
> Succeeded: 0
> Failed: 1
> ------------
> Total states run: 1
> dell-r720:
> ----------
> ID: states
> Function: no.None
> Result: False
> Comment: No Top file or external nodes data matches found
> Started:
> Duration:
> Changes:
>
> Summary
> ------------
> Succeeded: 0
> Failed: 1
> ------------
> Total states run: 1
>
> Again, I apologize for the newbie questions. I know how painful they
> can be. But thank you for your help.

That's fine, that just means you haven't assigned any states to the
systems. But after running that, run 'upload-salt-reports' (that is
also in a cron in /etc/crond.d/smart_proxy_salt every ~30 minutes by
default).

After the report is uploaded, you should see dell-r720 in Foreman and
then can use them.

If that doesn't work, any errors in /var/log/foreman/production.log?

··· On Thu, Feb 12, 2015 at 01:42:50PM -0700, Bryan Arenal wrote: > On Thu, Feb 12, 2015 at 12:34 PM, Stephen Benjamin wrote: > > On Thu, Feb 12, 2015 at 12:12:14PM -0700, Bryan Arenal wrote:

Cheers


You received this message because you are subscribed to the Google Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.