Preliminary Commit to secure communication between Registrator and Consul
-- This is just a prep work for :
https://jira.opencord.org/browse/VOL-155,
& https://jira.opencord.org/browse/VOL-154.
Consul & Registrator - We just have to package the PKI files and Enable TLS.
-- Consul Start-Up Logs
======================
ssl.josn
=============
{
"ca_file": "/consul/config/voltha-CA-template.pem",
"cert_file": "/consul/config/voltha-cert-template.crt",
"key_file": "/consul/config/voltha-pvt-template.key",
"verify_incoming": true,
"verify_outgoing": true
}
Consul Start-up logs..
==========================
==> Starting Consul agent...
==> Consul agent running!
Version: 'v0.8.3'
Node ID: 'fc5cb7d0-106a-fa68-441f-251c5952d16c'
Node name: 'ca6ebcd10ce5'
Datacenter: 'dc1'
Server: true (bootstrap: true)
Client Addr: 0.0.0.0 (HTTP: 8501, HTTPS: 8500, DNS: 8600)
Cluster Addr: 172.18.0.4 (LAN: 8301, WAN: 8302)
Gossip encrypt: true, RPC-TLS: true, TLS-Incoming: true
Atlas: <disabled>
==> Log data will now stream in as it occurs:
======================
ssl.josn
=============
{
"ca_file": "/consul/config/voltha-CA-template.pem",
"cert_file": "/consul/config/voltha-cert-template.crt",
"key_file": "/consul/config/voltha-pvt-template.key",
"verify_incoming": false,
"verify_outgoing": false
}
Consul Start-up logs..
==========================
==> WARNING: LAN keyring exists but -encrypt given, using keyring
==> WARNING: WAN keyring exists but -encrypt given, using keyring
==> WARNING: Bootstrap mode enabled! Do not enable unless necessary
==> Starting Consul agent...
==> Consul agent running!
Version: 'v0.8.3'
Node ID: 'fc5cb7d0-106a-fa68-441f-251c5952d16c'
Node name: 'ca6ebcd10ce5'
Datacenter: 'dc1'
Server: true (bootstrap: true)
Client Addr: 0.0.0.0 (HTTP: 8501, HTTPS: 8500, DNS: 8600)
Cluster Addr: 172.18.0.6 (LAN: 8301, WAN: 8302)
Gossip encrypt: true, RPC-TLS: false, TLS-Incoming: false
Atlas: <disabled>
Change-Id: I8acc9b680019076843f8b9b331c72d7a9b973bb1
diff --git a/compose/docker-compose-system-test.yml b/compose/docker-compose-system-test.yml
index fb6385f..a3f2595 100644
--- a/compose/docker-compose-system-test.yml
+++ b/compose/docker-compose-system-test.yml
@@ -42,6 +42,8 @@
SERVICE_8300_IGNORE: "yes"
SERVICE_8400_IGNORE: "yes"
SERVICE_8500_NAME: "consul-rest"
+ volumes:
+ - "/cord/incubator/voltha/consul_config:/consul/config"
#
# Registrator
#
@@ -51,12 +53,17 @@
"-ip=${DOCKER_HOST_IP}",
"-retry-attempts", "100",
# "-internal",
- "consul://consul:8500"
+ "consul://consul-tls:8500"
]
links:
- consul
volumes:
- "/var/run/docker.sock:/tmp/docker.sock"
+ - "/cord/incubator/voltha/reg_config:/reg/config"
+ environment:
+ CONSUL_CACERT: "/reg/config/voltha-CA-template.pem"
+ CONSUL_TLSCERT: "/reg/config/voltha-cert-template.crt"
+ CONSUL_TLSKEY: "/reg/config/voltha-pvt-template.key"
#
# Fluentd log server