-
Notifications
You must be signed in to change notification settings - Fork 38
Enable EESSI proxy by default #876
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
Merged
Merged
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
8fe4bab
add support for default eessi proxy config to squid role
sjpb f0bd623
make eeesi/squid autoconfigure for proxy
sjpb b917e04
add missing eessi cvmfs config template
sjpb 731f020
address linter docs errors
sjpb db44f2b
stop textlint changing 'local storage' to 'localStorage'
sjpb 81d24e2
Revert "stop textlint changing 'local storage' to 'localStorage'"
sjpb f397e49
work around textlint changing 'local storage' to 'localStorage'
sjpb faacea3
fix ansible-lint errors
sjpb 6f66d68
Merge branch 'main' into feat/eessi-proxy
sjpb 6d26824
after self-review of PR
sjpb 3459dff
configure stackhpc env to use control node as eeesi proxy
sjpb 42c9c2a
simplify eessi production docs
sjpb 95e8d01
simplify subnet TF inventory var
sjpb 780bfcf
tofu fmt
sjpb f792759
deploy squid on control node by default
sjpb 59bf7a6
default squid to eessi config and make squid config more flexible
sjpb f039c08
set sensible squid disk cache size for stackhpc CI
sjpb 79a8898
fix linter errors
sjpb cd006d8
fix lint errors (2)
sjpb 6f45efc
update superlinter version in docs
sjpb 801b4e8
Revert "fix linter errors" - was run with older superlinter version
sjpb a8c04db
fix lint errors (again)
sjpb ca8f935
add eessi checks back to CI
sjpb 2daf71e
don't try to configure squid during build - need TF-templated vars
sjpb 1a75639
fix lint errors
sjpb 225a388
Merge branch 'main' into feat/eessi-proxy
sjpb c3ad1e5
try to fix ansible-lint thinking appliances_mode is undefined
sjpb 95a36f5
try to fix ansible-lint by passing inventory
sjpb 6f64a78
try to fix ansible lint via configuring extra_vars for it
sjpb 42dbf21
try another way
sjpb c5e31eb
fix autoselection of squid nodes for eessi proxy
sjpb af938c8
bump CI image
sjpb 7ca6497
fix general mode squid template
sjpb 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,52 +1,30 @@ | ||
| --- | ||
| - name: Run EESSI test job | ||
| hosts: login[0] | ||
| become: true | ||
| gather_facts: false | ||
| become_user: demo_user | ||
| vars: | ||
| eessi_test_rootdir: /home/eessi_test | ||
| eessi_test_module: GCCcore/12.2.0 | ||
| tasks: | ||
| - name: Create test root directory | ||
| ansible.builtin.file: | ||
| path: "{{ eessi_test_rootdir }}" | ||
| state: directory | ||
| owner: "{{ ansible_user }}" | ||
| group: "{{ ansible_user }}" | ||
| mode: "0755" | ||
| become: true | ||
| - name: Activate EESSI and load GCC | ||
| ansible.builtin.shell: | ||
| cmd: >- | ||
| bash -lc ' | ||
| source /cvmfs/software.eessi.io/versions/2023.06/init/bash && | ||
| module load {{ eessi_test_module }} && | ||
| module list | ||
| ' | ||
| register: eeesi_modules | ||
| changed_when: true | ||
|
|
||
| - name: Clone eessi-demo repo # noqa: latest[git] | ||
| ansible.builtin.git: | ||
| repo: "https://github.com/eessi/eessi-demo.git" | ||
| dest: "{{ eessi_test_rootdir }}/eessi-demo" | ||
|
|
||
| - name: Create batch script | ||
| ansible.builtin.copy: | ||
| dest: "{{ eessi_test_rootdir }}/eessi-demo/TensorFlow/tensorflow.sh" | ||
| content: | | ||
| #!/usr/bin/env bash | ||
| #SBATCH --output=%x.out | ||
| #SBATCH --error=%x.out | ||
| source /cvmfs/pilot.eessi-hpc.org/latest/init/bash | ||
| srun ./run.sh | ||
| mode: "0644" | ||
|
|
||
| - name: Run test job # noqa: no-changed-when | ||
| ansible.builtin.command: | ||
| cmd: sbatch --wait tensorflow.sh | ||
| chdir: "{{ eessi_test_rootdir }}/eessi-demo/TensorFlow" | ||
| register: job_output | ||
|
|
||
| - name: Retrieve job output | ||
| ansible.builtin.slurp: | ||
| src: "{{ eessi_test_rootdir }}/eessi-demo/TensorFlow/tensorflow.sh.out" | ||
| register: _tensorflow_out | ||
| no_log: true # as its base64 encoded so useless | ||
|
|
||
| - name: Show job output | ||
| ansible.builtin.debug: | ||
| msg: "{{ _tensorflow_out.content | b64decode }}" | ||
|
|
||
| - name: Fail if job output contains error | ||
| ansible.builtin.fail: | ||
| # Note: Job prints live progress bar to terminal, so use regex filter to remove this from stdout | ||
| msg: "Test job using EESSI modules failed. Job output was: {{ job_output.stdout | regex_replace('\b', '') }}" | ||
| when: '"Epoch 5/5" not in _tensorflow_out.content | b64decode' | ||
| - name: Ensure module loaded (shown in stderr) | ||
| ansible.builtin.assert: | ||
| that: eessi_test_module in eeesi_modules.stderr | ||
| fail_msg: | | ||
| Expected: '{{ eessi_test_module }}' | ||
| Got: {{ eeesi_modules.stderr }} | ||
| vars: | ||
| expected_output: | | ||
| Currently Loaded Modules: | ||
| 1) GCCcore/12.2.0 |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,12 +1,17 @@ | ||
| --- | ||
| cvmfs_release_version: "6-3" | ||
|
|
||
| # Default to 10GB | ||
| cvmfs_quota_limit_mb: 10000 | ||
|
|
||
| cvmfs_config_default: | ||
| cvmfs_quota_limit_mb: 10000 # local cache soft quota in MB (default 10GB) | ||
| cvmfs_config_single: | ||
| CVMFS_CLIENT_PROFILE: single | ||
| CVMFS_QUOTA_LIMIT: "{{ cvmfs_quota_limit_mb }}" | ||
|
|
||
| cvmfs_http_proxy: '' # as per docs, quotes are added automatically | ||
| # See https://www.eessi.io/docs/getting_access/native_installation/#configuring-your-client-to-use-a-squid-proxy | ||
| cvmfs_config_proxy: | ||
| CVMFS_QUOTA_LIMIT: "{{ cvmfs_quota_limit_mb }}" | ||
| CVMFS_HTTP_PROXY: "'{{ cvmfs_http_proxy }}'" | ||
|
|
||
| cvmfs_config_default: "{{ cvmfs_config_single if cvmfs_http_proxy == '' else cvmfs_config_proxy }}" | ||
| cvmfs_config_overrides: {} | ||
| cvmfs_config: "{{ cvmfs_config_default | combine(cvmfs_config_overrides) }}" |
This file contains hidden or 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 hidden or 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,3 @@ | ||
| {% for k, v in cvmfs_config.items() %} | ||
| {{ k }}={{ v }} | ||
| {% endfor %} | ||
This file contains hidden or 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 hidden or 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 hidden or 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,28 @@ | ||
| # From https://www.eessi.io/docs/tutorial/access/proxy/ | ||
| # Define ACLs: | ||
| acl local_nodes src {{ squid_local_nodes_cidr }} | ||
|
|
||
| # Destination domains that are allowed | ||
| # cern.ch + opensciencegrid.org domains because of cvmfs-config.cern.ch repository, | ||
| # which are provided via Stratum-1 mirror servers hosted by CERN and OSG | ||
| acl stratum_ones dstdomain .cern.ch .opensciencegrid.org {{ squid_eessi_stratum_1 }} | ||
|
|
||
| # Squid port | ||
| http_port {{ squid_http_port }} | ||
|
|
||
| # Deny access to anything which is not part of our stratum_ones ACL. | ||
| http_access deny !stratum_ones | ||
|
|
||
| # Only allow access from our local machines | ||
| http_access allow local_nodes | ||
| http_access allow localhost | ||
|
|
||
| # Finally, deny all other access to this proxy | ||
| http_access deny all | ||
|
|
||
| minimum_expiry_time 0 | ||
| maximum_object_size {{ squid_maximum_object_size[squid_conf_mode] }} | ||
|
|
||
| cache_mem {{ squid_cache_mem }} | ||
| maximum_object_size_in_memory {{ squid_maximum_object_size_in_memory[squid_conf_mode] }} | ||
| cache_dir ufs {{ squid_cache_dir }} {{ squid_cache_disk | int }} 16 256 |
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.
Uh oh!
There was an error while loading. Please reload this page.