Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cu 86bygcqxd images placement for data store dashboards monitoring #287

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c130c78
adding image variable to metadata.json and docker-compose files
brett-onions Apr 16, 2024
0db8a15
adding image definition to metadata.json file
brett-onions Apr 16, 2024
b889463
add image and max replicas to metadata file
brett-onions Apr 16, 2024
77f5f2a
Update Kibana image and add KIBANA_IMAGE environment variable
brett-onions Apr 16, 2024
51f16db
adding placement and image version for pg in metadata file
brett-onions Apr 17, 2024
d2f0701
Update docker-compose files and package metadata
brett-onions Apr 18, 2024
4c13fe0
adding deployment placement
brett-onions Apr 25, 2024
6ed00fb
Merge branch 'CU-86byam4rb_Make-imageplacement-configurable-in-metada…
brett-onions Apr 25, 2024
4b1ab08
Merge branch 'CU-86byc1vrb_Make-imageplacement-configurable-in-metada…
brett-onions Apr 25, 2024
db53836
Merge branch 'CU-86byc1vpc_Make-imageplacement-configurable-in-metada…
brett-onions Apr 25, 2024
49df941
Merge branch 'CU-86byc1vmb_Make-imageplacement-configurable-in-metada…
brett-onions Apr 25, 2024
b910734
Merge branch 'CU-86byc1wcz_Make-imageplacement-configurable-in-metada…
brett-onions Apr 25, 2024
d5a4d55
Update Elasticsearch cluster placement
brett-onions Apr 25, 2024
d8e392d
Merge branch 'CU-86byam4rb_Make-imageplacement-configurable-in-metada…
brett-onions Apr 25, 2024
b58f9ed
Merge branch 'main' into CU-86bygcqxd_Images-Placement-for-DataStore-…
brett-onions Apr 25, 2024
d45061f
Update Docker Compose files for PostgreSQL and Pgpool
brett-onions Apr 25, 2024
654f104
Merge branch 'main' into CU-86bygcqxd_Images-Placement-for-DataStore-…
drizzentic May 7, 2024
cf9cf27
chore: update CLICKHOUSE_IMAGE to version 23.8.14.6
brett-onions May 21, 2024
806bef4
Merge branch 'main' into CU-86bygcqxd_Images-Placement-for-DataStore-…
drizzentic May 21, 2024
e679746
Merge branch 'main' into CU-86bygcqxd_Images-Placement-for-DataStore-…
brett-onions May 22, 2024
3b9816c
Change the name of the postgres image variable
bradsawadye May 24, 2024
6d44cf0
Merge branch 'CU-86bygcqxd_Images-Placement-for-DataStore-Dashboards-…
bradsawadye May 24, 2024
dad0440
Disable the clickhouse test case (temporarily)
bradsawadye May 27, 2024
12e68e7
Fix syntax error
bradsawadye May 27, 2024
295c484
Run the recipe tests first
bradsawadye May 27, 2024
598cb04
Fix typo
bradsawadye May 27, 2024
2146f4d
Fix if statement
bradsawadye May 27, 2024
025521b
Fix typo in variable name
bradsawadye May 28, 2024
d2ca67a
Refactor
bradsawadye May 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions .github/workflows/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,43 +25,47 @@ for package in "${CHANGED_FILES[@]}"; do
fi
done

function run_test() {
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud HOST=$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":$1
bradsawadye marked this conversation as resolved.
Show resolved Hide resolved
}
bradsawadye marked this conversation as resolved.
Show resolved Hide resolved

# Run the basic funtional end to end tests for the CDR recipe
run_test "recipe"

