Skip to content

Commit dd2ae09

Browse files
authored
Update init-fleet-sandbox
1 parent 2411cf0 commit dd2ae09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

experimental/serverless-fleets/init-fleet-sandbox

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,16 @@ ibmcloud ce secret create --name fleet-registry-secret --format registry --serve
393393

394394
# using the common base VSI image "jwe-ubuntu24-gpu" enabled for GPU and including podman and s3fs
395395
print_msg "\nCreating a Code Engine configmap 'fleet-vpc-config' to access the new VPC ..."
396+
# retrieve the best fitting ubuntu vsi base image by selection from available image list
397+
vsi-image-id=$(ic is images | grep ubuntu-24 | grep cloud_init | awk ' { print $1 }')
398+
print_msg "\nSelected the ubuntu-24 vsi image for fleets with the image-id = $vsi-image-id"
396399
ibmcloud ce configmap create --name fleet-vpc-config \
397400
--from-literal NETWORK_ZONE="${REGION}-1" \
398401
--from-literal SSH_SECRET_NAME="fleet-ssh-secret" \
399402
--from-literal VPC_ID="$(ibmcloud is vpc ${vpc_name} --output json | jq -r '.id')" \
400403
--from-literal SUBNET_ID="$(ibmcloud is subnet ${vpc_name}-subnet --output json | jq -r '.id')" \
401404
--from-literal SECURITY_GROUP_ID="$(ibmcloud is security-group ${vpc_name}-group --output json | jq -r '.id')" \
402-
--from-literal VSI_IMAGE_ID="r010-e7b25759-7857-455a-aec0-904b65c3c4cb" \
405+
--from-literal VSI_IMAGE_ID="$vsi-image-id" \
403406
--from-literal VSI_PREFERRED_PROFILE="cx2-2x4"
404407

405408
# alternative to fetch the latest stock image:

0 commit comments

Comments
 (0)