Foreman and multiple Docker containers

I've been toying around with docker containers, and I've finally gotten
enough laying around that its become prudent to have foreman manage them.
However when I go to the containers screen I can only see the docker images
for the first container.

Anyone else having this problem?

No one here using the Foreman to manage Docker stuff?

··· On Wednesday, February 24, 2016 at 10:46:04 AM UTC+8, Robert Vernon wrote: > > I've been toying around with docker containers, and I've finally gotten > enough laying around that its become prudent to have foreman manage them. > However when I go to the containers screen I can only see the docker images > for the first container. > > Anyone else having this problem? >

Containers screen meaning '/containers'? When I go there I see a tab for
each Docker Compute Resource, and a list of all containers in each CR.

What do you mean when you say you see 'the docker images'?

I'd also recommend looking in Docker logs (journalctl -lf -u docker), in
case some call to the Docker daemon is not working for some reason.

··· On 02/26, Robert Vernon wrote: > No one here using the Foreman to manage Docker stuff? > > On Wednesday, February 24, 2016 at 10:46:04 AM UTC+8, Robert Vernon wrote: > > > > I've been toying around with docker containers, and I've finally gotten > > enough laying around that its become prudent to have foreman manage them. > > However when I go to the containers screen I can only see the docker images > > for the first container. > > > > Anyone else having this problem?


Daniel Lobato Garcia

@dLobatog
blog.daniellobato.me
daniellobato.me

GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

Yep
That's exactly what I meant. Basically I have 3 docker hosts, however
whenever I click on the tab for the other hosts I don't get any infomarion.
Also when adding the new docker hosts as Computer resources, I don't really
get much feedback when running the tests. I set this up with no user and no
password. Are they required to make this work correctly?

··· On Friday, February 26, 2016 at 5:45:41 PM UTC+8, Daniel Lobato wrote: > > On 02/26, Robert Vernon wrote: > > No one here using the Foreman to manage Docker stuff? > > > > On Wednesday, February 24, 2016 at 10:46:04 AM UTC+8, Robert Vernon > wrote: > > > > > > I've been toying around with docker containers, and I've finally > gotten > > > enough laying around that its become prudent to have foreman manage > them. > > > However when I go to the containers screen I can only see the docker > images > > > for the first container. > > > > > > Anyone else having this problem? > > Containers screen meaning '/containers'? When I go there I see a tab for > each Docker Compute Resource, and a list of all containers in each CR. > > What do you mean when you say you see 'the docker images'? > > I'd also recommend looking in Docker logs (journalctl -lf -u docker), in > case some call to the Docker daemon is not working for some reason. > > > -- > Daniel Lobato Garcia > > @dLobatog > blog.daniellobato.me > daniellobato.me > > GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30 > Keybase: https://keybase.io/elobato >

I keep getting these:

Feb 29 16:37:56 docker01 docker: time="2016-02-29T16:37:56.329128152+08:00"
level=info msg="GET /v1.15/version"
Feb 29 16:37:56 docker01 docker: time="2016-02-29T16:37:56.332740844+08:00"
level=info msg="POST /v1.15/auth"
Feb 29 16:37:59 docker01 docker: time="2016-02-29T16:37:59.183706855+08:00"
level=error msg="Handler for POST /v1.15/auth returned error: Wrong
login/password, please try again"
Feb 29 16:37:59 docker01 docker: time="2016-02-29T16:37:59.183798619+08:00"
level=error msg="HTTP Error" err="Wrong login/password, please try again"
statusCode=401
Feb 29 16:37:59 docker01 docker: time="2016-02-29T16:37:59.205331870+08:00"
level=info msg="POST /v1.15/auth"
Feb 29 16:38:01 docker01 docker: time="2016-02-29T16:38:01.314337516+08:00"
level=error msg="Handler for POST /v1.15/auth returned error: Wrong
login/password, please try again"
Feb 29 16:38:01 docker01 docker: time="2016-02-29T16:38:01.314490210+08:00"
level=error msg="HTTP Error" err="Wrong login/password, please try again"
statusCode=401

even tho I've set the docker user and the password. I can ssh into the
server as the user in question, and the user is in the docker group. The
user can also launch dcoker images from the command line.

