-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactoring/#258 used a non root user to run jupyter in the docker image ai lab #231
Merged
ckunki
merged 40 commits into
main
from
refactoring/#258-Used_a_non-root_user_to_run_Jupyter_in_the_Docker_Image_ai-lab
Feb 29, 2024
Merged
Changes from 11 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
7bacff9
Use separate user for running Jupyter
ckunki 6663562
Used a non-root user to run Jupyter in the Docker Image ai-lab
ckunki 194e9d1
Additional changes based on experiments
ckunki 5befe3e
Fixed ansible tasks
ckunki 1e510fc
remove commented line
ckunki 69de9d8
Added become for disabling core dumps
ckunki d9eed17
poetry lock
ckunki af1a929
Fixed test
ckunki c776849
Improved Ansible output for pip install
ckunki 36117ea
Improved Ansible output for pip install
ckunki 5229b26
Merge branch 'main' into refactoring/#258-Used_a_non-root_user_to_run…
ckunki 2304741
Removed test scaffolds
ckunki b030baf
Capitalized name of Ansible task
ckunki a66235d
Updated comments in Ansible tasks
ckunki 71ecf25
Updated user guide for Docker Edition
ckunki 514cdd0
Updated tests for docker Edition
ckunki 50b4432
Increased time out for commiting the Docker container
ckunki b595ae6
Added comment for timeout
ckunki 97b5635
Show name of docker container when keeping it alive
ckunki b8229da
Moved integration/test_create_dss_docker_image to codebuild
ckunki f347df9
[CodeBuild]
ckunki e0a0cae
Fixed import for ci tests
ckunki dc426ad
[CodeBuild]
ckunki c254cee
Updated dependencies to fix vulnerabilities
ckunki 0235d4d
[CodeBuild]
ckunki 92781ad
Added free disk space to workflows/check_ci.yaml
ckunki 62004a3
Use user "jupyter" for EC2, too
ckunki 3c19388
Updated documentation
ckunki d9d6205
[CodeBuild]
ckunki 7ee7abf
Updated dependency network-manager
ckunki 887d558
[CodeBuild]
ckunki 8ace780
Fixed test test_jupyter_password_message_shown
ckunki 427696b
Removed comment
ckunki 3467495
Merge branch 'main' into refactoring/#258-Used_a_non-root_user_to_run…
ckunki 524656a
Fixed review findings
ckunki dfb6b5e
Fixed review findings
ckunki 0574c95
Update exasol/ds/sandbox/runtime/ansible/roles/jupyter/templates/etc/…
ckunki 1778e81
Fixed review finding
ckunki b10fa2e
Fixed failing test
ckunki ab3b254
Merge branch 'main' into refactoring/#258-Used_a_non-root_user_to_run…
ckunki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- name: Update and upgrade apt packages | ||
apt: | ||
upgrade: yes | ||
update_cache: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- name: Add user 'jupyter' for running jupyter | ||
ansible.builtin.user: | ||
name: "{{ user_name }}" | ||
home: "{{ user_home }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
exasol/ds/sandbox/runtime/ansible/roles/ansible_access/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
|
||
apt_dependencies: | ||
- sudo=1.8.31-1ubuntu1.5 |
16 changes: 16 additions & 0 deletions
16
exasol/ds/sandbox/runtime/ansible/roles/ansible_access/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- name: Install sudo | ||
apt: | ||
name: "{{apt_dependencies}}" | ||
state: latest | ||
install_recommends: false | ||
|
||
- name: Add dedicated user for executing ansible tasks | ||
ansible.builtin.user: | ||
name: "{{ my_ansible_user }}" | ||
- name: Add to sudoers | ||
community.general.sudoers: | ||
name: Add user ansible | ||
user: "{{ my_ansible_user }}" | ||
state: present | ||
nopassword: true | ||
commands: ALL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
regexp: ^[^#].*core | ||
line: '* hard core 0' | ||
create: true | ||
become: "{{ need_sudo }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
exasol/ds/sandbox/runtime/ansible/roles/jupyter/defaults/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
exasol/ds/sandbox/runtime/ansible/roles/jupyter/tasks/install-pip-packages.yml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
exasol/ds/sandbox/runtime/ansible/roles/jupyter/tasks/pip-install.yml
ckunki marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
|
||
- name: Copy requirements file {{ requirements_file }} | ||
ansible.builtin.copy: | ||
src: "{{requirements_file}}" | ||
dest: "/tmp/{{requirements_file}}" | ||
mode: 0644 | ||
register: copy_req_file | ||
|
||
- name: Call pip install {{ requirements_file }} | ||
ansible.builtin.pip: | ||
requirements: "{{ copy_req_file.dest }}" | ||
state: latest | ||
virtualenv: "{{jupyterlab_virtualenv}}" | ||
virtualenv_python: python3.8 | ||
become: "{{need_sudo}}" | ||
|
||
- name: Remove requirements file {{ requirements_file }} | ||
ansible.builtin.file: | ||
path: "{{ copy_req_file.dest }}" | ||
state: absent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I added these lines to speed up testing Ansible tasks