docker: document remote workers, no shared pool directory
ClosedPublic

Authored by adamwill on Oct 8 2015, 10:40 PM.

Details

Summary

This commit is all about allowing remote worker containers in
the Docker deployment scenario: worker containers running on
hosts other than the host of the web UI container.

First we ditch the /var/lib/openqa/pool volume from the web UI
container. There is actually no need ever to share this between
workers, because each worker is already isolated within its own
container and can happily have its own pool directory in there.
Effectively, even when all the worker instances are run on the
same Docker host, they're still all separate systems so far as
the web UI / scheduler is concerned. Obviously it can't be
shared this way for workers on remote hosts, so just get rid of
it.

Other than that this is all documentation changes. Mostly just
explaining how to do remote workers, but I also changed the
web UI container instructions to bind ports 80 and 443 on the
host; the worker instances expect the host to be listening on
port 80, in the single-host-box scenario this was covered with
the use of --link but that doesn't work when the worker's on
a different host.

I also updated all the docker image tags to ':latest' - this
seemed sensible, but yell if it's wrong.

Test Plan

Follow the instructions and see if you can actually
get remote workers to, well, work. I did get it going in the
infra cloud.

Diff Detail

Repository
rOPENQA fedora_openqa
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to docker: document remote workers, no shared pool directory.Oct 8 2015, 10:40 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: garretraziel, jskladan.
garretraziel accepted this revision.Oct 9 2015, 10:21 AM

Aside inline comments, looks good to me.

docker/README.md
8–10

There is actually no need in using tag at all (if no tag is given, :latest is downloaded automatically), but it won't hurt either.

51–53

Maybe add warning that root privileges are needed to bind on port 80 and 443?

76

I assume that you've removed worker number at the end on purpose. I'm ok with it, but will it not be a problem in WebUI (that there are several worker:1 instances)? For example in workers tab in admin etc.

This revision is now accepted and ready to land.Oct 9 2015, 10:21 AM
adamwill added inline comments.Oct 9 2015, 3:38 PM
docker/README.md
8–10

Ah, OK, I'll change that. I guess if we don't specify a tag it gives us some ability to control what will be downloaded from the other end?

51–53

Sure. It looked to me like running Docker as anything other than root was kind of a waste of time anyway...

76

No; it identifies workers as hostname:workerid . That's why we say lower down to make sure each worker instance has a different hostname.

If we're containerizing the workers I can't see any particular reason to run more than one worker in each container, I mean, why not just make it one worker per container? Nice and clean that way. The way the Dockerfiles are set up does not actually let you create more than one worker per container anyhow: even in your original one-Docker-host case, you were still effectively creating one new 'host' (Docker instance) per worker, so you had worker openqa_worker_1:1 , worker openqa_worker_2:2 , worker openqa_worker_3:3 and so on.

This revision was automatically updated to reflect the committed changes.
garretraziel added inline comments.Oct 15 2015, 11:27 AM
docker/README.md
8–10

Exactly. We are planning to tag each build with proper version (version of openQA that's inside) so we could request specific openQA version, but if you left out tag when pulling, it automatically pulls "latest" tag (and I think that that's the behavior user would want).

51–53

At least me and Josef added our accounts to docker group so you could run every command without root access.

76

Ok, I don't know how you get the idea we are planning to run more than one worker in one container, but we are certainly not :-). One worker per one container, how it should be with Docker, nice and clean :-). I only thought that workers should have different ID even when they are running on separate hosts (as long as they are connecting to same webui). But if they don't, it's only better.