diff --git a/config/default.hjson b/config/default.hjson index 7ee3c52ccaab888cb00675bfdee7c855bc065df8..93920953f4c9865c8590152d861a2b15f796fc56 100644 --- a/config/default.hjson +++ b/config/default.hjson @@ -64,9 +64,11 @@ k8component: { prefix: "/beaker" autoRestart: true healthPath: "/" + healthScheme: "HTTP" healthDelay: 2 healthPeriod: 10 livePath: "/" + liveScheme: "HTTP" liveDelay: 2 livePeriod: 30 checksumSkipReStr: "^(?:path[0-9]*|escapedPath[0-9]*)$" diff --git a/deploy.sh b/deploy.sh index 8fc2bc58436ef33df688a16547b3451e68cf4dfa..021e5e6f4ac176fda361d0902687704035cc78d0 100755 --- a/deploy.sh +++ b/deploy.sh @@ -18,16 +18,14 @@ do --tls) tls=--tls ;; - --docker-only) + --update-docker) buildDocker=1 - updateDeploy="" ;; --always-pull) alwaysPull=1 ;; - --docker-skip) - buildDocker="" - updateDeploy=1 + --no-deploy-scripts) + updateDeploy="" ;; --no-push) noPush=1 @@ -53,7 +51,7 @@ do chownRoot=$1 ;; *) - echo "usage: $0 [--debug] [--tls] [--nomad-root ] [--chown-root ] [--env ] [--docker-only] [--docker-skip] [--target-hostname hostname] [--secret-web-certs ] [--always-pull] [--no-push]" + echo "usage: $0 [--debug] [--tls] [--nomad-root ] [--chown-root ] [--env ] [--update-docker] [--no-deploy-scripts] [--target-hostname hostname] [--secret-web-certs ] [--always-pull] [--no-push]" echo echo "Env variables: NODE_ENV, target_hostname, nomadRoot" echo "Examples:" @@ -67,7 +65,10 @@ do done chownRoot=${chownRoot:-$nomadRoot/servers/$target_hostname} -version=$(git describe --tags --always --dirty) +if [ -n "$buildDocker" ] ; then + git describe --tags --always --dirty > version_to_deploy +fi +version=$(cat version_to_deploy) name="analytics-toolkit.nomad-coe.eu:5509/nomadlab/nomad-container-manager:$version" if [ -n "$buildDocker" ] ; then if [ -n "$alwaysPull" ] ; then @@ -86,7 +87,7 @@ fi echo "# Initial setup" echo "To make kubectl work, for example for the test kubernetes" -echo " export KUBECONFIG=/nomad/nomadlab/kubernetes/dev/config" +echo " export KUBECONFIG=/etc/kubernetes/admin.conf" echo "# Helm install" if [ -n updateDeploy ]; then @@ -281,7 +282,7 @@ spec: containers: - name: notebooks-mongo image: mongo:3.4 - imagePullPolicy: IfNotPresent + imagePullPolicy: $pullPolicy ports: - containerPort: 27017 env: @@ -530,6 +531,10 @@ HERE fi if [ -n "$updateDeploy" ]; then + scheme=HTTP + if [ "$target_hostname" == "labdev-nomad" -o "$target_hostname" == "labtest-nomad" ] ; then + scheme=HTTPS + fi targetF=container-manager-deploy-$imageType.yaml cat > $targetF <> $targetF <