github.com/verrazzano/verrazzano@v1.7.1/ci/scripts/prepare_ha_test_at_environment.sh (about) 1 #!/usr/bin/env bash 2 # 3 # Copyright (c) 2022, Oracle and/or its affiliates. 4 # Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 5 # 6 7 # Prepare the yaml for HA tests for the end-to-end test environment 8 9 set -o pipefail 10 11 set -xv 12 13 # Validate the install yaml file was passed and exists 14 if [ -z "$1" ]; then 15 echo "Location of Verrazzano install file must be specified" 16 exit 1 17 fi 18 INSTALL_CONFIG_FILE="$1" 19 20 if [ ! -f "$INSTALL_CONFIG_FILE" ]; then 21 echo "The Verrazzano install file $INSTALL_CONFIG_FILE does not exist" 22 exit 1 23 fi 24 25 # Update the install configuration to include what the end-to-end tests require 26 yq eval -i '.spec.components.opensearch.policies[0].policyName = "verrazzano-system"' "${INSTALL_CONFIG_FILE}" 27 yq eval -i '.spec.components.opensearch.policies[0].indexPattern = "verrazzano-system*"' "${INSTALL_CONFIG_FILE}" 28 yq eval -i '.spec.components.opensearch.policies[0].minIndexAge = "7d"' "${INSTALL_CONFIG_FILE}" 29 yq eval -i '.spec.components.opensearch.policies[0].rollover.minIndexAge = "1d"' "${INSTALL_CONFIG_FILE}" 30 yq eval -i '.spec.components.opensearch.policies[1].policyName = "verrazzano-application"' "${INSTALL_CONFIG_FILE}" 31 yq eval -i '.spec.components.opensearch.policies[1].indexPattern = "verrazzano-application*"' "${INSTALL_CONFIG_FILE}" 32 yq eval -i '.spec.components.opensearch.policies[1].minIndexAge = "7d"' "${INSTALL_CONFIG_FILE}" 33 yq eval -i '.spec.components.opensearch.policies[1].rollover.minIndexAge = "1d"' "${INSTALL_CONFIG_FILE}" 34 35 exit 0