Skip to content

Commit

Permalink
Merge pull request #1334 from msvinaykumar/setLocalTrue
Browse files Browse the repository at this point in the history
set kruize local to true
  • Loading branch information
dinogun authored Oct 16, 2024
2 parents 0273075 + 8ca51b8 commit 4868a14
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ data:
"savetodb": "true",
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "false",
"local": "true",
"logAllHttpReqAndResp": "true",
"recommendationsURL" : "http://kruize.monitoring.svc.cluster.local:8080/generateRecommendations?experiment_name=%s",
"experimentsURL" : "http://kruize.monitoring.svc.cluster.local:8080/createExperiment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ data:
"savetodb": "true",
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "false",
"local": "true",
"logAllHttpReqAndResp": "true",
"recommendationsURL" : "http://kruize.openshift-tuning.svc.cluster.local:8080/generateRecommendations?experiment_name=%s",
"experimentsURL" : "http://kruize.openshift-tuning.svc.cluster.local:8080/createExperiment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ data:
"savetodb": "true",
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "false",
"local": "true",
"logAllHttpReqAndResp": "true",
"recommendationsURL" : "http://kruize.monitoring.svc.cluster.local:8080/generateRecommendations?experiment_name=%s",
"experimentsURL" : "http://kruize.monitoring.svc.cluster.local:8080/createExperiment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ data:
"savetodb": "true",
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "false",
"local": "true",
"logAllHttpReqAndResp": "true",
"recommendationsURL" : "http://kruize.monitoring.svc.cluster.local:8080/generateRecommendations?experiment_name=%s",
"experimentsURL" : "http://kruize.monitoring.svc.cluster.local:8080/createExperiment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ data:
"savetodb": "true",
"dbdriver": "jdbc:postgresql://",
"plots": "true",
"local": "false",
"local": "true",
"logAllHttpReqAndResp": "true",
"recommendationsURL" : "http://kruize.openshift-tuning.svc.cluster.local:8080/generateRecommendations?experiment_name=%s",
"experimentsURL" : "http://kruize.openshift-tuning.svc.cluster.local:8080/createExperiment",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public class KruizeDeploymentInfo {
public static Boolean settings_save_to_db;
public static String em_only_mode;
public static Integer bulk_update_results_limit = 100;
public static Boolean local = false;
public static Boolean local = true;
public static Boolean log_http_req_resp = false;
public static String recommendations_url;
public static String experiments_url;
Expand Down
16 changes: 16 additions & 0 deletions tests/scripts/common/common_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1902,6 +1902,22 @@ function kruize_local_patch() {
fi
}

#
# "local" flag is turned off for RM.
#
function kruize_remote_patch() {
CRC_DIR="./manifests/crc/default-db-included-installation"
KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT="${CRC_DIR}/openshift/kruize-crc-openshift.yaml"
KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE="${CRC_DIR}/minikube/kruize-crc-minikube.yaml"


if [ ${cluster_type} == "minikube" ]; then
sed -i 's/"local": "true"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_MINIKUBE}
elif [ ${cluster_type} == "openshift" ]; then
sed -i 's/"local": "true"/"local": "false"/' ${KRUIZE_CRC_DEPLOY_MANIFEST_OPENSHIFT}
fi
}

#
# Modify "serviceName" and "namespace" datasource manifest fields based on input parameters
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ KRUIZE_SETUP_LOG="${LOG_DIR}/kruize_setup.log"

# Setup kruize
echo "Setting up kruize..." | tee -a ${LOG}
kruize_remote_patch
pushd ${KRUIZE_REPO} > /dev/null
echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG}" | tee -a ${LOG}
./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG} 2>&1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ function remote_monitoring_tests() {
if [ ${skip_setup} -eq 0 ]; then
echo "Setting up kruize..." | tee -a ${LOG}
echo "${KRUIZE_SETUP_LOG}"
echo "setting local=false"
kruize_remote_patch
setup "${KRUIZE_POD_LOG}" >> ${KRUIZE_SETUP_LOG} 2>&1
echo "Setting up kruize...Done" | tee -a ${LOG}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ KRUIZE_SERVICE_LOG="${LOG_DIR}/kruize_service.log"

# Setup kruize
echo "Setting up kruize..." | tee -a ${LOG}
echo "setting local=false"
kruize_remote_patch
pushd ${KRUIZE_REPO} > /dev/null
echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG}" | tee -a ${LOG}
./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG} 2>&1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ KRUIZE_SERVICE_LOG="${LOG_DIR}/kruize_service.log"
# Setup kruize
if [ ${kruize_setup} == true ]; then
echo "Setting up kruize..." | tee -a ${LOG}
echo "setting local=false"
kruize_remote_patch
pushd ${KRUIZE_REPO} > /dev/null
echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG}" | tee -a ${LOG}
./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${KRUIZE_SETUP_LOG} 2>&1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ jmeter_setup
echo "Invoking jmeter setup...done" | tee -a ${LOG}

echo "Setting up kruize..." | tee -a ${LOG}
echo "setting local=false"
kruize_remote_patch
pushd ${KRUIZE_REPO} > /dev/null
echo "./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${LOG_DIR}/kruize_setup.log"
./deploy.sh -c ${CLUSTER_TYPE} -i ${KRUIZE_IMAGE} -m ${target} -t >> ${LOG_DIR}/kruize_setup.log 2>&1
Expand Down

0 comments on commit 4868a14

Please sign in to comment.