Skip to content

Commit 1d36709

Browse files
author
Bill Prin
committed
Deployment Manager regions
1 parent 28951d3 commit 1d36709

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

7-gce/gce/deployment_manager/bookshelf.jinja

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,12 @@ See the License for the specific language governing permissions and
1111
limitations under the License.
1212
#}
1313

14+
{# [START all] #}
15+
16+
{# [START env] #}
1417
{% set NAME = "bookshelf-" + env["deployment"] %}
1518
{% set SERVICE = "bookshelf-" + env["deployment"] + "-frontend" %}
19+
{# [END env] #}
1620

1721
#
1822
# Instance group setup
@@ -43,8 +47,10 @@ resources:
4347
metadata:
4448
items:
4549
- key: startup-script
50+
{# [START startup] #}
4651
value: |
4752
{{imports['startup-script']|indent(14, true)}}
53+
{# [END startup] #}
4854
networkInterfaces:
4955
- network: global/networks/default
5056
accessConfigs:
@@ -100,8 +106,10 @@ resources:
100106
- $(ref.{{ NAME }}-health-check.selfLink)
101107
portName: http
102108
backends:
109+
{# [START reference] #}
103110
- group: $(ref.{{ NAME }}-frontend-group.instanceGroup)
104111
zone: {{ properties['zone'] }}
112+
{# [END reference] #}
105113

106114
# Create a URL map and web Proxy. The URL map will send all requests to the
107115
# backend service defined above.
@@ -135,10 +143,12 @@ resources:
135143
zone: {{ properties['zone'] }}
136144
target: $(ref.{{ NAME }}-frontend-group.selfLink)
137145
autoscalingPolicy:
146+
{# [START properties] #}
138147
minNumReplicas: {{ properties['min-instances'] }}
139148
maxNumReplicas: {{ properties['max-instances'] }}
140149
loadBalancingUtilization:
141150
utilizationTarget: {{ properties['target-utilization'] }}
151+
{# [END properties] #}
142152

143153
# Firewall rule that allows traffic to GCE instances with the
144154
# http server tag we created
@@ -154,3 +164,5 @@ resources:
154164
targetTags:
155165
- http-server
156166
description: "Allow port 8080 access to http-server"
167+
168+
{# [END all] #}

7-gce/gce/deployment_manager/bookshelf.jinja.schema

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START all]
16+
1517
info:
1618
title: Bookshelf GCE Deploy
1719
author: Google Inc.
@@ -53,3 +55,5 @@ properties:
5355
minItems: 1
5456
items:
5557
type: string
58+
59+
# [END all]

7-gce/gce/deployment_manager/config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# [START all]
1516
imports:
1617
- name: bookshelf.jinja
1718
path: ./bookshelf.jinja
@@ -29,3 +30,4 @@ resources:
2930
scopes:
3031
- https://www.googleapis.com/auth/cloud-platform
3132

33+
# [END all]

0 commit comments

Comments
 (0)