@@ -124,6 +124,22 @@ print_msg "\n======================================================"
124124print_msg " Setting up \" Code Engine Serverless Fleet\" sample"
125125print_msg " ======================================================\n"
126126
127+ if [[ " $SETUP_LOGGING " != " true" || " $SETUP_MONITORING " != " true" ]]; then
128+ print_msg " ATTENTION: You requested to setup a fleet sandbox without : \n"
129+ if [[ " $SETUP_LOGGING " != " true" ]]; then
130+ print_msg " - logging support \n"
131+ fi
132+ if [[ " $SETUP_MONITORING " != " true" ]]; then
133+ print_msg " - monitoring support \n"
134+ fi
135+ print_msg " Do you really want to continue setup without these services? They cannot be added later \n"
136+ read -p " Continue [y|n]? " yn
137+ case $yn in
138+ [Yy]* ) ;;
139+ * ) exit -1;;
140+ esac
141+ fi
142+
127143echo " "
128144echo " Please note: This script will install various IBM Cloud resources within the resource group '$resource_group_name '."
129145
@@ -158,7 +174,7 @@ target_resource_group $resource_group_name
158174# Check whether Logging should be configured
159175print_msg " \nShould IBM Cloud Logs be configured?"
160176if [[ " $SETUP_LOGGING " != " true" ]]; then
161- echo " No!"
177+ echo " No! "
162178else
163179 echo " Yes!"
164180 print_msg " \nCreating the IBM Cloud Logs instance '$icl_name ' ..."
@@ -393,13 +409,16 @@ ibmcloud ce secret create --name fleet-registry-secret --format registry --serve
393409
394410# using the common base VSI image "jwe-ubuntu24-gpu" enabled for GPU and including podman and s3fs
395411print_msg " \nCreating a Code Engine configmap 'fleet-vpc-config' to access the new VPC ..."
412+ # retrieve the best fitting ubuntu vsi base image by selection from available image list
413+ vsi-image-id=$( ibmcloud is images --output JSON| jq -r ' first( .[]|select(.name | startswith("ibm-ubuntu-24")) ) | .id' )
414+ print_msg " \nSelected the ubuntu-24 vsi image for fleets with the image-id = $vsi -image-id"
396415ibmcloud ce configmap create --name fleet-vpc-config \
397416--from-literal NETWORK_ZONE=" ${REGION} -1" \
398417--from-literal SSH_SECRET_NAME=" fleet-ssh-secret" \
399418--from-literal VPC_ID=" $( ibmcloud is vpc ${vpc_name} --output json | jq -r ' .id' ) " \
400419--from-literal SUBNET_ID=" $( ibmcloud is subnet ${vpc_name} -subnet --output json | jq -r ' .id' ) " \
401420--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 " \
421+ --from-literal VSI_IMAGE_ID=" $vsi -image-id " \
403422--from-literal VSI_PREFERRED_PROFILE=" cx2-2x4"
404423
405424# alternative to fetch the latest stock image:
0 commit comments