File tree Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Original file line number Diff line number Diff line change 15
15
set -ex
16
16
17
17
MY_INSTANCE_NAME=' [your instance name goes here]'
18
-
19
18
ZONE=us-central1-f
20
19
21
20
gcloud compute instances create $MY_INSTANCE_NAME \
@@ -27,10 +26,8 @@ gcloud compute instances create $MY_INSTANCE_NAME \
27
26
--zone $ZONE \
28
27
--tags http-server
29
28
30
- # [START getting_started_create_firewall]
31
29
gcloud compute firewall-rules create default-allow-http-8080 \
32
30
--allow tcp:8080 \
33
31
--source-ranges 0.0.0.0/0 \
34
32
--target-tags http-server \
35
33
--description " Allow port 8080 access to http-server"
36
- # [END getting_started_create_firewall]
Original file line number Diff line number Diff line change 15
15
# Echo commands
16
16
set -v
17
17
18
- # Variables for finding source code
19
- PROJECTID=$( curl -s " http://metadata.google.internal/computeMetadata/v1/project/project-id" -H " Metadata-Flavor: Google" )
20
- REPOSITORY=[YOUR_REPO_NAME]
21
-
22
18
# Install Stackdriver logging agent
23
19
curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh
24
20
sudo bash install-logging-agent.sh
@@ -33,8 +29,7 @@ useradd -m -d /home/pythonapp pythonapp
33
29
34
30
# Fetch source code
35
31
export HOME=/root
36
- git config --global credential.helper gcloud.sh
37
- git clone https://source.developers.google.com/p/$PROJECTID /r/$REPOSITORY /opt/app
32
+ git clone https://github.com/GoogleCloudPlatform/getting-started-python.git /opt/app
38
33
39
34
# Python environment setup
40
35
virtualenv -p python3 /opt/app/gce/env
Original file line number Diff line number Diff line change 17
17
set -x
18
18
19
19
MY_INSTANCE_NAME=' [your instance name goes here]'
20
-
21
20
ZONE=us-central1-f
22
21
23
22
gcloud compute instances delete $MY_INSTANCE_NAME \
You can’t perform that action at this time.
0 commit comments