@@ -129,8 +129,13 @@ variable "volume_type" {
129
129
}
130
130
131
131
variable "volume_size" {
132
- type = number
133
- default = 15
132
+ type = map (number )
133
+ default = {
134
+ # fat image builds, GB:
135
+ openhpc = 15
136
+ openhpc-ofed = 15
137
+ openhpc-cuda = 30
138
+ }
134
139
}
135
140
136
141
variable "image_disk_format" {
@@ -150,6 +155,7 @@ variable "groups" {
150
155
# fat image builds:
151
156
openhpc = [" control" , " compute" , " login" ]
152
157
openhpc-ofed = [" control" , " compute" , " login" , " ofed" ]
158
+ openhpc-cuda = [" control" , " compute" , " login" , " ofed" , " cuda" ]
153
159
}
154
160
}
155
161
@@ -158,11 +164,11 @@ source "openstack" "openhpc" {
158
164
flavor = var. flavor
159
165
use_blockstorage_volume = var. use_blockstorage_volume
160
166
volume_type = var. volume_type
167
+ volume_size = var. volume_size [source . name ]
161
168
metadata = var. metadata
162
169
networks = var. networks
163
170
floating_ip_network = var. floating_ip_network
164
171
security_groups = var. security_groups
165
- volume_size = var. volume_size
166
172
167
173
# Input image:
168
174
source_image = " ${ var . source_image [var . os_version ]} "
@@ -178,7 +184,7 @@ source "openstack" "openhpc" {
178
184
ssh_bastion_private_key_file = var. ssh_bastion_private_key_file
179
185
180
186
# Output image:
181
- image_disk_format = var . image_disk_format
187
+ image_disk_format = " qcow2 "
182
188
image_visibility = var. image_visibility
183
189
image_name = " ${ source . name } -${ var . os_version } -${ local . timestamp } -${ substr (local. git_commit , 0 , 8 )} "
184
190
}
@@ -195,6 +201,11 @@ build {
195
201
name = " openhpc-ofed"
196
202
}
197
203
204
+ # CUDA fat image:
205
+ source "source.openstack.openhpc" {
206
+ name = " openhpc-cuda"
207
+ }
208
+
198
209
# Extended site-specific image, built on fat image:
199
210
source "source.openstack.openhpc" {
200
211
name = " openhpc-extra"
0 commit comments