Start demo improved
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
#!/bin/bash
|
||||
export KUBERNETES_ENV_FILE=$(realpath ${KUBERNETES_ENV_FILE=:-"./kube.exemple.env"})
|
||||
server=$(grep 'server:' ~/.kube/config | awk '{print $2}')
|
||||
|
||||
host=$(echo "$server" | sed -E 's#https://([^:]+):([0-9]+)#\1#')
|
||||
port=$(echo "$server" | sed -E 's#https://([^:]+):([0-9]+)#\2#')
|
||||
ca=$(grep 'certificate-authority-data:' ~/.kube/config | awk '{print $2}')
|
||||
cert=$(grep 'client-certificate-data:' ~/.kube/config | awk '{print $2}')
|
||||
key=$(grep 'client-key-data:' ~/.kube/config | awk '{print $2}')
|
||||
|
||||
export HOST=${HOST:-"http://localhost:8000"}
|
||||
docker network create oc | true
|
||||
|
||||
@@ -7,6 +14,7 @@ docker compose down
|
||||
cd ./tools && docker compose -f ./docker-compose.dev.yml up --force-recreate -d
|
||||
docker compose -f ./docker-compose.traefik.yml up --force-recreate -d && cd ..
|
||||
|
||||
|
||||
cd ../..
|
||||
|
||||
REPOS=(
|
||||
@@ -28,7 +36,15 @@ do
|
||||
docker kill $i | true
|
||||
docker rm $i | true
|
||||
cd ./$i
|
||||
cp $KUBERNETES_ENV_FILE ./env.env
|
||||
cat > ./env.env <<EOF
|
||||
KUBERNETES_SERVICE_HOST=$host
|
||||
KUBERNETES_SERVICE_PORT=$port
|
||||
KUBE_CA="$ca"
|
||||
KUBE_CERT="$cert"
|
||||
KUBE_DATA="$key"
|
||||
EOF
|
||||
make run-docker
|
||||
cd ..
|
||||
done
|
||||
|
||||
docker compose up hydra-client -d
|
||||
|
||||
Reference in New Issue
Block a user