-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathredis.yaml
139 lines (135 loc) · 4.91 KB
/
redis.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: redis
modules:
redis_master:
type: REPLICA_POOL
replicaPoolModule:
numReplicas: 1
replicaPoolParams:
v1beta1:
machineType: n1-standard-1
onHostMaintenance: TERMINATE
zone: us-central1-a
baseInstanceName: redismaster
disksToCreate:
- boot: true
initializeParams:
sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120
diskSizeGb: 100
initAction: redis_init
networkInterfaces:
- network: default
# static ip is for walkshare-devel
accessConfigs:
- name: External NAT
type: ONE_TO_ONE_NAT
natIp: 23.251.149.49
serviceAccounts:
- email: default
scopes: [
# Allow self-deprovisioning
"https://www.googleapis.com/auth/compute",
# Allow CloudManager deployment
"https://www.googleapis.com/auth/ndev.cloudman",
# Allow self-identification
"https://www.googleapis.com/auth/userinfo.email",
# Allow source code reading
# "https://www.googleapis.com/auth/projecthosting"
]
envVariables:
IS_MASTER:
value: "true"
REDIS_AUTH:
value: "xxxxxx"
UTIL_INSTALL_DIR:
value: "/tmp"
VIEW_NAME:
value: "$.modules.redis_slave.replicaPoolModule.resourceView"
MEMBER_COUNT:
value: "$.modules.redis_slave.replicaPoolModule.numReplicas"
ZONE:
value: "$.modules.redis_master.replicaPoolModule.replicaPoolParams.v1beta1.zone"
redis_slave:
type: REPLICA_POOL
replicaPoolModule:
numReplicas: 4
replicaPoolParams:
v1beta1:
machineType: n1-standard-1
onHostMaintenance: TERMINATE
zone: us-central1-a
baseInstanceName: redis
disksToCreate:
- boot: true
initializeParams:
sourceImage: https://www.googleapis.com/compute/v1/projects/debian-cloud/global/images/debian-7-wheezy-v20131120
diskSizeGb: 100
initAction: redis_init_slave
networkInterfaces:
- network: default
accessConfigs:
- name: External NAT
type: ONE_TO_ONE_NAT
serviceAccounts:
- email: default
scopes: [
# Allow GAE deployment
# "https://www.googleapis.com/auth/appengine.admin",
# Allow self-deprovisioning
"https://www.googleapis.com/auth/compute",
# Ideally devstorage.full_control would be a superset of
# devstorage.read_write but AppEngine deployments seem to have issues
# with devstorage.full_control but not devstorage.read_write. In the
# mean time we include both.
# Allow reading object ACL
# "https://www.googleapis.com/auth/devstorage.full_control",
# Allow uploading build artifacts
# "https://www.googleapis.com/auth/devstorage.read_write",
# Allow CloudManager deployment
"https://www.googleapis.com/auth/ndev.cloudman",
# Allow self-identification
"https://www.googleapis.com/auth/userinfo.email",
# Allow source code reading
# "https://www.googleapis.com/auth/projecthosting"
]
envVariables:
IS_MASTER:
value: "false"
REDIS_AUTH:
value: "xxxxxx"
UTIL_INSTALL_DIR:
value: "/tmp"
VIEW_NAME:
value: "$.modules.redis_master.replicaPoolModule.resourceView"
MEMBER_COUNT:
value: "$.modules.redis_master.replicaPoolModule.numReplicas"
ZONE:
value: "$.modules.redis_slave.replicaPoolModule.replicaPoolParams.v1beta1.zone"
actions:
redis_init:
commands: [
"apt-get update",
"apt-get -y -qq install gcc",
"apt-get -y -qq install make",
"apt-get -y -qq install emacs",
"apt-get -y -qq install less",
"%file:redis.sh",
"%file:install-getinstancename.sh",
"%file:install-gcloud.sh",
"%file:install-wait-for-view.sh",
"$UTIL_INSTALL_DIR/wait-for-view.sh",
"%file:setup_master.sh"
]
redis_init_slave:
commands: [
"apt-get update",
"apt-get -y -qq install gcc",
"apt-get -y -qq install make",
"apt-get -y -qq install emacs",
"apt-get -y -qq install less",
"%file:redis.sh",
"%file:install-getinstancename.sh",
"%file:install-gcloud.sh",
"%file:install-wait-for-view.sh",
"$UTIL_INSTALL_DIR/wait-for-view.sh",
"%file:setup_slave.sh"
]