Skip to content

Commit 22b4095

Browse files
author
Mikael Vesavuori
committed
Add session 2
1 parent 89ab42a commit 22b4095

12 files changed

+330
-0
lines changed

02-vms-and-networking/README.md

Lines changed: 282 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
runtime: custom
2+
env: flex
3+
instance_class: F1
4+
handlers:
5+
- url: .*
6+
script: auto
7+
automatic_scaling:
8+
min_idle_instances: automatic
9+
max_idle_instances: automatic
10+
min_pending_latency: automatic
11+
max_pending_latency: automatic
12+
network: {}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
runtime: nodejs12
2+
resources:
3+
cpu: 1
4+
memory_gb: 0.5
5+
disk_size_gb: 10
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
runtime: nodejs12
2+
env: standard
3+
instance_class: F1
4+
handlers:
5+
- url: .*
6+
script: auto
7+
automatic_scaling:
8+
min_idle_instances: automatic
9+
max_idle_instances: automatic
10+
min_pending_latency: automatic
11+
max_pending_latency: automatic
12+
network: {}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Create instance template
2+
gcloud compute instance-templates create-with-container webserver-container-instance-template \
3+
--container-image gcr.io/mikaelvesavuori/simple-node-webserver
4+
5+
gcloud compute instance-templates create webserver-instance-template \
6+
--machine-type f1-micro \
7+
--image-family debian-9 \
8+
--image-project debian-cloud \
9+
--boot-disk-size 10GB
10+
11+
# Create instance from template
12+
gcloud compute instances create webserver-instance --source-instance-template webserver-instance-template
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#! /bin/bash
2+
apt-get update
3+
apt-get install -y apache2
4+
cat <<EOF > /var/www/html/index.html
5+
<html><body><h1>Hello World</h1>
6+
<p>This page was created from a simple startup script!</p>
7+
</body></html>
84.2 KB
Loading
80.2 KB
Loading
495 KB
Loading
501 KB
Loading

0 commit comments

Comments
 (0)