diff --git a/README.md b/README.md index 207f468..d8d1baa 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ A: Yes, as part of the setup, you will import from the RHCOS bucket. To import rhcos: ``` -ibmcloud pi image-import rhcos-415-92-202312071243-t1 +ibmcloud pi image import rhcos-415-92-202312071243-t1 --bucket-access public --storage-pool Tier1-Flash-1 --bucket rhcos-powervs-images-us-east --region us-east --job --json --os-type rhel --image-file-name rhcos-415-92-202312071243-0-ppc64le-powervs.ova.gz @@ -105,7 +105,7 @@ ibmcloud pi image-import rhcos-415-92-202312071243-t1 To import the Centos stock image: ``` -ibmcloud pi image-create CentOS-Stream-8 +ibmcloud pi image create CentOS-Stream-8 ``` ## Contributing diff --git a/modules/0_vpc/reuse/vpc.tf b/modules/0_vpc/reuse/vpc.tf index 63bad3b..f4b05c2 100644 --- a/modules/0_vpc/reuse/vpc.tf +++ b/modules/0_vpc/reuse/vpc.tf @@ -31,7 +31,7 @@ locals { region = "tor", zone = "tor01" }, - ca-mon = { + ca-mon = { region = "mon", zone = "mon01" }, diff --git a/modules/5_image/files/upload_rhcos_image.sh b/modules/5_image/files/upload_rhcos_image.sh index 334bc27..88a6d24 100644 --- a/modules/5_image/files/upload_rhcos_image.sh +++ b/modules/5_image/files/upload_rhcos_image.sh @@ -23,9 +23,6 @@ fi ibmcloud login --apikey "${API_KEY}" -r "${REGION}" -g "${RESOURCE_GROUP}" ibmcloud plugin install -f cloud-internet-services vpc-infrastructure cloud-object-storage is -# Pin the version to 0.6.0 (v1.0.0 may be incompatible) -ibmcloud plugin install -v 0.6.0 -f power-iaas - # Download the RHCOS qcow2 TARGET_DIR=".openshift/image-local" mkdir -p ${TARGET_DIR} diff --git a/scripts/create-pvs-workspace.sh b/scripts/create-pvs-workspace.sh index 471ef2e..a743b36 100644 --- a/scripts/create-pvs-workspace.sh +++ b/scripts/create-pvs-workspace.sh @@ -10,7 +10,7 @@ if [[ $(type -t ic) == function ]] then IBMCLOUD=ic else - ibmcloud plugin install -v 0.6.0 -f power-iaas + ibmcloud plugin install -f power-iaas fi if [ -z "${WORKSPACE_NAME}" ] @@ -31,8 +31,9 @@ then return -1 fi -SERVICE_NAME=power-iaas -SERVICE_PLAN_NAME=power-virtual-server-group - -${IBMCLOUD} resource service-instance-create "${WORKSPACE_NAME}" \ - "${SERVICE_NAME}" "${SERVICE_PLAN_NAME}" "${REGION}" -g "${RESOURCE_GROUP}" \ No newline at end of file +# Create the service instance +ibmcloud pi workspace create "${WORKSPACE_NAME}" \ + --plan public \ + --datacenter "${REGION}" \ + --json \ + --group "${RESOURCE_GROUP}" 2>&1 \ No newline at end of file diff --git a/scripts/create-var-file.sh b/scripts/create-var-file.sh index 6c6cbb1..713e69c 100755 --- a/scripts/create-var-file.sh +++ b/scripts/create-var-file.sh @@ -31,7 +31,7 @@ if [[ $(type -t ic) == function ]] then IBMCLOUD=ic else - ${IBMCLOUD} plugin install -v 0.6.0 -f power-iaas + ${IBMCLOUD} plugin install -f power-iaas fi if [ ! -z "${1}" ] @@ -83,6 +83,7 @@ else POWERVS_ZONE=$(${IBMCLOUD} resource service-instances --output json | jq -r '.[] | select(.guid == "'${POWERVS_SERVICE_INSTANCE_ID}'").region_id') POWERVS_REGION=$( case "$POWERVS_ZONE" in + ("dal10") echo "dal" ;; ("dal12") echo "dal" ;; ("us-south") echo "us-south" ;; ("wdc06") echo "wdc" ;; @@ -90,6 +91,7 @@ else ("sao01") echo "sao" ;; ("tor01") echo "tor" ;; ("mon01") echo "mon" ;; + ("mad01") echo "mad" ;; ("eu-de-1") echo "eu-de" ;; ("eu-de-2") echo "eu-de" ;; ("lon04") echo "lon" ;; diff --git a/scripts/import-centos.sh b/scripts/import-centos.sh index fc88531..2d260e9 100644 --- a/scripts/import-centos.sh +++ b/scripts/import-centos.sh @@ -21,12 +21,12 @@ else then IBMCLOUD=ic else - ibmcloud plugin install -v 0.6.0 -f power-iaas + ibmcloud plugin install -f power-iaas fi fi -POWERVS_CRN=$(${IBMCLOUD} pi sl 2>&1 | grep "${SERVICE_INSTANCE_ID}" | awk '{print $1}') -${IBMCLOUD} pi st "${POWERVS_CRN}" +POWERVS_CRN=$(${IBMCLOUD} pi workspace ls 2>&1 | grep "${SERVICE_INSTANCE_ID}" | awk '{print $1}') +${IBMCLOUD} pi workspace target "${POWERVS_CRN}" -${IBMCLOUD} pi image-create CentOS-Stream-8 +${IBMCLOUD} pi image create CentOS-Stream-8 echo "Finished importing CentOS-Stream-8" \ No newline at end of file