Add hosts to foreman not showing in GUI

Im new to foreman -and katello- and I was triying to add some hosts using
Puppet.
I have 2 virtual machines with this features:

machine1: has a Centos 7, Foreman 1.10.11, Puppet version 3.8.5
machine2: has a Centos 7, Puppet version 3.8.5

I follow the steps specified in foreman's documentation section 2.2 Puppet
Management and I was able to sing the certificate request of machine2 in
the web interface of machine1. Unfortunately machine2 was not listed in the
Hosts section of Foreman's web interface.

Am I missing something in the process of adding an existing host in
Foreman?
Also: do this same process works on a server running Katello to?

As I said before Im new to this topic aso any help will be appreciate!

Carlos Mata

1 Like

>
> Im new to foreman -and katello- and I was triying to add some hosts using
> Puppet.
> I have 2 virtual machines with this features:
>
> machine1: has a Centos 7, Foreman 1.10.11, Puppet version 3.8.5
> machine2: has a Centos 7, Puppet version 3.8.5
>
> I follow the steps specified in foreman's documentation section 2.2
> Puppet Management and I was able to sing the certificate request of
> machine2 in the web interface of machine1. Unfortunately machine2 was not
> listed in the Hosts section of Foreman's web interface.
>

if you are in an org/location context, try changing to any context, as
imported hosts usually are not assigned to an org (they can be if you
specify the custom fact).

Ohad

··· On Tue, Mar 8, 2016 at 2:59 AM, Carlos Mata wrote:

Am I missing something in the process of adding an existing host in
Foreman?
Also: do this same process works on a server running Katello to?

As I said before Im new to this topic aso any help will be appreciate!

Carlos Mata


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 https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thank you very much for your answer Ohad, unfortunately it didn't solve my
problem, and when I tried to do apply it on a server with Katello I failed.

My main objective is this one: add several existing machines as content
host and also as hosts in a Katello server. I already succeeded on the
former but I don't know how to do it on the latter. I've read that
developers are planning to unify those two concepts on future versions of
Katello.

Having said that… what is the best way to add existing hosts in Katello?
Should I add them using Puppet as specified in foreman's documentation
section 2.2 (Puppet Management). Or should I do it with the
foreman_discovery plugin wich Katello includes?
Are there more options to achieve this?

Again any help will be appreciated!
Carlos Mata

has there been any update on this?
I have also been able to sign the certificate but not able to see the host on the dashboard or anywhere else.

I have done a lot of googling but haven’t found a solution yet.

The puppet side of foreman or katello side?

If puppet what does puppet agent —test do / say?

Thanks for your reply Jon.

Just the puppet side. I’m not using Katello.

when I run puppet agent --test on the puppet agent, i get the following error:

Error: Could not request certificate: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)
Exiting; failed to retrieve certificate and waitforcert is disabled

I have signed the certificate under smart proxy in Foreman. My puppet.conf on puppet agent vm looks like following: (the server ip and cert name are not real for privacy purposes :slight_smile: )

[main]
    server = puppetmasterURL.com
    show_diff = true

[agent]
    certname = puppetmasterURL.com
    environment = Testing
    runinterval = 30m

I believe the certname is the name of your node not your server.

For example here is mine puppet 6 client.

[main]
certname = test-sensor.ensco.win
server = puppet.ensco.win
environment = production
runinterval = 1h
report = true

Is your deployment a new deployment and this is node 1 or you have a bunch and this one just can’t get added?

I am pretty new to puppet myself (3 weeks) but trying to help.

Considering that the certname is the name of your node not your server, could you please confirm that if you have port 8140 listening on your server?