Skip to content
Snippets Groups Projects
Commit 6938e718 authored by Fawzi Mohamed's avatar Fawzi Mohamed Committed by Mohamed, Fawzi Roberto (fawzi)
Browse files

update scheme for probes

parent 47450531
No related branches found
No related tags found
No related merge requests found
...@@ -64,9 +64,11 @@ k8component: { ...@@ -64,9 +64,11 @@ k8component: {
prefix: "/beaker" prefix: "/beaker"
autoRestart: true autoRestart: true
healthPath: "/" healthPath: "/"
healthScheme: "HTTP"
healthDelay: 2 healthDelay: 2
healthPeriod: 10 healthPeriod: 10
livePath: "/" livePath: "/"
liveScheme: "HTTP"
liveDelay: 2 liveDelay: 2
livePeriod: 30 livePeriod: 30
checksumSkipReStr: "^(?:path[0-9]*|escapedPath[0-9]*)$" checksumSkipReStr: "^(?:path[0-9]*|escapedPath[0-9]*)$"
......
...@@ -18,16 +18,14 @@ do ...@@ -18,16 +18,14 @@ do
--tls) --tls)
tls=--tls tls=--tls
;; ;;
--docker-only) --update-docker)
buildDocker=1 buildDocker=1
updateDeploy=""
;; ;;
--always-pull) --always-pull)
alwaysPull=1 alwaysPull=1
;; ;;
--docker-skip) --no-deploy-scripts)
buildDocker="" updateDeploy=""
updateDeploy=1
;; ;;
--no-push) --no-push)
noPush=1 noPush=1
...@@ -53,7 +51,7 @@ do ...@@ -53,7 +51,7 @@ do
chownRoot=$1 chownRoot=$1
;; ;;
*) *)
echo "usage: $0 [--debug] [--tls] [--nomad-root <pathToNomadRoot>] [--chown-root <pathForPrometheusVolumes>] [--env <NODE_ENV_VALUE>] [--docker-only] [--docker-skip] [--target-hostname hostname] [--secret-web-certs <secretName>] [--always-pull] [--no-push]" echo "usage: $0 [--debug] [--tls] [--nomad-root <pathToNomadRoot>] [--chown-root <pathForPrometheusVolumes>] [--env <NODE_ENV_VALUE>] [--update-docker] [--no-deploy-scripts] [--target-hostname hostname] [--secret-web-certs <secretName>] [--always-pull] [--no-push]"
echo echo
echo "Env variables: NODE_ENV, target_hostname, nomadRoot" echo "Env variables: NODE_ENV, target_hostname, nomadRoot"
echo "Examples:" echo "Examples:"
...@@ -67,7 +65,10 @@ do ...@@ -67,7 +65,10 @@ do
done done
chownRoot=${chownRoot:-$nomadRoot/servers/$target_hostname} 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" name="analytics-toolkit.nomad-coe.eu:5509/nomadlab/nomad-container-manager:$version"
if [ -n "$buildDocker" ] ; then if [ -n "$buildDocker" ] ; then
if [ -n "$alwaysPull" ] ; then if [ -n "$alwaysPull" ] ; then
...@@ -86,7 +87,7 @@ fi ...@@ -86,7 +87,7 @@ fi
echo "# Initial setup" echo "# Initial setup"
echo "To make kubectl work, for example for the test kubernetes" 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" echo "# Helm install"
if [ -n updateDeploy ]; then if [ -n updateDeploy ]; then
...@@ -281,7 +282,7 @@ spec: ...@@ -281,7 +282,7 @@ spec:
containers: containers:
- name: notebooks-mongo - name: notebooks-mongo
image: mongo:3.4 image: mongo:3.4
imagePullPolicy: IfNotPresent imagePullPolicy: $pullPolicy
ports: ports:
- containerPort: 27017 - containerPort: 27017
env: env:
...@@ -530,6 +531,10 @@ HERE ...@@ -530,6 +531,10 @@ HERE
fi fi
if [ -n "$updateDeploy" ]; then 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 targetF=container-manager-deploy-$imageType.yaml
cat > $targetF <<HERE cat > $targetF <<HERE
apiVersion: apps/v1beta2 apiVersion: apps/v1beta2
...@@ -655,10 +660,6 @@ EOF ...@@ -655,10 +660,6 @@ EOF
name: web-certs name: web-certs
EOF EOF
fi fi
scheme=HTTP
if [ "$target_hostname" == "labdev-nomad" -o "$target_hostname" == "labtest-nomad" ] ; then
scheme=HTTPS
fi
cat >> $targetF <<EOF cat >> $targetF <<EOF
- mountPath: "/usr/src/app/kube-certs" - mountPath: "/usr/src/app/kube-certs"
name: kube-certs name: kube-certs
......
...@@ -41,12 +41,14 @@ spec: ...@@ -41,12 +41,14 @@ spec:
httpGet: httpGet:
path: "{{e healthPath}}" path: "{{e healthPath}}"
port: {{n port}} port: {{n port}}
scheme: "{{e healthScheme}}"
initialDelaySeconds: {{n healthDelay}} initialDelaySeconds: {{n healthDelay}}
periodSeconds: {{n healthPeriod}} periodSeconds: {{n healthPeriod}}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: "{{e livePath}}" path: "{{e livePath}}"
port: {{n port}} port: {{n port}}
scheme: "{{e liveScheme}}"
initialDelaySeconds: {{n liveDelay}} initialDelaySeconds: {{n liveDelay}}
periodSeconds: {{n livePeriod}} periodSeconds: {{n livePeriod}}
volumes: volumes:
......
...@@ -43,12 +43,14 @@ spec: ...@@ -43,12 +43,14 @@ spec:
httpGet: httpGet:
path: "{{e healthPath}}" path: "{{e healthPath}}"
port: {{n port}} port: {{n port}}
scheme: "{{e healthScheme}}"
initialDelaySeconds: {{n healthDelay}} initialDelaySeconds: {{n healthDelay}}
periodSeconds: {{n healthPeriod}} periodSeconds: {{n healthPeriod}}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: "{{e livePath}}" path: "{{e livePath}}"
port: {{n port}} port: {{n port}}
scheme: "{{e liveScheme}}"
initialDelaySeconds: {{n liveDelay}} initialDelaySeconds: {{n liveDelay}}
periodSeconds: {{n livePeriod}} periodSeconds: {{n livePeriod}}
volumes: volumes:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment