From 5473b8475a9052fb23571ccbb979ac030d9b6761 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Wed, 6 Apr 2022 11:59:28 +0200 Subject: [PATCH 1/3] Update portal control scripts, so they can talk to the new health-check container. --- scripts/portal-down.sh | 6 ++++-- scripts/portal-up.sh | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/scripts/portal-down.sh b/scripts/portal-down.sh index 0b42b53a..a60ed863 100755 --- a/scripts/portal-down.sh +++ b/scripts/portal-down.sh @@ -2,15 +2,17 @@ set -e # exit on first error -while getopts d:t: flag +while getopts d:t:r: flag do case "${flag}" in d) delay=${OPTARG};; t) timeout=${OPTARG};; + r) reason=${OPTARG};; esac done delay=${delay:-0} # default to no delay timeout=${timeout:-300} # default timeout is 300s +reason=${reason:-"disabled manually"} countdown() { local secs=$1 @@ -25,7 +27,7 @@ countdown() { countdown $delay # stop healh-check so the server is taken our of load balancer -docker exec health-check cli/disable +docker exec health-check cli disable $reason # then wait 5 minutes for the load balancer to propagate the dns records countdown $timeout diff --git a/scripts/portal-up.sh b/scripts/portal-up.sh index 1a287f2f..fcd7fe80 100755 --- a/scripts/portal-up.sh +++ b/scripts/portal-up.sh @@ -3,4 +3,4 @@ set -e # exit on first error # start the health-checks service -docker exec health-check cli/enable +docker exec health-check cli enable From e2171b5a8923803d0d79b610ca9d9537cd74b5d1 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Wed, 6 Apr 2022 18:18:32 +0200 Subject: [PATCH 2/3] Don't use a default reason when downing a portal. --- scripts/portal-down.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/portal-down.sh b/scripts/portal-down.sh index a60ed863..476ce837 100755 --- a/scripts/portal-down.sh +++ b/scripts/portal-down.sh @@ -12,7 +12,11 @@ do done delay=${delay:-0} # default to no delay timeout=${timeout:-300} # default timeout is 300s -reason=${reason:-"disabled manually"} + +if [[ -z $reason ]]; then + echo "Please provide a reason for disabling the portal (use '-r ')." + exit 1 +fi countdown() { local secs=$1 @@ -26,7 +30,7 @@ countdown() { # delay disabling the portal countdown $delay -# stop healh-check so the server is taken our of load balancer +# stop health-check so the server is taken our of load balancer docker exec health-check cli disable $reason # then wait 5 minutes for the load balancer to propagate the dns records From a6687a8457f2b456b98d838f275fadeb6c7c07d3 Mon Sep 17 00:00:00 2001 From: Ivaylo Novakov Date: Wed, 6 Apr 2022 18:19:20 +0200 Subject: [PATCH 3/3] Fix README link. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4c27d268..337f9791 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ Latest Skynet Webportal setup documentation and the setup process Skynet Labs supports is located at https://docs.siasky.net/webportal-management/overview. -Some of the scripts and setup documentation contained in this repository -(`skynet-webportal`) can be outdated and generally should not be used. +Some scripts and setup documentation contained in this repository +(`skynet-webportal`) may be outdated and generally should not be used. ## Web application @@ -35,7 +35,7 @@ For the purposes of complying with our code license, you can use the following S `fb6c9320bc7e01fbb9cd8d8c3caaa371386928793c736837832e634aaaa484650a3177d6714a` ## Running a Portal -For those interested in running a Webportal, head over to our developer docs [here](https://docs.siasky.net/webportal-management/overview.) to learn more. +For those interested in running a Webportal, head over to our developer docs [here](https://portal-docs.skynetlabs.com/) to learn more. ## Contributing