You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that the `-only` flag here restricts the build to the non-OFED fat image "source" (in Packer terminology). Other
43
-
source options are:
44
-
- `-only=openstack.openhpc-ofed`: Build a fat image including Mellanox OFED
45
-
- `-only=openstack.openhpc-extra`: Build an image which extends an existing fat image - in this case the variable `source_image` or `source_image_name}` must also be set in the Packer variables file.
46
-
42
+
Note that the `-only` flag here restricts the build to the non-OFED fat image "source" (in Packer terminology). Other
43
+
source options are:
44
+
- `-only=openstack.openhpc-ofed`: Build a fat image including Mellanox OFED
45
+
- `-only=openstack.openhpc-cuda`: Build a fat image including Mellanox OFED, Nvidia drivers and CUDA
46
+
- `-only=openstack.openhpc-extra`: Build an image which *extends* an existing fat image.
47
+
47
48
5. The built image will be automatically uploaded to OpenStack with a name prefixed `openhpc-` and including a timestamp and a shortened git hash.
48
49
50
+
# Defining an "extra" image build
51
+
52
+
An "extra" image build starts with an existing fat image (e.g. one provided by StackHPC) rather than a RockyLinux GenericCloud image, and only runs a specific subset of the
53
+
Ansible in the appliance. This allows adding additional functionality into site-specific images, without modifying the existing functionality in the base fat image. This is the recommended way to build site-specific images.
54
+
55
+
To configure an "extra" image build, prepare a Packer variable definition file as described above. However this must additionally include:
56
+
57
+
- `extra_image_name`: A string to add into the final image name
58
+
- `source_image` (or `source_image_name`): A map of strings keyed by RockyLinux variant, defining the base image.
59
+
- `groups`: A mapping keyed by the build name defining the Ansible inventory groups which the build VM should be added to - which defines the roles/functionality which are
60
+
added to the image.
61
+
62
+
E.g. to add the lustre client to an RockyLinux 9 image:
63
+
64
+
# environments/site/lustre.pkvars.hcl
65
+
66
+
extra_image_name = "lustre" # output image name will be like "openhpc-lustre-RL9-$timestamp-$commit"
67
+
source_image = {
68
+
# current StackHPC RL9 image:
69
+
RL9 = "openhpc-ofed-RL9-240906-1041-32568dbb"
70
+
}
71
+
groups = {
72
+
openhpc-extra = ["lustre"] # only run lustre role during this extra build
73
+
}
74
+
75
+
... # define flavor, network, etc as normal
76
+
77
+
78
+
Then, reference this file in the Packer build command:
0 commit comments