-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement dockerhost.yml playbook for systems running static docker containers for test #1925
Conversation
Signed-off-by: Stewart X Addison <[email protected]>
Signed-off-by: Stewart X Addison <[email protected]>
Signed-off-by: Stewart X Addison <[email protected]>
Signed-off-by: Stewart X Addison <[email protected]>
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:
|
Signed-off-by: Stewart X Addison <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
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_etc
role which contains the items from Common which make changes to the systemhostname
etc. (Since we don't want all of theCommon
things in thedockerhost.yml
crontab_patching
things from Common to theCrontab
role so that it doesn't requireCommon
to 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_etc
role. 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)