bradsawadye marked this conversation as resolved.
Show resolved Hide resolved
bradsawadye marked this conversation as resolved.
Show resolved Hide resolved
if [[ ${#changed_packages[@]} -eq 0 ]] || [[ "${!changed_packages[*]}" == *"utils"* ]] || [[ "${!changed_packages[*]}" == *"features/steps"* ]] || [[ "${!changed_packages[*]}" == *"infrastructure"* ]] ; then
openhim_ran="true"
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":openhim
openhimRan="true"
run_test "openhim"
else
for folder_name in "${!changed_packages[@]}"; do
echo "$folder_name was changed"

if [[ $folder_name == *"clickhouse"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":clickhouse
run_test "clickhouse"
elif [[ $folder_name == *"elastic"* ]] || [[ $folder_name == *"kibana"* ]] || [[ $folder_name == *"logstash"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":elk
run_test "elk"
elif [[ $folder_name == *"kafka"* ]] || [[ $folder_name == *"monitoring"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":kafka
run_test "kafka"
elif [[ $folder_name == *"openhim"* ]] && [[ $openhimRan == "false" ]]; then
openhimRan="true"
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":openhim
run_test "openhim"
elif [[ $folder_name == *"reverse-proxy"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":nginx
run_test "nginx"
elif [[ $folder_name == *"hapi"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":hapi
run_test "hapi"
elif [[ $folder_name == *"santempi"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":sante
run_test "sante"
elif [[ $folder_name == *"monitoring"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":monitoring
run_test "monitoring"
elif [[ $folder_name == *"keycloak"* ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":keycloak
run_test "keycloak"
elif [[ $folder_name == *"superset"* ]] && [[ $NODE_MODE == "single" ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":superset
run_test "superset"
elif [[ $folder_name == *"jsreport"* ]] && [[ $NODE_MODE == "single" ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":jsreport
run_test "jsreport"
elif [[ $folder_name == *"mpi-mediator"* ]] && [[ $NODE_MODE == "single" ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":mpi-mediator
run_test "mpi-mediator"
elif [[ $folder_name == *"jempi"* ]] && [[ $NODE_MODE == "single" ]]; then
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":jempi
run_test "jempi"
fi
done
fi

# Run the basic funtional end to end tests for the CDR recipe
DOCKER_HOST=ssh://ubuntu@$GITHUB_RUN_ID.jembi.cloud HOST=$GITHUB_RUN_ID.jembi.cloud yarn test:"$NODE_MODE":recipe
66 changes: 33 additions & 33 deletions analytics-datastore-clickhouse/docker-compose.cluster.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
version: '3.9'
version: "3.9"

services:
analytics-datastore-clickhouse-01:
image: clickhouse/clickhouse-server
image: ${CLICKHOUSE_IMAGE}
ulimits:
noFile: 262144
volumes:
- clickhouse-data-01:/var/lib/clickhouse/
hostname: analytics-datastore-clickhouse-01
deploy:
placement:
constraints:
- "node.labels.name==node-1"
deploy:
placement:
constraints:
- "node.labels.name==${ANALYTICS_DATASTORE_CLICKHOUSE_01_PLACEMENT}"
configs:
- target: /etc/clickhouse-server/config.d/docker_related_config.xml
source: docker_related_config.xml
Expand All @@ -36,12 +36,12 @@ services:
default:

analytics-datastore-clickhouse-02:
image: clickhouse/clickhouse-server
image: ${CLICKHOUSE_IMAGE}
hostname: analytics-datastore-clickhouse-02
deploy:
placement:
constraints:
- "node.labels.name==node-2"
deploy:
placement:
constraints:
- "node.labels.name==${ANALYTICS_DATASTORE_CLICKHOUSE_02_PLACEMENT}"
ulimits:
noFile: 262144
volumes:
Expand Down Expand Up @@ -70,16 +70,16 @@ services:
default:

analytics-datastore-clickhouse-03:
image: clickhouse/clickhouse-server
image: ${CLICKHOUSE_IMAGE}
hostname: analytics-datastore-clickhouse-03
deploy:
placement:
constraints:
- "node.labels.name==node-3"
deploy:
placement:
constraints:
- "node.labels.name==${ANALYTICS_DATASTORE_CLICKHOUSE_03_PLACEMENT}"
ulimits:
noFile: 262144
volumes:
- clickhouse-data-03:/var/lib/clickhouse/
- clickhouse-data-03:/var/lib/clickhouse/
configs:
- target: /etc/clickhouse-server/config.d/docker_related_config.xml
source: docker_related_config.xml
Expand Down Expand Up @@ -109,7 +109,7 @@ services:
ulimits:
noFile: 262144
volumes:
- clickhouse-data-04:/var/lib/clickhouse/
- clickhouse-data-04:/var/lib/clickhouse/
configs:
- target: /etc/clickhouse-server/config.d/docker_related_config.xml
source: docker_related_config.xml
Expand All @@ -136,77 +136,77 @@ volumes:
clickhouse-data-02:
clickhouse-data-03:
clickhouse-data-04:

configs:
docker_related_config.xml:
file: ./cluster_configs/docker_related_config.xml
name: docker_related_config.xml-${docker_related_config_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_enable_keeper_01.xml:
file: ./cluster_configs/enable_keeper_01.xml
name: enable_keeper_01.xml-${enable_keeper_01_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_enable_keeper_02.xml:
file: ./cluster_configs/enable_keeper_02.xml
name: enable_keeper_02.xml-${enable_keeper_02_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_enable_keeper_03.xml:
file: ./cluster_configs/enable_keeper_03.xml
name: enable_keeper_03.xml-${enable_keeper_03_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_macros_01.xml:
file: ./cluster_configs/macros_01.xml
name: macros_01.xml-${macros_01_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_macros_02.xml:
file: ./cluster_configs/macros_02.xml
name: macros_02.xml-${macros_02_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_macros_03.xml:
file: ./cluster_configs/macros_03.xml
name: macros_03.xml-${macros_03_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_macros_04.xml:
file: ./cluster_configs/macros_04.xml
name: macros_04.xml-${macros_04_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_remote_servers.xml:
file: ./cluster_configs/remote_servers.xml
name: remote_servers.xml-${remote_servers_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_use_keeper.xml:
file: ./cluster_configs/use_keeper.xml
name: use_keeper.xml-${use_keeper_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_metric_log.xml:
file: ./general_configs/metric_log.xml
name: metric_log.xml.xml-${metric_log_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_part_log.xml:
file: ./general_configs/part_log.xml
name: part_log.xml.xml-${part_log_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_query_log.xml:
file: ./general_configs/query_log.xml
name: query_log.xml.xml-${query_log_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_trace_log.xml:
file: ./general_configs/trace_log.xml
name: trace_log.xml.xml-${trace_log_xml_DIGEST:?err}
labels:
labels:
name: clickhouse

networks:
Expand Down
14 changes: 7 additions & 7 deletions analytics-datastore-clickhouse/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: '3.9'
version: "3.9"

services:
analytics-datastore-clickhouse:
image: clickhouse/clickhouse-server
image: ${CLICKHOUSE_IMAGE}
ulimits:
noFile: 262144
volumes:
Expand All @@ -15,7 +15,7 @@ services:
- target: /etc/clickhouse-server/config.d/query_log.xml
source: clickhouse_query_log.xml
- target: /etc/clickhouse-server/config.d/trace_log.xml
source: clickhouse_trace_log.xml
source: clickhouse_trace_log.xml
networks:
public:
default:
Expand All @@ -27,22 +27,22 @@ configs:
clickhouse_metric_log.xml:
file: ./general_configs/metric_log.xml
name: metric_log.xml.xml-${metric_log_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_part_log.xml:
file: ./general_configs/part_log.xml
name: part_log.xml.xml-${part_log_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_query_log.xml:
file: ./general_configs/query_log.xml
name: query_log.xml.xml-${query_log_xml_DIGEST:?err}
labels:
labels:
name: clickhouse
clickhouse_trace_log.xml:
file: ./general_configs/trace_log.xml
name: trace_log.xml.xml-${trace_log_xml_DIGEST:?err}
labels:
labels:
name: clickhouse

networks:
Expand Down
6 changes: 5 additions & 1 deletion analytics-datastore-clickhouse/package-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
"dependencies": [],
"environmentVariables": {
"CLICKHOUSE_HOST": "analytics-datastore-clickhouse",
"CLICKHOUSE_PORT": "8123"
"CLICKHOUSE_PORT": "8123",
"CLICKHOUSE_IMAGE": "clickhouse/clickhouse-server:23.8.14.6",
"ANALYTICS_DATASTORE_CLICKHOUSE_01_PLACEMENT": "node-1",
"ANALYTICS_DATASTORE_CLICKHOUSE_02_PLACEMENT": "node-2",
"ANALYTICS_DATASTORE_CLICKHOUSE_03_PLACEMENT": "node-3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"

services:
create_certs:
image: docker.elastic.co/elasticsearch/elasticsearch:7.13.0
image: ${ES_IMAGE}
deploy:
placement:
constraints:
Expand Down
Loading
Loading