This rather large update adds the following
- A golang build container used for building golang executables and/or
containers.
- envoyd, a daemon process that creates and updates the envoy config
file based on consul's KV store and forces envoy to reload the config
as it changes.
- Dockerfile(s) and compose files that integrate envoy into the NBI call
chain to load-balance device-to-core assignment.
- Several developer tools that help build and replace specific
containers in a running cluster. This allows the build process to be
separated from the run-time as it will be in production.
- NOTES: A command line needs to be added to envoyd because now the
values are declared at the start of the file. This will be submitted
in a subsequent commit along with a change toward a more object
oriented implementation.
Addressed reviewer comments.
Addressed even more reviewr comments.
Change-Id: Ia2ec825d48d475398e501f396452fb0306673432
diff --git a/envoy/front-proxy/voltha-grpc-proxy.template.json b/envoy/front-proxy/voltha-grpc-proxy.template.json
new file mode 100644
index 0000000..8a83155
--- /dev/null
+++ b/envoy/front-proxy/voltha-grpc-proxy.template.json
@@ -0,0 +1,93 @@
+{
+ "listeners": [
+ {
+ "address": "tcp://0.0.0.0:50555",
+ "filters": [
+ {
+ "type": "read",
+ "name": "http_connection_manager",
+ "config": {
+ "codec_type": "http2",
+ "stat_prefix": "ingress_http2",
+ "access_log": [
+ {
+ "path": "/envoy/voltha_access_log.log"
+ }
+ ],
+ "route_config": {
+ "virtual_hosts": [
+ {
+ "name": "backend",
+ "domains": ["*"],
+ "routes": [
+ {
+ "timeout_ms": 0,
+ "prefix": "/voltha.VolthaGlobalService/CreateDevice",
+ "cluster": "voltha-grpc-RR"
+ },
+ {
+ "timeout_ms": 0,
+ "prefix": "/voltha.VolthaGlobalService",
+ "cluster": "voltha-grpc"
+ },
+ {
+ "timeout_ms": 0,
+ "prefix": "/voltha.",
+ "cluster": "voltha-grpc"
+ }
+ ]
+ }
+ ]
+ },
+ "filters": [
+ {
+ "type": "decoder",
+ "name": "router",
+ "config": {}
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "admin": {
+ "access_log_path": "/envoy/access.log",
+ "address": "tcp://0.0.0.0:8001"
+ },
+ "cluster_manager": {
+ "clusters": [
+ {
+ "name": "voltha-grpc",
+ "connect_timeout_ms": 250,
+ "type": "static",
+ "lb_type": "round_robin",
+ "features": "http2",
+ "hosts": [
+ {
+ "url": "tcp://{{- .VolthaVip }}"
+ }
+ ]
+ },
+ {
+ "name": "voltha-grpc-RR",
+ "connect_timeout_ms": 250,
+ "type": "static",
+ "lb_type": "round_robin",
+ "features": "http2",
+ "hosts": [
+ {{block "addrlist" .VolthaRR}}
+ {{- range .}}
+ {{- if isFirst}}
+ {{- printf "{\"url\": \"tcp://%s\"}" . }}
+ {{- else }}
+ {{- printf ",{\"url\": \"tcp://%s\"}" . }}
+ {{- end }}
+ {{- end}}
+ {{- end}}
+ ]
+ }
+ ]
+ }
+}
+