Skip to content

Commit

Permalink
bugfixes discovered during testing
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes94 committed Dec 5, 2024
1 parent 35692c4 commit 2979f1b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 26 deletions.
52 changes: 28 additions & 24 deletions dev/env/scripts/up.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,6 @@ if [[ -d "${MANIFESTS_DIR}/cluster-type-${CLUSTER_TYPE}" ]]; then
apply "${MANIFESTS_DIR}/cluster-type-${CLUSTER_TYPE}"
fi

# Deploy database.
log "Deploying database"
make -C "$GITROOT" deploy/db
wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "application=fleet-manager-db" "postgresql"
log "Database is ready."

# Deploy Cloud Service components.
log "Deploying secrets"
chamber exec "fleet-manager" -- make -C "$GITROOT" deploy/secrets
Expand All @@ -58,14 +52,21 @@ if ! is_openshift_cluster "$CLUSTER_TYPE"; then
make -C "$GITROOT" deploy/redhat-pull-secret
fi

if [ -z "${DATAPLANE_ONLY}" ] || [ "${DATAPLANE_ONLY}" = "false" ]; then
DATAPLANE_ONLY=${DATAPLANE_ONLY:-}
if [[ "${DATAPLANE_ONLY}" == "" ]]; then
# Deploy database.
log "Deploying database"
make -C "$GITROOT" deploy/db
wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "application=fleet-manager-db" "postgresql"
log "Database is ready."

log "Deploying fleet-manager"
make -C "$GITROOT" deploy/service
wait_for_container_to_appear "$ACSCS_NAMESPACE" "app=fleet-manager" "service"
fi

if [[ "$SPAWN_LOGGER" == "true" && -n "${LOG_DIR:-}" ]]; then
if [[ "$SPAWN_LOGGER" == "true" && -n "${LOG_DIR:-}" ]]; then
$KUBECTL -n "$ACSCS_NAMESPACE" logs -l app=fleet-manager --all-containers --pod-running-timeout=1m --since=1m --tail=100 -f >"${LOG_DIR}/pod-logs_fleet-manager.txt" 2>&1 &
fi
fi

log "Deploying fleetshard-sync"
Expand All @@ -92,25 +93,28 @@ fi

# Sanity check.
wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "app=fleetshard-sync" "fleetshard-sync" 500
# Prerequisite for port-forwarding are pods in ready state.
wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "app=fleet-manager" "service"

if [[ "$ENABLE_EMAIL_SENDER" == "true" ]]; then
wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "application=emailsender" "emailsender"
fi
if [[ "${DATAPLANE_ONLY}" == "" ]]; then
# Prerequisite for port-forwarding are pods in ready state.
wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "app=fleet-manager" "service"

if [[ "$ENABLE_FM_PORT_FORWARDING" == "true" ]]; then
log "Starting port-forwarding for fleet-manager"
port-forwarding start fleet-manager 8000 8000
else
log "Skipping port-forwarding for fleet-manager"
if [[ "$ENABLE_FM_PORT_FORWARDING" == "true" ]]; then
log "Starting port-forwarding for fleet-manager"
port-forwarding start fleet-manager 8000 8000
else
log "Skipping port-forwarding for fleet-manager"
fi

if [[ "$ENABLE_DB_PORT_FORWARDING" == "true" ]]; then
log "Starting port-forwarding for db"
port-forwarding start fleet-manager-db 5432 5432
else
log "Skipping port-forwarding for db"
fi
fi

if [[ "$ENABLE_DB_PORT_FORWARDING" == "true" ]]; then
log "Starting port-forwarding for db"
port-forwarding start fleet-manager-db 5432 5432
else
log "Skipping port-forwarding for db"
if [[ "$ENABLE_EMAIL_SENDER" == "true" ]]; then
wait_for_container_to_become_ready "$ACSCS_NAMESPACE" "application=emailsender" "emailsender"
fi

log
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci/multicluster_tests/run_multicluster_tests.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash

set -e
# This script assumes that there were two clusters created before execution.
# It expects that those clusters are accessible through kubeconfig files at the path
# value stored in following environment variables:
Expand All @@ -25,7 +25,7 @@ make deploy/dev
# signed certificate before starting fleet-manager. We don't want that which is why we're seeting
# termination to edge for this route
kubectl patch -n rhacs route fleet-manager -p '{"spec":{"tls":{"termination":"edge"}}}'
FM_URL="https://$(k get routes -n rhacs fleet-manager -o yaml | yq .spec.host)"
FM_URL="https://$(kubectl get routes -n rhacs fleet-manager -o yaml | yq .spec.host)"
export FM_URL

kubectl get cm -n rhacs fleet-manager-dataplane-cluster-scaling-config -o yaml > fm-dataplane-config.yaml
Expand Down

0 comments on commit 2979f1b

Please sign in to comment.