Commit 1a90f15e authored by Jorge Moratinos's avatar Jorge Moratinos
Browse files

Improvement of some checks

parent 6564c874
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -9,12 +9,12 @@ kubectl get svc -A | grep ingress-nginx-controller
  
### To deploy in other environment we need to setup urls according to it and also using specific kubeconfig:
if [ -f "$VAULT_FILE" ] && [ -s "$VAULT_FILE" ]; then
    echo "$VAULT_FILE exists and has next content"
    cat $VAULT_FILE
    VAULT_ACCESS_TOKEN=$(awk '/Initial Root Token/{ print $4 }' $VAULT_FILE)
    echo "$VAULT_FILE exists and has content."
else
    echo "$VAULT_FILE not exists or content is empty. Using value on VAULT_ACCESS_TOKEN=$VAULT_ACCESS_TOKEN"
    echo "$VAULT_FILE not exists or content is empty."
fi
echo "Using value on VAULT_ACCESS_TOKEN=$VAULT_ACCESS_TOKEN"

helm upgrade --install -n $CAPIF_NAMESPACE $CAPIF_NAME_VERSION_CHART $HELM_DIR/capif/ \
--set grafana.enabled=true \
+13 −14
Original line number Diff line number Diff line
@@ -3,6 +3,18 @@
# timestap to use along scripts
export timestamp=$(date +"%Y%m%d_%H%M%S")

# Directories variables setup (no modification needed)
export SCRIPTS_DIR=$(dirname "$(readlink -f "$0")")
export HELM_DIR=$(dirname "$SCRIPTS_DIR")
export CAPIF_BASE_DIR=$(dirname "$HELM_DIR")

# Print scripts directory
echo "The /helm/scripts directory is: $SCRIPTS_DIR"
echo "The /helm directory is: $HELM_DIR"
echo "The base directory is: $CAPIF_BASE_DIR"

# Configuration needed before use installation/uninstallation scripts

# Vault installation variables
## Vault configuration
export VAULT_HOSTNAME=vault.testbed.int
@@ -11,7 +23,7 @@ export VAULT_SERVICE_NAME='vault'
export LABEL_TO_CHECK="app.kubernetes.io/name"

## File to store key and token
export VAULT_FILE=vault_keys.txt
export VAULT_FILE="$HELM_DIR/vault_keys.txt"

## Vault domains to be included
export DOMAIN1=*.testbed.pre-production
@@ -51,16 +63,3 @@ export PROMETHEUS_URL='http://monitoring-prometheus.monitoring.svc.cluster.local
export VAULT_INTERNAL_HOSTNAME="$VAULT_SERVICE_NAME.$VAULT_NAMESPACE.svc.cluster.local"
export VAULT_PORT="8200"
export VAULT_ACCESS_TOKEN="dev-only-token"


# Directories variables setup (no modification needed)
export SCRIPTS_DIR=$(dirname "$(readlink -f "$0")")
export HELM_DIR=$(dirname "$SCRIPTS_DIR")
export CAPIF_BASE_DIR=$(dirname "$HELM_DIR")

# Print scripts directory
echo "The /helm/scripts directory is: $SCRIPTS_DIR"
echo "The /helm directory is: $HELM_DIR"
echo "The base directory is: $CAPIF_BASE_DIR"