mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Rename CLUSTER_ variables by SWARM_NODE_ when running tests
CLUSTER_NAME -> SWARM_NODE_NAME CLUSTER_IP -> SWARM_NODE_IP
This commit is contained in:
parent
5275fc78f2
commit
90dde1d9c9
@ -23,5 +23,5 @@ PORTAINER_VERSION=latest
|
|||||||
PORTAINER_COMMAND_OPTIONS=""
|
PORTAINER_COMMAND_OPTIONS=""
|
||||||
#PORTAINER_COMMAND_OPTIONS=" --no-analytics"
|
#PORTAINER_COMMAND_OPTIONS=" --no-analytics"
|
||||||
|
|
||||||
CLUSTER_NAME=localhost
|
SWARM_NODE_NAME=localhost
|
||||||
CLUSTER_IP=$(hostname -I | awk '{ print $1 }')
|
SWARM_NODE_IP=$(hostname -I | awk '{ print $1 }')
|
||||||
|
@ -13,9 +13,9 @@ fi
|
|||||||
|
|
||||||
[[ "$TRACE" ]] && set -x
|
[[ "$TRACE" ]] && set -x
|
||||||
|
|
||||||
CLUSTER_NAME=${CLUSTER_NAME:-cluster}
|
SWARM_NODE_NAME=${SWARM_NODE_NAME:-cluster}
|
||||||
CLUSTER_IP=${CLUSTER_IP:-$(getent hosts $CLUSTER_NAME | awk '{ print $1 }')}
|
SWARM_NODE_IP=${SWARM_NODE_IP:-$(getent hosts $SWARM_NODE_NAME | awk '{ print $1 }')}
|
||||||
export BASE_DOMAIN="$CLUSTER_IP.nip.io"
|
export BASE_DOMAIN="$SWARM_NODE_IP.nip.io"
|
||||||
export PSU_STACK_NAME="web-app"
|
export PSU_STACK_NAME="web-app"
|
||||||
PSU_URL="https://portainer.$BASE_DOMAIN"
|
PSU_URL="https://portainer.$BASE_DOMAIN"
|
||||||
PSU_USER="admin"
|
PSU_USER="admin"
|
||||||
@ -86,7 +86,7 @@ docker swarm init
|
|||||||
# Parse the Docker traefik stack file to deploy
|
# Parse the Docker traefik stack file to deploy
|
||||||
envsubst '$TRAEFIK_VERSION,$BASE_DOMAIN' < dockerfiles/docker-stack-traefik.yml > dockerfiles/docker-stack-traefik-final.yml
|
envsubst '$TRAEFIK_VERSION,$BASE_DOMAIN' < dockerfiles/docker-stack-traefik.yml > dockerfiles/docker-stack-traefik-final.yml
|
||||||
docker stack deploy -c dockerfiles/docker-stack-traefik-final.yml traefik --with-registry-auth
|
docker stack deploy -c dockerfiles/docker-stack-traefik-final.yml traefik --with-registry-auth
|
||||||
bash -c "timeout 20 bash -c 'while ! (echo > /dev/tcp/$CLUSTER_NAME/443 && curl -fks --max-time 2 https://traefik.$BASE_DOMAIN) >/dev/null 2>&1; do sleep 1; done;'"
|
bash -c "timeout 20 bash -c 'while ! (echo > /dev/tcp/$SWARM_NODE_NAME/443 && curl -fks --max-time 2 https://traefik.$BASE_DOMAIN) >/dev/null 2>&1; do sleep 1; done;'"
|
||||||
|
|
||||||
# Deploy Portainer test
|
# Deploy Portainer test
|
||||||
# Create admin password as a Docker secret
|
# Create admin password as a Docker secret
|
||||||
|
Loading…
Reference in New Issue
Block a user