··· On Monday, February 29, 2016 at 4:25:14 PM UTC+8, Robert Vernon wrote: > > Yep > That's exactly what I meant. Basically I have 3 docker hosts, however > whenever I click on the tab for the other hosts I don't get any infomarion. > Also when adding the new docker hosts as Computer resources, I don't really > get much feedback when running the tests. I set this up with no user and no > password. Are they required to make this work correctly? > > > On Friday, February 26, 2016 at 5:45:41 PM UTC+8, Daniel Lobato wrote: >> >> On 02/26, Robert Vernon wrote: >> > No one here using the Foreman to manage Docker stuff? >> > >> > On Wednesday, February 24, 2016 at 10:46:04 AM UTC+8, Robert Vernon >> wrote: >> > > >> > > I've been toying around with docker containers, and I've finally >> gotten >> > > enough laying around that its become prudent to have foreman manage >> them. >> > > However when I go to the containers screen I can only see the docker >> images >> > > for the first container. >> > > >> > > Anyone else having this problem? >> >> Containers screen meaning '/containers'? When I go there I see a tab for >> each Docker Compute Resource, and a list of all containers in each CR. >> >> What do you mean when you say you see 'the docker images'? >> >> I'd also recommend looking in Docker logs (journalctl -lf -u docker), in >> case some call to the Docker daemon is not working for some reason. >> >> >> -- >> Daniel Lobato Garcia >> >> @dLobatog >> blog.daniellobato.me >> daniellobato.me >> >> GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30 >> Keybase: https://keybase.io/elobato >> >

Mar 04 10:08:59 hkstgdocker01.dev docker[6072]:
time="2016-03-04T10:08:59.271809489+08:00" level=error msg="Handler for
POST /v1.15/auth returned error: Registration: "Missing username field""

That is what I get on the docker server when I try to register the docker
host as a Compute resource. However according to the docs here
<Foreman :: Plugin Manuals>
:
No user or password is specified.

Procedure 1.2. To Create a Docker Compute Resource:
>
> 1. Make sure the port 5000 is enabled on the Foreman server. The
> container host uses this port to pull images from Content Views on the
> Foreman server.
> 2. Create the compute resource. Specify the resource URL according to
> the location of the container host:
> - If the container host is on the same machine as the Foreman
> server, set unix://var/run/docker.sock as the resource URL.
> -
>
> If the container host is on a different machine than the Foreman
> server, specify the URL in the form of:
>
> http://[container_host_fqdn]:[PORT_NUMBER]
>
> Here, [container_host_fqdn] and [PORT_NUMBER] stand for the fully
> qualified domain name of the container host and the port number opened on
> the container host for communication with Foreman.
> 3. Click Test Connection to test if the container host is available.
> 4. Click Submit to create the compute resource.
>
> So I created a local user on the machine, and tried that. here is the
error message I got:

Mar 04 10:18:35 hkstgdocker01.dev.hk.eclipseoptions.com docker[6072]:
time="2016-03-04T10:18:35.956003716+08:00" level=error msg="Handler for
POST /v1.15/auth returned error: Wrong login/password, please try again"

I guess what I want to know is: What user/password/email is Foreman passing
to the docker host? In my case it seems that my docker host is expecting
one thing and Foreman is sending something else.

<https://lh3.googleusercontent.com/-CqH1dd5nQiM/VtjyePLA9QI/AAAAAAAAFUY/SzaN6uJH5XA/s1600/foreman-docker-question.jpg>

By the way I can start new Docker containers on this docker host from
docker clients on other servers – with no user and password specified.

Okay —

So the user and password and email is not for foreman + not for docker +
but for Docker HUB

:frowning:

I created an account there and now I don't get the auth errors any more –
However the tab on the top of the window still doesn't show me containers
on my various docker hosts. It seems like it only requests updates from the
first host on the page

This link:
https://foreman/containers

This link does not:
https://foreman/containers#hkstgdocker02.dev.hk

Whichever compute resource was configured first always renders correctly,
any others fail.

I meant to say:

This link WORKS only for the first Docker computer resource:
https://foreman/containers

This link does not if it is the second or greater resource:
https://foreman/containers#hkstgdocker02.dev.hk

Whichever compute resource was configured first always renders correctly,
any others fail.

Bug? I think not because Daniel says he can see his other Docker hosts. I
just don't know what the problem is.

··· On Friday, March 4, 2016 at 3:04:55 PM UTC+8, Robert Vernon wrote: > > This link: > https://foreman/containers > > This link does not: > https://foreman/containers#hkstgdocker02.dev.hk > > Whichever compute resource was configured first always renders correctly, > any others fail. >