-
Notifications
You must be signed in to change notification settings - Fork 72
/
cf-networking.yml
227 lines (209 loc) · 6.6 KB
/
cf-networking.yml
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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
# add cf-networking release
- type: replace
path: /releases/name=cf-networking?/version
value: latest
# add network policy db to cf mysql
- type: replace
path: /instance_groups/name=mysql/jobs/name=mysql/properties/cf_mysql/mysql/seeded_databases/-
value:
name: network_policy
username: network_policy
password: "((cf_mysql_mysql_seeded_databases_network_policy_password))"
# add users and client scopes
- type: replace
path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/scim/users/name=admin/groups/-
value: network.admin
- type: replace
path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/clients/cf/scope?
value: network.admin,network.write,cloud_controller.read,cloud_controller.write,openid,password.write,cloud_controller.admin,scim.read,scim.write,doppler.firehose,uaa.user,routing.router_groups.read,routing.router_groups.write
- type: replace
path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/clients/network-policy?
value:
authorities: uaa.resource,cloud_controller.admin_read_only
authorized-grant-types: client_credentials,refresh_token
secret: "((uaa_clients_network_policy_secret))"
- type: replace
path: /instance_groups/name=uaa/jobs/name=uaa/properties/uaa/clients/datadog-firehose-nozzle?
value:
access-token-validity: 1209600
authorized-grant-types: authorization_code,client_credentials,refresh_token
override: true
secret: "((uaa_clients_datadog_firehose_nozzle_secret))"
scope: openid,oauth.approvals,doppler.firehose
authorities: oauth.login,doppler.firehose
# point garden to external networker
- type: replace
path: /instance_groups/name=diego-cell/jobs/name=garden/properties/garden/network_plugin?
value: /var/vcap/packages/runc-cni/bin/garden-external-networker
- type: replace
path: /instance_groups/name=diego-cell/jobs/name=garden/properties/garden/network_plugin_extra_args?/-
value: --configFile=/var/vcap/jobs/garden-cni/config/adapter.json
# c2c jobs on the diego cell
- type: replace
path: /instance_groups/name=diego-cell/jobs/-
value:
name: garden-cni
release: cf-networking
properties:
cf_networking:
garden_external_networker:
cni_plugin_dir: /var/vcap/packages/flannel/bin
cni_config_dir: /var/vcap/jobs/cni-flannel/config/cni
- type: replace
path: /instance_groups/name=diego-cell/jobs/-
value:
name: cni-flannel
release: cf-networking
properties:
cf_networking:
plugin:
etcd_endpoints:
- cf-etcd.service.cf.internal
etcd_client_cert: "((etcd_client.certificate))"
etcd_client_key: "((etcd_client.private_key))"
etcd_ca_cert: "((etcd_client.ca))"
- type: replace
path: /instance_groups/name=diego-cell/jobs/-
value:
name: netmon
release: cf-networking
- type: replace
path: /instance_groups/name=diego-cell/jobs/-
value:
name: vxlan-policy-agent
release: cf-networking
properties:
cf_networking:
vxlan_policy_agent:
policy_server_url: https://policy-server.service.cf.internal:4003
ca_cert: "((network_policy_client.ca))"
client_cert: "((network_policy_client.certificate))"
client_key: "((network_policy_client.private_key))"
# policy server vm
- type: replace
path: /instance_groups/-
value:
name: policy-server
azs:
- z1
- z2
instances: 2
vm_type: t2.small
stemcell: default
networks:
- name: private
jobs:
- name: policy-server
release: cf-networking
properties:
cf_networking:
policy_server:
uaa_client_secret: "((uaa_clients_network_policy_secret))"
uaa_ca: "((uaa_ssl.ca))"
ca_cert: "((network_policy_server.ca))"
server_cert: "((network_policy_server.certificate))"
server_key: "((network_policy_server.private_key))"
database:
type: mysql
username: network_policy
password: "((cf_mysql_mysql_seeded_databases_network_policy_password))"
host: sql-db.service.cf.internal
port: 3306
name: network_policy
- name: route_registrar
release: routing
properties:
route_registrar:
routes:
- name: policy-server
port: 4002
registration_interval: 20s
uris:
- "api.((system_domain))/networking"
nats:
machines:
- 10.0.31.191
- 10.0.47.191
password: "((nats_password))"
port: 4222
user: nats
- name: consul_agent
release: consul
consumes:
consul: {from: consul_server}
properties:
consul:
agent:
services:
policy-server:
name: policy-server
check:
interval: 5s
script: /bin/true
- name: metron_agent
release: loggregator
properties:
syslog_daemon_config:
enable: false
metron_agent:
deployment: "((system_domain))"
etcd:
client_cert: "((etcd_client.certificate))"
client_key: "((etcd_client.private_key))"
metron_endpoint:
shared_secret: "((dropsonde_shared_secret))"
loggregator:
tls:
ca_cert: "((loggregator_ca.certificate))"
metron:
cert: "((loggregator_tls_metron.certificate))"
key: "((loggregator_tls_metron.private_key))"
etcd:
require_ssl: true
ca_cert: "((etcd_server.ca))"
machines:
- cf-etcd.service.cf.internal
# add vars
- type: replace
path: /variables/-
value:
name: cf_mysql_mysql_seeded_databases_network_policy_password
type: password
- type: replace
path: /variables/-
value:
name: uaa_clients_network_policy_secret
type: password
- type: replace
path: /variables/-
value:
name: uaa_clients_datadog_firehose_nozzle_secret
type: password
- type: replace
path: /variables/-
value:
name: network_policy_ca
type: certificate
options:
is_ca: true
common_name: networkPolicyCA
- type: replace
path: /variables/-
value:
name: network_policy_server
type: certificate
options:
ca: network_policy_ca
common_name: policy-server.service.cf.internal
extended_key_usage:
- server_auth
- type: replace
path: /variables/-
value:
name: network_policy_client
type: certificate
options:
ca: network_policy_ca
common_name: clientName
extended_key_usage:
- client_auth