diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/builder_image/Dockerfile | 7 | ||||
-rw-r--r-- | script/builder_image/Makefile | 8 | ||||
-rwxr-xr-x | script/dev-bucket.sh | 3 | ||||
-rwxr-xr-x | script/dev-cluster.sh | 9 | ||||
-rwxr-xr-x | script/dev-configure.sh | 9 | ||||
-rwxr-xr-x | script/test-smoke.sh | 4 |
6 files changed, 20 insertions, 20 deletions
diff --git a/script/builder_image/Dockerfile b/script/builder_image/Dockerfile deleted file mode 100644 index 908c7e3c..00000000 --- a/script/builder_image/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM rust:buster -RUN apt-get update && \ - apt-get install --yes libsodium-dev awscli python-pip wget rclone openssl socat && \ - rm -rf /var/lib/apt/lists/* -RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc -O /usr/local/bin/mc && chmod +x /usr/local/bin/mc -RUN rustup component add rustfmt clippy -RUN pip install s3cmd diff --git a/script/builder_image/Makefile b/script/builder_image/Makefile deleted file mode 100644 index 00b0f6c7..00000000 --- a/script/builder_image/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -DOCKER=lxpz/garage_builder_amd64 - -docker: - docker build -t $(DOCKER):$(TAG) . - docker push $(DOCKER):$(TAG) - docker tag $(DOCKER):$(TAG) $(DOCKER):latest - docker push $(DOCKER):latest - diff --git a/script/dev-bucket.sh b/script/dev-bucket.sh index 8a3587be..05d8c105 100755 --- a/script/dev-bucket.sh +++ b/script/dev-bucket.sh @@ -6,7 +6,8 @@ SCRIPT_FOLDER="`dirname \"$0\"`" REPO_FOLDER="${SCRIPT_FOLDER}/../" GARAGE_DEBUG="${REPO_FOLDER}/target/debug/" GARAGE_RELEASE="${REPO_FOLDER}/target/release/" -PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:$PATH" +NIX_RELEASE="${REPO_FOLDER}/result/bin/" +PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:${NIX_RELEASE}:$PATH" garage bucket create eprouvette KEY_INFO=`garage key new --name opérateur` diff --git a/script/dev-cluster.sh b/script/dev-cluster.sh index bb5f9a08..0afdd97c 100755 --- a/script/dev-cluster.sh +++ b/script/dev-cluster.sh @@ -6,7 +6,8 @@ SCRIPT_FOLDER="`dirname \"$0\"`" REPO_FOLDER="${SCRIPT_FOLDER}/../" GARAGE_DEBUG="${REPO_FOLDER}/target/debug/" GARAGE_RELEASE="${REPO_FOLDER}/target/release/" -PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:$PATH" +NIX_RELEASE="${REPO_FOLDER}/result/bin/" +PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:${NIX_RELEASE}:$PATH" FANCYCOLORS=("41m" "42m" "44m" "45m" "100m" "104m") export RUST_BACKTRACE=1 @@ -63,7 +64,13 @@ fi (garage server -c /tmp/config.$count.toml 2>&1|while read r; do echo -en "$LABEL $r\n"; done) & done +RETRY=120 until garage status 2>&1|grep -q Healthy ; do + (( RETRY-- )) + if (( RETRY <= 0 )); then + echo -en "${MAIN_LABEL} Garage did not start" + exit 1 + fi echo -en "${MAIN_LABEL} cluster starting...\n" sleep 1 done diff --git a/script/dev-configure.sh b/script/dev-configure.sh index bc8352d8..fdae959b 100755 --- a/script/dev-configure.sh +++ b/script/dev-configure.sh @@ -6,10 +6,17 @@ SCRIPT_FOLDER="`dirname \"$0\"`" REPO_FOLDER="${SCRIPT_FOLDER}/../" GARAGE_DEBUG="${REPO_FOLDER}/target/debug/" GARAGE_RELEASE="${REPO_FOLDER}/target/release/" -PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:$PATH" +NIX_RELEASE="${REPO_FOLDER}/result/bin/" +PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:${NIX_RELEASE}:$PATH" sleep 5 +RETRY=120 until garage status 2>&1|grep -q Healthy ; do + (( RETRY-- )) + if (( RETRY <= 0 )); then + echo "garage did not start in time, failing." + exit 1 + fi echo "cluster starting..." sleep 1 done diff --git a/script/test-smoke.sh b/script/test-smoke.sh index 0417b2af..335d55e9 100755 --- a/script/test-smoke.sh +++ b/script/test-smoke.sh @@ -8,13 +8,13 @@ SCRIPT_FOLDER="`dirname \"$0\"`" REPO_FOLDER="${SCRIPT_FOLDER}/../" GARAGE_DEBUG="${REPO_FOLDER}/target/debug/" GARAGE_RELEASE="${REPO_FOLDER}/target/release/" -PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:$PATH" +NIX_RELEASE="${REPO_FOLDER}/result/bin/" +PATH="${GARAGE_DEBUG}:${GARAGE_RELEASE}:${NIX_RELEASE}:$PATH" # @FIXME Duck is not ready for testing, we have a bug SKIP_DUCK=1 echo "⏳ Setup" -cargo build ${SCRIPT_FOLDER}/dev-clean.sh ${SCRIPT_FOLDER}/dev-cluster.sh > /tmp/garage.log 2>&1 & ${SCRIPT_FOLDER}/dev-configure.sh |