3131version : " 3.9"
3232
3333services :
34+ # Starts Elasticsearch
35+ elasticsearch :
36+ profiles : ["dev-api", "dev-loader", "pds-core-registry", "int-registry-batch-loader", "os"]
37+ image : ${ES_IMAGE}
38+ ulimits :
39+ nofile :
40+ soft : 65536
41+ hard : 65536
42+ hostname : elasticsearch
43+ container_name : elasticsearch
44+ environment :
45+ - discovery.type=${ES_DISCOVERY_TYPE}
46+ - _JAVA_OPTIONS=-XX:-UseContainerSupport
47+ # Uncomment the following environment variable to use OpenSearch without security
48+ # - plugins.security.disabled=true
49+ volumes :
50+ - ./certs/node1.pem:/usr/share/opensearch/config/esnode.pem
51+ - ./certs/node1-key.pem:/usr/share/opensearch/config/esnode-key.pem
52+ - ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem
53+ - ./default-config/opensearch.yml:/usr/share/opensearch/config/opensearch.yml
54+ ports :
55+ - " 9200:9200"
56+ - " 9600:9600" # required for Performance Analyzer
57+ healthcheck :
58+ test :
59+ - CMD-SHELL
60+ - curl --insecure -f https://elasticsearch:9200/_cluster/health -u admin:admin
61+ interval : 10s
62+ timeout : 2s
63+ retries : 50
64+ networks :
65+ - pds
3466
35- # Executes the Registry Loader component, which contains Harvest and Registry Manager
36- registry-loader :
37- profiles : ["pds-batch-loader"]
67+ # Initializes Elasticsearch by creating registry and data dictionary indices by utilizing the Registry Loader
68+ elasticsearch-init :
69+ profiles : ["dev-api", " pds-core-registry", "int-registry -batch-loader"]
3870 image : ${REG_LOADER_IMAGE}
3971 environment :
4072 - ES_URL=${ES_URL}
4173 volumes :
42- - ${HARVEST_JOB_CONFIG_FILE}:/cfg/harvest-config.xml
43- - ${REG_DATA_VOLUME}:${CONTAINER_HARVEST_data-volume}
74+ - ./scripts/elasticsearch-init.sh:/usr/local/bin/elasticsearch-init.sh
75+ - ./scripts/aliases:/usr/local/bin/aliases
4476 - ./default-config/es-auth.cfg:/etc/es-auth.cfg
45- - ./default-config/local-registry .xml:/etc/local-registry .xml
77+ - ./default-config/local_registry .xml:/etc/local_registry .xml
4678 networks :
4779 - pds
80+ entrypoint : ["bash", "/usr/local/bin/elasticsearch-init.sh"]
81+ depends_on :
82+ elasticsearch :
83+ condition : service_healthy
4884
4985 # Downloads and harvests test data with the Registry loader
5086 registry-loader-test-init :
@@ -57,12 +93,13 @@ services:
5793 - TEST_DATA_LIDVID=${TEST_DATA_LIDVID}
5894 volumes :
5995 - ${REG_DATA_VOLUME}:${CONTAINER_HARVEST_DATA_DIR}
60- - ./scripts/registry-loader-waits-for-elasticsearch.sh:/usr/local/bin/registry-loader-waits-for-elasticsearch.sh
6196 - ./default-config/es-auth.cfg:/etc/es-auth.cfg
6297 - ./custom-datasets.tar.gz:/etc/custom-datasets.tar.gz
6398 networks :
6499 - pds
65- entrypoint : /usr/local/bin/registry-loader-waits-for-elasticsearch.sh
100+ depends_on :
101+ elasticsearch-init :
102+ condition : service_completed_successfully
66103
67104 # Runs provenance script
68105 registry-sweepers :
@@ -81,46 +118,7 @@ services:
81118 registry-loader-test-init :
82119 condition : service_completed_successfully
83120
84- # Starts Elasticsearch
85- elasticsearch :
86- profiles : ["dev-api", "dev-loader", "pds-core-registry", "int-registry-batch-loader", "os"]
87- image : ${ES_IMAGE}
88- ulimits :
89- nofile :
90- soft : 65536
91- hard : 65536
92- hostname : elasticsearch
93- container_name : elasticsearch
94- environment :
95- - discovery.type=${ES_DISCOVERY_TYPE}
96- - _JAVA_OPTIONS=-XX:-UseContainerSupport
97- # Uncomment the following environment variable to use OpenSearch without security
98- # - plugins.security.disabled=true
99- volumes :
100- - ./certs/node1.pem:/usr/share/opensearch/config/esnode.pem
101- - ./certs/node1-key.pem:/usr/share/opensearch/config/esnode-key.pem
102- - ./certs/root-ca.pem:/usr/share/opensearch/config/root-ca.pem
103- - ./default-config/opensearch.yml:/usr/share/opensearch/config/opensearch.yml
104- ports :
105- - " 9200:9200"
106- - " 9600:9600" # required for Performance Analyzer
107- networks :
108- - pds
109121
110- # Initializes Elasticsearch by creating registry and data dictionary indices by utilizing the Registry Loader
111- elasticsearch-init :
112- profiles : ["dev-api", "pds-core-registry", "int-registry-batch-loader"]
113- image : ${REG_LOADER_IMAGE}
114- environment :
115- - ES_URL=${ES_URL}
116- volumes :
117- - ./scripts/elasticsearch-init.sh:/usr/local/bin/elasticsearch-init.sh
118- - ./scripts/aliases:/usr/local/bin/aliases
119- - ./default-config/es-auth.cfg:/etc/es-auth.cfg
120- - ./default-config/local_registry.xml:/etc/local_registry.xml
121- networks :
122- - pds
123- entrypoint : ["bash", "/usr/local/bin/elasticsearch-init.sh"]
124122
125123 # Starts the Registry API
126124 registry-api :
@@ -165,8 +163,8 @@ services:
165163 networks :
166164 - pds
167165 depends_on :
168- registry-api :
169- condition : service_healthy
166+ registry-loader-test-init :
167+ condition : service_completed_successfully
170168
171169 # Executes Registry API integration test as a Postman collection with test data
172170 reg-api-integration-test :
@@ -233,6 +231,24 @@ services:
233231 - " 443:443"
234232 networks :
235233 - pds
234+ depends_on :
235+ registry-api :
236+ condition : service_healthy
237+
238+
239+ # Executes the Registry Loader component, which contains Harvest and Registry Manager
240+ registry-loader :
241+ profiles : ["pds-batch-loader"]
242+ image : ${REG_LOADER_IMAGE}
243+ environment :
244+ - ES_URL=${ES_URL}
245+ volumes :
246+ - ${HARVEST_JOB_CONFIG_FILE}:/cfg/harvest-config.xml
247+ - ${REG_DATA_VOLUME}:${CONTAINER_HARVEST_data-volume}
248+ - ./default-config/es-auth.cfg:/etc/es-auth.cfg
249+ - ./default-config/local-registry.xml:/etc/local-registry.xml
250+ networks :
251+ - pds
236252
237253volumes :
238254 data-volume :
0 commit comments