From 6c0954f333b4e6ea8cf48da1515dbdd149b33a66 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Fri, 17 Feb 2023 11:26:26 -0500 Subject: [PATCH] introduce some early, regular, and late service startup so we don't run all at the same time... I feel like this runs faster overall... --- quickstart.sh | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/quickstart.sh b/quickstart.sh index c341601..9f228ed 100755 --- a/quickstart.sh +++ b/quickstart.sh @@ -40,16 +40,25 @@ do shift done + # Function check_prerequisites makes sure that you have curl, jq, docker-compose, and zip installed. See helpers.sh for details. check_prerequisites -services="blacklight solr1 solr2 solr3 keycloak smui" +early_services="keycloak" +services="solr1 solr2 solr3" +late_services="blacklight" + if $observability; then - services="${services} grafana solr-exporter jaeger" + services="${services} solr-exporter jaeger" + late_services="${late_services} grafana" fi if $offline_lab; then - services="${services} quepid rre" + late_services="${late_services} quepid rre" +fi + +if $active_search_management; then + late_services="${late_services} smui" fi if ! $local_deploy; then @@ -71,22 +80,26 @@ if $shutdown; then exit fi +docker-compose up -d --build ${early_services} + +if $local_deploy; then + ./keycloak/check-for-host-configuration.sh +fi + +log_minor "waiting for Keycloak to be available" +./keycloak/wait-for-keycloak.sh + docker-compose up -d --build ${services} log_major "Waiting for Solr cluster to start up and all three nodes to be online." ./solr/wait-for-solr-cluster.sh # Wait for all three Solr nodes to be online +docker-compose up -d --build ${late_services} + log_major "Setting up security in solr" log_minor "copying security.json into image" docker cp ./solr/security.json solr1:/security.json -if $local_deploy; then - ./keycloak/check-for-host-configuration.sh -fi - -log_minor "waiting for Keycloak to be available" -./keycloak/wait-for-keycloak.sh - log_minor "uploading security.json to zookeeper" docker exec solr1 solr zk cp /security.json zk:security.json -z zoo1:2181