Implement dockerhost.yml playbook for systems running static docker containers for test#1925
Implement dockerhost.yml playbook for systems running static docker containers for test#1925karianna merged 6 commits intoadoptium:masterfrom
Conversation
Signed-off-by: Stewart X Addison <sxa@redhat.com>
Signed-off-by: Stewart X Addison <sxa@redhat.com>
Signed-off-by: Stewart X Addison <sxa@redhat.com>
Signed-off-by: Stewart X Addison <sxa@redhat.com>
7aabfa1 to
aed49ac
Compare
|
Not quite sure yet what it's complaining about - ansible-lint does not object in the same way when run on my local machine. |
9528afc to
a1ebdfe
Compare
2aaad9d to
c93f2c7
Compare
|
NOTE TO REVIEWERS:
|
aahlenst
left a comment
There was a problem hiding this comment.
My comments regarding the Ubuntu Docker file apply to all to Ubuntu/Debian Docker files.
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.u1604
Outdated
Show resolved
Hide resolved
| # Clear up space | ||
| RUN rm /tmp/jdk8.tar.gz /tmp/ant.zip /tmp/ant-contrib.tgz | ||
| # Set up jenkins user | ||
| RUN useradd -m -d /home/jenkins jenkins |
There was a problem hiding this comment.
We should predefine a UID/GID that does ideally not collide with a host UID/GID. One popular recommendation is to use 10000.
There was a problem hiding this comment.
Since these containers are fully isolated and not sharing the file system with the host (unlike the build ones) that shouldn't be a concern for these.
There was a problem hiding this comment.
According to my understanding, you can still escape from the container and end up with the same UID on the host as in the container as long as Docker user namespacing isn't active and configured. If I read the Dockerfile correctly, sshd is run as root, anyway, so it might make sense to tackle this in a separate PR if we really need sshd.
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.u1604
Show resolved
Hide resolved
ansible/playbooks/AdoptOpenJDK_Unix_Playbook/roles/DockerStatic/Dockerfiles/Dockerfile.u1604
Show resolved
Hide resolved
…st role Signed-off-by: Stewart X Addison <sxa@redhat.com>
Checklist
This adds in a new playbook for creating a "Docker-only" host which holds statically built containers used to run testing (Formalises what was prototyped in issue 1809). It contains:
adopt_etcrole which contains the items from Common which make changes to the systemhostnameetc. (Since we don't want all of theCommonthings in thedockerhost.ymlcrontab_patchingthings from Common to theCrontabrole so that it doesn't requireCommonto be executed first (makes the role self-sufficient)To be addressed (potentially later - these would be good "introductory" things for new people to resolve):
adopt_etcrole. Related: Investigate and fix openj9 sanity functional test failures when run in docker containers aqa-tests#791 test-aws-rhel8-x64-1 - tests which create core files fail #1829 (comment)