File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212deleteBucket () {
1313 local BUCKET_NAME=$PROJECT -$APP
1414 echo " Deleting bucket"
15- gsutil rm -raf gs://${BUCKET_NAME} /*
16- gsutil rb -f gs://${BUCKET_NAME} /
15+ gcloud storage rm --recursive --all-versions --continue-on-error gs://${BUCKET_NAME} /*
16+ gcloud storage buckets delete --continue-on-error gs://${BUCKET_NAME} /
1717}
1818
1919# #
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ echo ${BUCKET_NAME}
2828 echo_mesg " Deploying cities-service"
2929
3030 # ######## Copy Startup Script for cities-service
31- gsutil cp -r startup-scripts/cities-service.sh gs://${BUCKET_NAME} /startup-scripts/cities-service.sh
31+ gcloud storage cp --recursive startup-scripts/cities-service.sh gs://${BUCKET_NAME} /startup-scripts/cities-service.sh
3232
3333 # ######## Create Instance Group for cities service
3434 createRegionalInstanceGroup cities-service ${APP_REGION} ${PROJECT} $NETWORK $SUBNET $BUCKET_NAME
@@ -49,7 +49,7 @@ deployCitiesUI() {
4949 echo_mesg " Deploying cities-ui"
5050
5151 # ######## Copy startup script for cities-ui
52- gsutil cp -r startup-scripts/cities-ui.sh gs://${BUCKET_NAME} /startup-scripts/cities-ui.sh
52+ gcloud storage cp --recursive startup-scripts/cities-ui.sh gs://${BUCKET_NAME} /startup-scripts/cities-ui.sh
5353
5454 # ######## Create Instance Groups for cities ui
5555 createRegionalInstanceGroup cities-ui ${APP_REGION} ${PROJECT} $NETWORK $SUBNET $BUCKET_NAME
@@ -94,7 +94,7 @@ echo_mesg "****** Deploying Microservices *****"
9494
9595# ######## Create Bucket
9696echo_mesg " Creating Bucket"
97- gsutil mb gs://${BUCKET_NAME} /
97+ gcloud storage buckets create gs://${BUCKET_NAME} /
9898
9999# ####### Create VPC Network and subnetwork
100100createVPCNetwork
Original file line number Diff line number Diff line change 175175function hsm_import_bucket()
176176{
177177
178- bucket_file_list=` gsutil ls -r ${HSM_GCS_BUCKET_IMPORT} /** | sed " /\/:$/d" `
178+ bucket_file_list=` gcloud storage ls --recursive ${HSM_GCS_BUCKET_IMPORT} /** | sed " /\/:$/d" `
179179
180180 for i in $bucket_file_list
181181 do
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ gcloud iam service-accounts add-iam-policy-binding \
3636 cnrm-system@${KRM_PROJECT_ID} .iam.gserviceaccount.com \
3737 --member=" serviceAccount:${KRM_PROJECT_ID} .svc.id.goog[cnrm-system/cnrm-controller-manager]" \
3838 --role=" roles/iam.workloadIdentityUser"
39- gsutil cp gs://cnrm/latest/release-bundle.tar.gz release-bundle.tar.gz
39+ gcloud storage cp gs://cnrm/latest/release-bundle.tar.gz release-bundle.tar.gz
4040rm -rf release-bundle
4141tar zxvf release-bundle.tar.gz
4242sed -i.bak ' s/${PROJECT_ID?}/' " $KRM_PROJECT_ID " ' /' install-bundle-workload-identity/0-cnrm-system.yaml
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ $ zip -jr ./functions scheduled-deployments.zip
6767and upload that folder to Cloud Storage
6868
6969``` sh
70- $ gsutil cp scheduled-deployments.zip gs://[PROJECT-ID].appspot.com
70+ $ gcloud storage cp scheduled-deployments.zip gs://[PROJECT-ID].appspot.com
7171```
7272
7373where ` gs://[PROJECT-ID].appspot.com ` is your Cloud Storage bucket name.
@@ -89,7 +89,7 @@ Cloud Storage. Make sure the file is set to be shared publicly. To upload to
8989Cloud Storage, you can execute
9090
9191``` sh
92- $ gsutil cp -a public-read openapi.json gs://[PROJECT-ID].appspot.com
92+ $ gcloud storage cp --predefined-acl= public-read openapi.json gs://[PROJECT-ID].appspot.com
9393```
9494
9595so your specification file will be available at
You can’t perform that action at this time.
0 commit comments