Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,17 @@ Default: `"{{ hpc_install_nvidia_container_toolkit }}"`

Type: `bool`

### hpc_docker_subnet

The default docker bridge interface address and subnet configuration of 172.17.0.1/16 conflicts with the subnets Azure CycleCloud uses for internal physical cluster networks.

To avoid this conflict with the Azure CycleCloud networks, the system role will configure the docker interface with a 10.88.0.1/16 address and subnet.
However, if this is inappropriate for the cluster being deployed, the subnet can be customised to any private subnet using this variable.

Default: `10.88.0.1/16`

Type: `string`

### hpc_install_moneo

Whether to install the Azure Moneo monitoring tool.
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ hpc_build_openmpi_w_nvidia_gpu_support: true
hpc_install_moneo: true
hpc_install_nvidia_container_toolkit: true
hpc_install_docker: "{{ hpc_install_nvidia_container_toolkit }}"
hpc_docker_subnet: 10.88.0.1/16
hpc_install_azurehpc_health_checks: "{{ hpc_install_nvidia_container_toolkit }}"
hpc_tuning: true
hpc_sku_customisation: true
Expand Down
36 changes: 36 additions & 0 deletions tasks/docker-subnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
- name: Ensure docker config directory exists
file:
path: "{{ __hpc_docker_conf_dir }}"
state: directory
owner: root
group: root
mode: '0755'

- name: Check if daemon.json exists
stat:
path: "{{ __hpc_docker_conf_file }}"
register: __hpc_docker_conf_stat

- name: Slurp file if it exists
slurp:
src: "{{ __hpc_docker_conf_file }}"
register: __hpc_docker_daemon_json_raw
when: __hpc_docker_conf_stat.stat.exists and __hpc_docker_conf_stat.stat.size > 0

- name: Write the updated JSON safely
copy:
content: "{{ updated_daemon_config | to_nice_json }}"
dest: "{{ __hpc_docker_conf_file }}"
owner: root
group: root
mode: '0644'
validate: '/usr/bin/python3 -m json.tool %s'
vars:
updated_daemon_config: >-
{{
(__hpc_docker_daemon_json_raw.content | b64decode | from_json
if (__hpc_docker_daemon_json_raw.content is defined)
else {})
| combine({"bip": hpc_docker_subnet | default('10.88.0.1/16')})
}}
3 changes: 3 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,9 @@
register: __hpc_docker_packages_install
until: __hpc_docker_packages_install is success

- name: Configure Docker bridge network address range
include_tasks: tasks/docker-subnet.yml

- name: Enable and start Docker service
service:
name: docker
Expand Down
2 changes: 2 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ __hpc_microsoft_prod_rpm_key: https://packages.microsoft.com/keys/microsoft.asc
__hpc_base_packages:
- pssh

__hpc_docker_conf_dir: /etc/docker
__hpc_docker_conf_file: "{{ __hpc_docker_conf_dir }}/daemon.json"
__hpc_rdma_rename_path: /usr/lib/udev/rdma_rename

__hpc_dkms_packages:
Expand Down
Loading