From 7537cafcf3e5e5cf2153eb5154643e918a0602f2 Mon Sep 17 00:00:00 2001 From: Josh Kneubuhl Date: Tue, 3 May 2022 11:32:46 -0400 Subject: [PATCH] Use vcap.me as CI is not able to modify the /etc/hosts with a dummy DNS domain Signed-off-by: Josh Kneubuhl --- test-network-k8s/README.md | 31 +++++++++++++++++++------------ test-network-k8s/network | 2 +- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/test-network-k8s/README.md b/test-network-k8s/README.md index 98f944b1..cbcc22fd 100644 --- a/test-network-k8s/README.md +++ b/test-network-k8s/README.md @@ -22,19 +22,26 @@ _Fabric, Ahoy!_ - K8s: [kind](https://kind.sigs.k8s.io/docs/user/quick-start/#installation) or [Rancher / k3s](https://rancherdesktop.io) - [jq](https://stedolan.github.io/jq/) - [envsubst](https://www.gnu.org/software/gettext/manual/html_node/envsubst-Invocation.html) (`brew install gettext` on OSX) -- DNS domain alias: Fabric services are exposed by Kubernetes Ingress at the fictitious DNS domain `*.local.fabric`. Add the - following aliases to your /etc/hosts file: + +### OSX DNS + +Fabric services are exposed by Ingress at the wildcard DNS domain `*.vcap.me`, resolving to the +loopback interface at 127.0.0.1. + +On OSX, the Fabric golang binaries are not able to resolve hosts at this domain. As a workaround, add +the following entries to your /etc/hosts file: + ``` -127.0.0.1 org0-ca.local.fabric -127.0.0.1 org1-ca.local.fabric -127.0.0.1 org2-ca.local.fabric -127.0.0.1 org0-orderer1.local.fabric -127.0.0.1 org0-orderer2.local.fabric -127.0.0.1 org0-orderer3.local.fabric -127.0.0.1 org1-peer1.local.fabric -127.0.0.1 org1-peer2.local.fabric -127.0.0.1 org2-peer1.local.fabric -127.0.0.1 org2-peer2.local.fabric +127.0.0.1 org0-ca.vcap.me +127.0.0.1 org1-ca.vcap.me +127.0.0.1 org2-ca.vcap.me +127.0.0.1 org0-orderer1.vcap.me +127.0.0.1 org0-orderer2.vcap.me +127.0.0.1 org0-orderer3.vcap.me +127.0.0.1 org1-peer1.vcap.me +127.0.0.1 org1-peer2.vcap.me +127.0.0.1 org2-peer1.vcap.me +127.0.0.1 org2-peer2.vcap.me ``` ## Quickstart diff --git a/test-network-k8s/network b/test-network-k8s/network index 481a6438..d4db63d3 100755 --- a/test-network-k8s/network +++ b/test-network-k8s/network @@ -27,7 +27,7 @@ export FABRIC_PEER_IMAGE=${TEST_NETWORK_FABRIC_PEER_IMAGE:-${FABRIC_CONTAINER_RE export NETWORK_NAME=${TEST_NETWORK_NAME:-test-network} export CLUSTER_NAME=${TEST_NETWORK_KIND_CLUSTER_NAME:-kind} export NS=${TEST_NETWORK_KUBE_NAMESPACE:-${NETWORK_NAME}} -export DOMAIN=${TEST_NETWORK_DOMAIN:-local.fabric} +export DOMAIN=${TEST_NETWORK_DOMAIN:-vcap.me} export CHANNEL_NAME=${TEST_NETWORK_CHANNEL_NAME:-mychannel} export TEMP_DIR=${PWD}/build