Skip to content

Commit aad122f

Browse files
Merge pull request GoogleCloudPlatform#4423 from harshthakkar01/image-build
Disable upgrades for A* blueprints
2 parents f37690d + fc48fa5 commit aad122f

3 files changed

Lines changed: 60 additions & 50 deletions

File tree

examples/machine-learning/a3-megagpu-8g/a3mega-slurm-blueprint.yaml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -89,25 +89,10 @@ deployment_groups:
8989
# if you follow this rule, any module which supports DKMS will be
9090
# properly configured at the end of image building (gVNIC, NVIDIA, ...)
9191
- type: shell
92-
destination: prevent_unintentional_upgrades.sh
92+
destination: prevent_google_compute_upgrades.sh
9393
content: |
9494
#!/bin/bash
95-
# Unattended upgrades are disabled in this blueprint so that software does not
96-
# get updated daily and lead to potential instability in the cluster environment.
97-
#
98-
# Unattended Upgrades installs available security updates from the Ubuntu
99-
# security pocket for installed packages daily by default. Administrators who
100-
# disable this feature assume all responsibility for manually reviewing and
101-
# patching their systems against vulnerabilities.
102-
#
103-
# To enable unattended upgrades, please remove the following lines:
104-
# systemctl stop unattended-upgrades.service
105-
# systemctl disable unattended-upgrades.service
106-
# systemctl mask unattended-upgrades.service
10795
set -e -o pipefail
108-
systemctl stop unattended-upgrades.service
109-
systemctl disable unattended-upgrades.service
110-
systemctl mask unattended-upgrades.service
11196
apt-mark hold google-compute-engine
11297
apt-mark hold google-compute-engine-oslogin
11398
apt-mark hold google-guest-agent
@@ -383,6 +368,26 @@ deployment_groups:
383368
disk_size: $(vars.disk_size_gb)
384369
omit_external_ip: false
385370

371+
# Unattended upgrades are disabled in this blueprint so that software does not
372+
# get updated daily and lead to potential instability in the cluster environment.
373+
#
374+
# Unattended Upgrades installs available security updates from the Ubuntu
375+
# security pocket for installed packages daily by default. Administrators who
376+
# disable this feature assume all responsibility for manually reviewing and
377+
# patching their systems against vulnerabilities.
378+
#
379+
# To enable unattended upgrades, please remove this section.
380+
metadata:
381+
user-data: |
382+
#cloud-config
383+
write_files:
384+
- path: /etc/apt/apt.conf.d/20auto-upgrades
385+
permissions: '0644'
386+
owner: root
387+
content: |
388+
APT::Periodic::Update-Package-Lists "0";
389+
APT::Periodic::Unattended-Upgrade "0";
390+
386391
- group: cluster
387392
modules:
388393
# if an existing bucket is desired, follow modules/file-system/pre-existing-network-storage/README.md

examples/machine-learning/a3-ultragpu-8g/a3ultra-slurm-blueprint.yaml

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,6 @@ deployment_groups:
6969
Package: nvidia-container-toolkit nvidia-container-toolkit-base libnvidia-container-tools libnvidia-container1
7070
Pin: version 1.17.7-1
7171
Pin-Priority: 100
72-
- type: shell
73-
destination: disable_unattended_upgrades.sh
74-
content: |
75-
#!/bin/bash
76-
# Unattended upgrades are disabled in this blueprint so that software does not
77-
# get updated daily and lead to potential instability in the cluster environment.
78-
#
79-
# Unattended Upgrades installs available security updates from the Ubuntu
80-
# security pocket for installed packages daily by default. Administrators who
81-
# disable this feature assume all responsibility for manually reviewing and
82-
# patching their systems against vulnerabilities.
83-
#
84-
# To enable unattended upgrades, please remove this section.
85-
set -e -o pipefail
86-
systemctl stop unattended-upgrades.service
87-
systemctl disable unattended-upgrades.service
88-
systemctl mask unattended-upgrades.service
8972
- type: data
9073
destination: /var/tmp/slurm_vars.json
9174
content: |
@@ -258,6 +241,25 @@ deployment_groups:
258241
source_image_project_id: [$(vars.base_image.project)]
259242
image_family: $(vars.instance_image.family)
260243
omit_external_ip: false
244+
# Unattended upgrades are disabled in this blueprint so that software does not
245+
# get updated daily and lead to potential instability in the cluster environment.
246+
#
247+
# Unattended Upgrades installs available security updates from the Ubuntu
248+
# security pocket for installed packages daily by default. Administrators who
249+
# disable this feature assume all responsibility for manually reviewing and
250+
# patching their systems against vulnerabilities.
251+
#
252+
# To enable unattended upgrades, please remove this section.
253+
metadata:
254+
user-data: |
255+
#cloud-config
256+
write_files:
257+
- path: /etc/apt/apt.conf.d/20auto-upgrades
258+
permissions: '0644'
259+
owner: root
260+
content: |
261+
APT::Periodic::Update-Package-Lists "0";
262+
APT::Periodic::Unattended-Upgrade "0";
261263
use:
262264
- slurm-image-network
263265
- slurm-build-script

examples/machine-learning/a4-highgpu-8g/a4high-slurm-blueprint.yaml

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -70,23 +70,6 @@ deployment_groups:
7070
Package: nvidia-container-toolkit nvidia-container-toolkit-base libnvidia-container-tools libnvidia-container1
7171
Pin: version 1.17.7-1
7272
Pin-Priority: 100
73-
- type: shell
74-
destination: disable_unattended_upgrades.sh
75-
content: |
76-
#!/bin/bash
77-
# Unattended upgrades are disabled in this blueprint so that software does not
78-
# get updated daily and lead to potential instability in the cluster environment.
79-
#
80-
# Unattended Upgrades installs available security updates from the Ubuntu
81-
# security pocket for installed packages daily by default. Administrators who
82-
# disable this feature assume all responsibility for manually reviewing and
83-
# patching their systems against vulnerabilities.
84-
#
85-
# To enable unattended upgrades, please remove this section.
86-
set -e -o pipefail
87-
systemctl stop unattended-upgrades.service
88-
systemctl disable unattended-upgrades.service
89-
systemctl mask unattended-upgrades.service
9073
- type: data
9174
destination: /var/tmp/slurm_vars.json
9275
content: |
@@ -259,6 +242,26 @@ deployment_groups:
259242
source_image_project_id: [$(vars.base_image.project)]
260243
image_family: $(vars.instance_image.family)
261244
omit_external_ip: false
245+
246+
# Unattended upgrades are disabled in this blueprint so that software does not
247+
# get updated daily and lead to potential instability in the cluster environment.
248+
#
249+
# Unattended Upgrades installs available security updates from the Ubuntu
250+
# security pocket for installed packages daily by default. Administrators who
251+
# disable this feature assume all responsibility for manually reviewing and
252+
# patching their systems against vulnerabilities.
253+
#
254+
# To enable unattended upgrades, please remove this section.
255+
metadata:
256+
user-data: |
257+
#cloud-config
258+
write_files:
259+
- path: /etc/apt/apt.conf.d/20auto-upgrades
260+
permissions: '0644'
261+
owner: root
262+
content: |
263+
APT::Periodic::Update-Package-Lists "0";
264+
APT::Periodic::Unattended-Upgrade "0";
262265
use:
263266
- slurm-image-network
264267
- slurm-build-script

0 commit comments

Comments
 (0)