|
@@ -11,6 +11,8 @@ cd $SCRIPT_PATH
|
|
|
# Load the worker ids and SURIs as local variables only
|
|
|
. .env
|
|
|
|
|
|
+HOST_IP=$(tests/network-tests/get-host-ip.sh)
|
|
|
+
|
|
|
## Colossus 1
|
|
|
CLI=storage-node-v2/bin/run
|
|
|
|
|
@@ -21,10 +23,10 @@ ${CLI} operator:accept-invitation -w=${COLOSSUS_1_WORKER_ID} -i=${BUCKET_ID} --a
|
|
|
${CLI} leader:update-dynamic-bag-policy -n 1 -t Channel --accountUri ${COLOSSUS_1_ACCOUNT_URI}
|
|
|
${CLI} leader:update-data-fee -f 10 --accountUri ${COLOSSUS_1_ACCOUNT_URI} # Optionally - set some data fee per megabyte
|
|
|
|
|
|
-# This is only set initially to the name of the container to make it accessible by the distributors running as containers
|
|
|
-# in the same network. This should be updated to the "public" endpoint so the node is accessible from containers and
|
|
|
-# external applications like Atlas for example that depend on discovering the endpoint uri by querying the query-node.
|
|
|
-COLOSSUS_1_NODE_URI=${COLOSSUS_1_NODE_URI:="http://colossus-1:3333"}
|
|
|
+# The node uri should be an accessible endpoint from within a container as well as the host machine.
|
|
|
+# In production it would most likely be the reverse proxy endpoint. If not specified we
|
|
|
+# set it to the host machine address.
|
|
|
+COLOSSUS_1_NODE_URI=${COLOSSUS_1_NODE_URI:="http://${HOST_IP}:3333"}
|
|
|
${CLI} operator:set-metadata -w=${COLOSSUS_1_WORKER_ID} -i=${BUCKET_ID} -e="${COLOSSUS_1_NODE_URI}" --accountUri ${COLOSSUS_1_ACCOUNT_URI}
|
|
|
|
|
|
echo "Colossus 1 BUCKET_ID=${BUCKET_ID}"
|
|
@@ -43,9 +45,10 @@ ${CLI} leader:update-dynamic-bag-policy -t Channel -p ${FAMILY_ID}:5
|
|
|
${CLI} leader:invite-bucket-operator -f ${FAMILY_ID} -B ${BUCKET_ID} -w ${DISTRIBUTOR_1_WORKER_ID}
|
|
|
${CLI} operator:accept-invitation -f ${FAMILY_ID} -B ${BUCKET_ID} -w ${DISTRIBUTOR_1_WORKER_ID}
|
|
|
|
|
|
-# This should be updated to the "public" endpoint so the node is accessible from containers and
|
|
|
-# external applications like Atlas for example that depend on discovering the endpoint uri by querying the query-node.
|
|
|
-DISTRIBUTOR_1_NODE_URI=${DISTRIBUTOR_1_NODE_URI:="http://localhost:3334"}
|
|
|
+# The node uri should be an accessible endpoint from within a container as well as the host machine.
|
|
|
+# In production it would most likely be the reverse proxy endpoint. If not specified we
|
|
|
+# set it to the host machine address.
|
|
|
+DISTRIBUTOR_1_NODE_URI=${DISTRIBUTOR_1_NODE_URI:="http://${HOST_IP}:3334"}
|
|
|
${CLI} operator:set-metadata -f ${FAMILY_ID} -B ${BUCKET_ID} -w ${DISTRIBUTOR_1_WORKER_ID} -e="${DISTRIBUTOR_1_NODE_URI}"
|
|
|
|
|
|
echo "Distributor 1 FAMILY_ID=${FAMILY_ID}"
|