Skip to content

Commit

Permalink
Update linux-common role to support Infiniband netdevs (#230)
Browse files Browse the repository at this point in the history
* Introduce linux-common role, initial inbox support for Infiniband

* Change cloud-init net renderer\ to support IB netdev conf

* Add play for linux-common role

* Replace references to stackhpc where possible (#232)

* Use workflow actions from azimuth-cloud (#233)

* Allow image builds to run on other clouds (#236)

* Allow image builds to run on other clouds

* Update zenith tag

* Add support for specifying a volume type

* Update ubuntu-jammy base image (20240808) (#229)

Co-authored-by: mkjpryor <[email protected]>

* Update Kubernetes patch versions (v1.30.4, v1.27.16, v1.29.8, v1.28.13) (#227)

Co-authored-by: mkjpryor <[email protected]>

* Update ubuntu-jammy base image (20240821) (#237)

Co-authored-by: mkjpryor <[email protected]>

* Bump community.general to 9.3.0 (#225)

Co-authored-by: mkjpryor <[email protected]>

* Bump prometheus.prometheus to 0.17.1 (#219)

Co-authored-by: mkjpryor <[email protected]>

* Bump containers.podman to 1.15.4 (#224)

Co-authored-by: mkjpryor <[email protected]>

* Bump prometheus to v2.54.0 (#234)

Co-authored-by: mkjpryor <[email protected]>

* Stop building images for Kubernetes 1.27 (#238)

* Bump zenith-client to 0.12.0 (#239)

Co-authored-by: mkjpryor <[email protected]>

* Add new Kubernetes version (v1.31.0) (#235)

Co-authored-by: mkjpryor <[email protected]>

* Use linux-ansible-init from azimuth-cloud image_utils collection (#226)

* Update to use linux-ansible-init role from Galaxy and remove in-repo

* Update requirements.yml

add external ansible-init to requirements

* Update main.yml

update ansible-init dependency for linux-webconsole

* Update main.yml

* Update main.yml

* Update main.yml

* Update requirements.yml

* Use ansible-init from image_utils collection

* bump azimuth-image-utils release

* verbose linux-rstudio.pkr.hcl

* verbose linux-rstudio.pkr.hcl

* image-utils 0.2.0

* Update linux-rstudio.pkr.hcl

---------

Co-authored-by: bertie <[email protected]>

* Move common tasks into a shared linux-common role (#242)

* Move common tasks into a shared linux-common role

* Update Trivy action version

* Remove isolate command to prevent ansible-init from running

* Update ubuntu-jammy base image (20240912) (#245)

Co-authored-by: mkjpryor <[email protected]>

* Update Kubernetes patch versions (v1.31.1, v1.29.9, v1.30.5, v1.28.14) (#244)

Co-authored-by: mkjpryor <[email protected]>

* Pass GitHub token for Trivy DB download (#249)

* Attempt 2 at fixing Trivy DB ratelimit errors

* Use Trivy DB mirror to avoid rate-limiting issues

* Use image-builder tags when updating

* Update ubuntu-jammy base image (20241002) (#253)

Co-authored-by: mkjpryor <[email protected]>

* Exclude low severity results from SARIF

* Bump prometheus.prometheus to 0.19.0 (#246)

Co-authored-by: mkjpryor <[email protected]>

* Bump prometheus to v2.54.1 (#240)

Co-authored-by: mkjpryor <[email protected]>

* Bump community.general to 9.5.0 (#241)

Co-authored-by: mkjpryor <[email protected]>

* Bump ansible.posix to 1.6.0 (#243)

Co-authored-by: mkjpryor <[email protected]>

* Bump containers.podman to 1.16.1 (#248)

Co-authored-by: mkjpryor <[email protected]>

* Bump nginx to 1.27.2 (#252)

Co-authored-by: mkjpryor <[email protected]>

* Install Infiniband inbox driver + load kernel modules via linux-common

* Bump default repo2docker volume size to 10GB

* Change default cloud-init network activator to networkd

* Tidy common role

* Tidy common role

* Update package install name

* Bump Linux desktop size to 15GB

---------

Co-authored-by: Matt Pryor <[email protected]>
Co-authored-by: azimuth-ci-bot[bot] <142236172+azimuth-ci-bot[bot]@users.noreply.github.com>
Co-authored-by: mkjpryor <[email protected]>
Co-authored-by: azimuth-automation-bot[bot] <177105362+azimuth-automation-bot[bot]@users.noreply.github.com>
Co-authored-by: bertiethorpe <[email protected]>
Co-authored-by: bertie <[email protected]>
  • Loading branch information
7 people authored Oct 24, 2024
1 parent 516b520 commit 624f8e3
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 18 deletions.
4 changes: 4 additions & 0 deletions ansible/linux-common.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
- hosts: all
roles:
- role: linux-common
3 changes: 3 additions & 0 deletions ansible/roles/linux-common/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
kernel_modules:
- ib_ipoib
49 changes: 33 additions & 16 deletions ansible/roles/linux-common/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,45 @@
---

- name: Update apt cache
# ACL Required for become to an unprivileged user to work
# Ensure up-to-date CA certificates
# Use linux-generic to track linux-modules-extra (IB)
- name: Install common packages
apt:
update_cache: true
when: ansible_os_family == "Debian"

- name: Ensure up-to-date CA certificates
package:
name: ca-certificates
pkg:
- acl
- ca-certificates
- linux-generic
state: latest

# Required for become to an unprivileged user to work
# Using the apt module seems to work more reliably than package :-/
- name: Install ACL package
apt:
update_cache: true
name: acl
state: present
when: ansible_os_family == "Debian"

# Enables the ansible-init system, but does not install any default playbooks
- include_role:
name: azimuth_cloud.image_utils.linux_ansible_init

# Enables volumes to be referred to by tag for setting up mounts in cloud-config
- include_role:
name: linux-volumes-by-tag

- name: Load relevant kernel modules
template:
src: modules.conf.j2
dest: /etc/modules-load.d/modules.conf

# The cloud-init netplan renderer is default for ubuntu
# but does not support InfiniBand devices
- name: Switch cloud-init to alternative network renderer
lineinfile:
path: /etc/cloud/cloud.cfg
regexp: "^ renderers:.*"
line: " renderers: ['networkd', 'network-manager']"
state: present

- name: Switch cloud-init to alternative network activator
lineinfile:
path: /etc/cloud/cloud.cfg
regexp: "^ activators:.*"
line: " activators: ['networkd', 'eni', 'network-manager']"
state: present

- name: Clean up after ourselves
ansible.builtin.apt:
clean: yes
3 changes: 3 additions & 0 deletions ansible/roles/linux-common/templates/modules.conf.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% for module in kernel_modules %}
{{ module }}
{% endfor %}
2 changes: 1 addition & 1 deletion packer/jupyter-repo2docker.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ variable "volume_type" {

variable "volume_size" {
type = number
default = 5
default = 10
}

variable "disk_format" {
Expand Down
2 changes: 1 addition & 1 deletion packer/linux-desktop.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ variable "volume_type" {

variable "volume_size" {
type = number
default = 10
default = 15
}

variable "disk_format" {
Expand Down

0 comments on commit 624f8e3

Please sign in to comment.