Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 93b703d

Browse filesBrowse files
jabubakekurtisvg
authored andcommitted
Update GCS_APP_LOCATION to GCS_BUCKET_NAME (GoogleCloudPlatform#1682)
1 parent 64f41e6 commit 93b703d
Copy full SHA for 93b703d

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed

‎memorystore/redis/gce_deployment/deploy.sh

Copy file name to clipboardExpand all lines: memorystore/redis/gce_deployment/deploy.sh
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ if [ -z "$REDISPORT" ]; then
2424
exit 1
2525
fi
2626

27-
if [ -z "$GCS_APP_LOCATION" ]; then
28-
echo "Must set \$GCS_APP_LOCATION. For example: GCS_APP_LOCATION=gs://my-bucket/app"
27+
if [ -z "$GCS_BUCKET_NAME" ]; then
28+
echo "Must set \$GCS_BUCKET_NAME. For example: GCS_BUCKET_NAME=my-bucket"
2929
exit 1
3030
fi
3131

@@ -37,7 +37,7 @@ fi
3737
#Upload the tar to GCS
3838
tar -cvf app.tar -C .. requirements.txt main.py
3939
# Copy to GCS bucket
40-
gsutil cp app.tar $GCS_APP_LOCATION
40+
gsutil cp app.tar gs://"$GCS_BUCKET_NAME"/gce/
4141

4242
# Create an instance
4343
gcloud compute instances create my-instance \
@@ -46,7 +46,7 @@ gcloud compute instances create my-instance \
4646
--machine-type=g1-small \
4747
--scopes cloud-platform \
4848
--metadata-from-file startup-script=startup-script.sh \
49-
--metadata app-location=$GCS_APP_LOCATION,redis-host=$REDISHOST,redis-port=$REDISPORT \
49+
--metadata gcs-bucket=$GCS_BUCKET_NAME,redis-host=$REDISHOST,redis-port=$REDISPORT \
5050
--zone $ZONE \
5151
--tags http-server
5252

‎memorystore/redis/gce_deployment/startup-script.sh

Copy file name to clipboardExpand all lines: memorystore/redis/gce_deployment/startup-script.sh
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -v
1818

1919
# Talk to the metadata server to get the project id and location of application binary.
2020
PROJECTID=$(curl -s "http://metadata.google.internal/computeMetadata/v1/project/project-id" -H "Metadata-Flavor: Google")
21-
GCS_APP_LOCATION=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/attributes/app-location" -H "Metadata-Flavor: Google")
21+
GCS_BUCKET_NAME=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/attributes/gcs-bucket" -H "Metadata-Flavor: Google")
2222
REDISHOST=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/attributes/redis-host" -H "Metadata-Flavor: Google")
2323
REDISPORT=$(curl -s "http://metadata.google.internal/computeMetadata/v1/instance/attributes/redis-port" -H "Metadata-Flavor: Google")
2424

@@ -33,7 +33,7 @@ apt-get install -yq \
3333
curl -s "https://storage.googleapis.com/signals-agents/logging/google-fluentd-install.sh" | bash
3434
service google-fluentd restart &
3535

36-
gsutil cp "$GCS_APP_LOCATION"** /
36+
gsutil cp gs://"$GCS_BUCKET_NAME"/gce/app.tar /app.tar
3737
mkdir -p /app
3838
tar -x -f /app.tar -C /app
3939
cd /app

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.