Multiple Fixes in Registrator to Consul Communication.
- TLS works with Certificate Verififcation on both sides.
- registrator changed from latest to master , docker pull gliderlabs/registrator:master
- A source code fix is needed in Registrator to make TLS work.
Change-Id: Ib23e0c790b9edd303d2292e87b4ea8149aa0311f
diff --git a/Makefile b/Makefile
index db15322..c308592 100644
--- a/Makefile
+++ b/Makefile
@@ -56,7 +56,6 @@
@echo "grafana : Build the grafana docker container"
@echo "nginx : Build the nginx docker container"
@echo "consul : Build the consul docker container"
- @echo "registrator : Build the registrator docker container"
@echo
## New directories can be added here
@@ -174,7 +173,7 @@
fetch:
docker pull consul:latest
docker pull fluent/fluentd:latest
- docker pull gliderlabs/registrator:latest
+ docker pull gliderlabs/registrator:master
docker pull ubuntu:xenial
docker pull wurstmeister/kafka:latest
docker pull wurstmeister/zookeeper:latest
diff --git a/compose/docker-compose-system-test-encrypted.yml b/compose/docker-compose-system-test-encrypted.yml
index 4b8a7c5..d6c4c25 100644
--- a/compose/docker-compose-system-test-encrypted.yml
+++ b/compose/docker-compose-system-test-encrypted.yml
@@ -31,7 +31,7 @@
#
consul:
image: voltha/consul
- command: agent -server -bootstrap -client 0.0.0.0 -ui
+ command: agent -server -bootstrap -client 0.0.0.0 -ui
ports:
- "8300:8300"
- "8400:8400"
@@ -51,7 +51,7 @@
"-ip=${DOCKER_HOST_IP}",
"-retry-attempts", "100",
# "-internal",
- "consul://consul-tls:8501"
+ "consul-tls://consul:8501"
]
links:
- consul
@@ -59,8 +59,8 @@
- "/var/run/docker.sock:/tmp/docker.sock"
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"
+ CONSUL_CLIENT_CERT: "/reg/config/voltha-cert-template.crt"
+ CONSUL_CLIENT_KEY: "/reg/config/voltha-pvt-template.key"
#
# Fluentd log server
@@ -285,7 +285,7 @@
- portainer
restart: unless-stopped
volumes:
- - "/cord/incubator/voltha/nginx_config:/nginx_config"
+ - "/home/cord/cord/incubator/voltha/nginx_config:/nginx_config"
#
# Docker ui
diff --git a/consul_config/voltha-cert-template.crt b/consul_config/voltha-cert-template.crt
index 587c562..456876c 100755
--- a/consul_config/voltha-cert-template.crt
+++ b/consul_config/voltha-cert-template.crt
@@ -1,22 +1,22 @@
-----BEGIN CERTIFICATE-----
-MIIDqzCCApMCCQCX5iDODvryVzANBgkqhkiG9w0BAQsFADCBkzELMAkGA1UEBhMC
+MIIDnzCCAocCCQDWGTSrh75/vjANBgkqhkiG9w0BAQsFADCBkzELMAkGA1UEBhMC
QUExCzAJBgNVBAgMAkJCMQswCQYDVQQHDAJDQzERMA8GA1UECgwISUNlcnRpZnkx
ETAPBgNVBAsMCFNlY3VyaXR5MSQwIgYDVQQDDBtJY2VydGlmeSBDcnlwdG9ncmFw
aHkgR3JvdXAxHjAcBgkqhkiG9w0BCQEWD2NhQGljZXJ0aWZ5LmNvbTAeFw0xNzA2
-MDExMTAzMjlaFw0xNzA3MDExMTAzMjlaMIGaMQswCQYDVQQGEwJVUzELMAkGA1UE
+MTQxNTQ2MzJaFw0xNzA3MTQxNTQ2MzJaMIGOMQswCQYDVQQGEwJVUzELMAkGA1UE
CAwCQ0ExEzARBgNVBAcMCk1lbmxvIFBhcmsxEzARBgNVBAoMCk9wZW5Wb2x0aGEx
-DzANBgNVBAsMBlItQ09SRDEdMBsGA1UEAwwUUi1DT1JEIEFjZXNzIE5ldHdvcmsx
-JDAiBgkqhkiG9w0BCQEWFXItY29yZEBPcGVuVm9sdGhhLmNvbTCCASIwDQYJKoZI
-hvcNAQEBBQADggEPADCCAQoCggEBAL6MygF1d8jLOSjiteHic7/8EN2tN6q/cvts
-Zo7e5PDLtv7LyJJ0aCC5Jborvyh2JzC5pCpCrQMBvlJULwqU5Ft6Y61g+EVJg3Km
-OF3VvQw0Jx3P31BUCOZmbj8SPAzZRuBnTuw2EG8Kllk0caEojQojY0dvb0977hnT
-+j/fp91c7bsgHy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9w0BAQsFAAOC
+AQEAJSDalFDHxpSS1S7HOzG9H5ZOzQBfIUznRg7PBI2Ys/dQHkPP4HcjbLdCFVHt
+FOzo2tW16P+85hbcZI/1AtuXZWxEClQHWIxpIqAUPh8YxHjgr60krrQOtTKouKi9
+80GW9/NLWdW+b1YxRMYX7fRrkaLv4HO0HECNYC6E4Lb0urDhLBwNPqRolIve+2SY
+vJdy9rI1u6nMdmqdZkRtjxMe3bRUb1TeXg0OmJG/ubco65drxgpvsQqWWK5iCT32
+R+buKMtdpNJDOM55aa64WTgeWdg9IbSchlsoKJTRekUvHX2S3y1mshZxLaee89Mo
+kPudyekeIoMHrOcdltiVarCKdw==
-----END CERTIFICATE-----
diff --git a/consul_config/voltha-pvt-template.key b/consul_config/voltha-pvt-template.key
index 27b51dd..044d805 100755
--- a/consul_config/voltha-pvt-template.key
+++ b/consul_config/voltha-pvt-template.key
@@ -1,27 +1,27 @@
-----BEGIN RSA PRIVATE KEY-----
-MIIEpQIBAAKCAQEAvozKAXV3yMs5KOK14eJzv/wQ3a03qr9y+2xmjt7k8Mu2/svI
-knRoILkluiu/KHYnMLmkKkKtAwG+UlQvCpTkW3pjrWD4RUmDcqY4XdW9DDQnHc/f
-UFQI5mZuPxI8DNlG4GdO7DYQbwqWWTRxoSiNCiNjR29vT3vuGdP6P9+n3VztuyAf
-Lg8q26nA55QeQ4zdlzFTsqtfncFmbKUlVeoT2i0NOWNOqGPoXjFKWgYE86ybrBxf
-Ra1LlB8IUWOZoDcmVNxdZ98uGs/43VsuUpvXQhYaXGIFXLnaDOblOfeGUUxo5QMc
-driRcEICN8U/NiD2/JP7BoZ3gBD55txu6LQLqwIDAQABAoIBAQCZohodIwD5PCFR
-/bh374Uz/Z/7m3WOjd2/KZ9nAf/Exfs9ZEDLFGAAQkdQ24S8ssbWWlcqW6fzDKzO
-5GEpPvL/bqZ/W/fQpXz+K1a3EWXjOQlw1/FNavPiECRDZghUs7qZo7HWcaC+ZuLh
-+Y7ESVWuHuok5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CYVR7UFXY
+Knq+ZQ26CtzkFCkQCkdlJ5TJNES7wgwPsqgStF7FAoGBAPKQoPruxawlVSmDmJpX
+WUl2laihARq1l+6zllSlydKDqsS6r5IC6fSF2pLudqIb2UyiMoMLNGpSako4cSHQ
+FXWhah+WVb6B5ENU1TpqMDShC8El/vA2vKtXu1CrQPAycgJTkbHPNI6z2kiH7eee
+QE1wd0rAd7nYjqOzUcYTiSr5AoGAZZ3WoNfviP6AYyVg33SyDAPZqg0IlyeqF6wX
+eUoy8EezyO9Y5YZW/rWnAaZe62R0t42kA0jNPZpMrsUPVa+LlB6A0H2sEZ1RtTu2
+AophKWDHp6AkbvFjS/2b1ieUZDLDum4OBQaeHb1FaQhUVgaKiskI2MgKK9Pk1ish
+zFBNGG0CgYBdtdDMUD02UAB0g4AApOR5MOWTSDlGUe/pwYBicZop5TsYad4wcf90
+z+og3nHKdN8MAljoNX9fJJ8Jzqdy1hv/yD5rnFhTq7R50+Vi7FegQogPAioa0nqe
+0ab5aVtCIOGoFnc1/CuGAcdRVrA1FFq+dTKh617nkE9MjJ2ByxcbTw==
-----END RSA PRIVATE KEY-----
diff --git a/docker/Dockerfile.registrator b/docker/Dockerfile.registrator
index 413e776..fe261a3 100644
--- a/docker/Dockerfile.registrator
+++ b/docker/Dockerfile.registrator
@@ -15,8 +15,10 @@
# limitations under the License.
#
-FROM gliderlabs/registrator
+FROM gliderlabs/registrator:master
+#FROM registrator:dev
+#ENTRYPOINT ["/bin/registrator"]
# Create Registrator Config Directory
RUN mkdir -p /reg/config
COPY reg_config /reg/config