Skip to content
This repository was archived by the owner on Dec 14, 2022. It is now read-only.

Commit e1b204b

Browse files
author
Chris Wiechmann
committed
Bugfixes detected in RC5
1 parent cf66c9b commit e1b204b

18 files changed

+59
-63
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ Watch this video for a demonstration: [Setup Single Node Elasticsearch cluster](
144144
Open the `.env` file and configure the ELASTICSEARCH_HOSTS. At this point please configure only one Elasticsearch node. You can start with a single node and add more nodes later. More about this topic [Multi-Node Deployment](#setup-elasticsearch-multi-node) later in the documenation.
145145
This URL is used by all Elasticsearch clients (Logstash, API-Builder, Filebeat) of the solution to establish communication.
146146
If you use an external Elasticsearch cluster, please specify the node(s) that are given to you.
147-
Please keep in mind that the hostnames must be resolvable within the docker containers. You can also assign the cluster name here if the default: `axway-apim-elasticsearch` is not appropriate. Example:
147+
Please keep in mind that the hostnames must be resolvable within the docker containers. Some parameters to consider to change before starting the cluster::
148148
```
149149
ELASTICSEARCH_HOSTS=https://my-elasticsearch-host.com:9200
150150
ELASTICSEARCH_CLUSTERNAME=axway-apim-elasticsearch-prod
151+
ES_JAVA_OPTS="-Xms8g -Xmx8g"
151152
```
152153
With the following command you initialize a new Elasticsearch Cluster which is going through an appropriate bootstrapping. Later you can add more nodes to this single node cluster. Please do not use the init extension when restarting the node:
153154
```

docker-compose.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,7 @@ services:
5757
# This is the API-Builder project exposing the API-Gateway Manager REST-API
5858
apibuilder4elastic:
5959
image: cwiechmann/apibuilder4elastic:v2.0.0
60-
restart: always
61-
deploy:
62-
restart_policy:
63-
delay: 20s
64-
window: 120s
60+
restart: on-failure:10
6561
container_name: apibuilder4elastic
6662
environment:
6763
- ELASTICSEARCH_HOSTS=${ELASTICSEARCH_HOSTS}
@@ -95,6 +91,7 @@ services:
9591
# Metricbeat monitoring Memcache, API-Builder and Logstash
9692
metricbeat:
9793
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION}
94+
restart: on-failure:10
9895
entrypoint: /usr/local/scripts/metricbeat-entrypoint.sh
9996
container_name: metricbeat
10097
# Define a fixed hostname to be reported back to Kibana
@@ -110,6 +107,7 @@ services:
110107
- METRICBEAT_PASSWORD=${METRICBEAT_PASSWORD}
111108
- METRICBEAT_ENABLED=${METRICBEAT_ENABLED}
112109
- METRICBEAT_SETUP_DASHBOARDS=${METRICBEAT_SETUP_DASHBOARDS}
110+
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED}
113111
ports:
114112
- 9000:9000
115113
volumes:

elasticsearch/docker-compose.es01.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
environment:
1010
- "ES_JAVA_OPTS=${ES_JAVA_OPTS}"
1111
- cluster.name=${ELASTICSEARCH_CLUSTERNAME}
12-
- node.name=Elasticsearch 1
12+
- node.name=Elasticsearch1 # Don't change the format (name and number) as it is used to bootstrap the cluster and identify the node number
1313
- ELASTICSEARCH_HOSTS=${ELASTICSEARCH_HOSTS}
1414
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED:-true}
1515
- SELF_MONITORING_ENABLED=${SELF_MONITORING_ENABLED}
@@ -61,6 +61,7 @@ services:
6161
# Metricbeat monitoring Elasticsearch node 1
6262
metricbeatES:
6363
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION}
64+
restart: on-failure:10
6465
entrypoint: /usr/local/scripts/metricbeat-entrypoint.sh
6566
container_name: metricbeatES1
6667
hostname: Elasticsearch1
@@ -75,6 +76,7 @@ services:
7576
- METRICBEAT_PASSWORD=${METRICBEAT_PASSWORD}
7677
- METRICBEAT_ENABLED=${METRICBEAT_ENABLED}
7778
- METRICBEAT_SETUP_DASHBOARDS=${METRICBEAT_SETUP_DASHBOARDS}
79+
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED}
7880
volumes:
7981
- type: volume
8082
source: metricbeatdata

elasticsearch/docker-compose.es02.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
environment:
1010
- "ES_JAVA_OPTS=${ES_JAVA_OPTS}"
1111
- cluster.name=${ELASTICSEARCH_CLUSTERNAME}
12-
- node.name=Elasticsearch 2
12+
- node.name=Elasticsearch2 # Don't change the format (name and number) as it is used to bootstrap the cluster and identify the node number
1313
- ELASTICSEARCH_HOSTS=${ELASTICSEARCH_HOSTS}
1414
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED:-true}
1515
- SELF_MONITORING_ENABLED=${SELF_MONITORING_ENABLED}
@@ -61,6 +61,7 @@ services:
6161
# Metricbeat monitoring Elasticsearch node 1
6262
metricbeatES:
6363
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION}
64+
restart: on-failure:10
6465
entrypoint: /usr/local/scripts/metricbeat-entrypoint.sh
6566
container_name: metricbeatES2
6667
hostname: Elasticsearch2
@@ -75,6 +76,7 @@ services:
7576
- METRICBEAT_PASSWORD=${METRICBEAT_PASSWORD}
7677
- METRICBEAT_ENABLED=${METRICBEAT_ENABLED}
7778
- METRICBEAT_SETUP_DASHBOARDS=${METRICBEAT_SETUP_DASHBOARDS}
79+
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED}
7880
volumes:
7981
- type: volume
8082
source: metricbeatdata

elasticsearch/docker-compose.es03.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
environment:
1010
- "ES_JAVA_OPTS=${ES_JAVA_OPTS}"
1111
- cluster.name=${ELASTICSEARCH_CLUSTERNAME}
12-
- node.name=Elasticsearch 3
12+
- node.name=Elasticsearch3 # Don't change the format (name and number) as it is used to bootstrap the cluster and identify the node number
1313
- ELASTICSEARCH_HOSTS=${ELASTICSEARCH_HOSTS}
1414
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED:-true}
1515
- SELF_MONITORING_ENABLED=${SELF_MONITORING_ENABLED}
@@ -61,6 +61,7 @@ services:
6161
# Metricbeat monitoring Elasticsearch node 1
6262
metricbeatES:
6363
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION}
64+
restart: on-failure:10
6465
entrypoint: /usr/local/scripts/metricbeat-entrypoint.sh
6566
container_name: metricbeatES3
6667
hostname: Elasticsearch3
@@ -75,6 +76,7 @@ services:
7576
- METRICBEAT_PASSWORD=${METRICBEAT_PASSWORD}
7677
- METRICBEAT_ENABLED=${METRICBEAT_ENABLED}
7778
- METRICBEAT_SETUP_DASHBOARDS=${METRICBEAT_SETUP_DASHBOARDS}
79+
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED}
7880
volumes:
7981
- type: volume
8082
source: metricbeatdata

elasticsearch/docker-compose.es04.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
environment:
1010
- "ES_JAVA_OPTS=${ES_JAVA_OPTS}"
1111
- cluster.name=${ELASTICSEARCH_CLUSTERNAME}
12-
- node.name=Elasticsearch 4
12+
- node.name=Elasticsearch4 # Don't change the format (name and number) as it is used to bootstrap the cluster and identify the node number
1313
- ELASTICSEARCH_HOSTS=${ELASTICSEARCH_HOSTS}
1414
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED:-true}
1515
- SELF_MONITORING_ENABLED=${SELF_MONITORING_ENABLED}
@@ -61,6 +61,7 @@ services:
6161
# Metricbeat monitoring Elasticsearch node 1
6262
metricbeatES:
6363
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION}
64+
restart: on-failure:10
6465
entrypoint: /usr/local/scripts/metricbeat-entrypoint.sh
6566
container_name: metricbeatES4
6667
hostname: Elasticsearch4
@@ -75,6 +76,7 @@ services:
7576
- METRICBEAT_PASSWORD=${METRICBEAT_PASSWORD}
7677
- METRICBEAT_ENABLED=${METRICBEAT_ENABLED}
7778
- METRICBEAT_SETUP_DASHBOARDS=${METRICBEAT_SETUP_DASHBOARDS}
79+
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED}
7880
volumes:
7981
- type: volume
8082
source: metricbeatdata

elasticsearch/docker-compose.es05.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
environment:
1010
- "ES_JAVA_OPTS=${ES_JAVA_OPTS}"
1111
- cluster.name=${ELASTICSEARCH_CLUSTERNAME}
12-
- node.name=Elasticsearch 5
12+
- node.name=Elasticsearch5 # Don't change the format (name and number) as it is used to bootstrap the cluster and identify the node number
1313
- ELASTICSEARCH_HOSTS=${ELASTICSEARCH_HOSTS}
1414
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED:-true}
1515
- SELF_MONITORING_ENABLED=${SELF_MONITORING_ENABLED}
@@ -61,6 +61,7 @@ services:
6161
# Metricbeat monitoring Elasticsearch node 1
6262
metricbeatES:
6363
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION}
64+
restart: on-failure:10
6465
entrypoint: /usr/local/scripts/metricbeat-entrypoint.sh
6566
container_name: metricbeatES5
6667
hostname: Elasticsearch5
@@ -75,6 +76,7 @@ services:
7576
- METRICBEAT_PASSWORD=${METRICBEAT_PASSWORD}
7677
- METRICBEAT_ENABLED=${METRICBEAT_ENABLED}
7778
- METRICBEAT_SETUP_DASHBOARDS=${METRICBEAT_SETUP_DASHBOARDS}
79+
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED}
7880
volumes:
7981
- type: volume
8082
source: metricbeatdata

elasticsearch/scripts/custom-entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ do
1919
# It is assumed, that node-names are sequentially counted elasticsearch1, elasticsearch2, ...
2020
if [ "${initCluster}" = "true" ]; then
2121
if [ "${initialMasterNodes}" == "" ]; then
22+
echo "Init Elasticsearch cluster using nodeBasename: ${nodeBasename} and count: ${count}"
2223
initialMasterNodes="-E cluster.initial_master_nodes=${nodeBasename}${count}"
23-
else
24-
initialMasterNodes="${initialMasterNodes},${nodeBasename}${count}"
24+
else
25+
echo "Init Elasticsearch cluster with given initialMasterNodes: ${initialMasterNodes}"
26+
initialMasterNodes="-E cluster.initial_master_nodes=${initialMasterNodes}"
2527
fi
2628
fi
2729
# Use all declared hosts as seed hosts if

env-sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ ELASTICSEARCH_CLUSTER_UUID=
227227
# GATEWAY_REGION=US-DC1
228228

229229
# ----------------------------------------------------------------------------------------------
230-
# This tells Filebeat where Logstash is running.
230+
# This tells Filebeat where Logstash or multiple instances are running.
231231
# When using the default docker-compose.yml the following default will work.
232232
# If you are running Logstash somewhere else, e.g. as a service in K8S you need to change this
233233
# parameter.

filebeat/docker-compose.filebeat.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@ services:
4646
max-size: "10m"
4747

4848
# Metricbeat monitoring Filebeat, API-Gateway, API-Manager and perhaps later Cassandra
49-
metricbeatFilebeat:
49+
gatewayMetricbeat:
5050
image: docker.elastic.co/beats/metricbeat:${ELASTIC_VERSION}
51+
restart: on-failure:10
5152
entrypoint: /usr/local/scripts/metricbeat-entrypoint.sh
52-
container_name: metricbeatFilebeat
53+
container_name: gatewayMetricbeat
5354
command: --strict.perms=false -c configs/metricbeat.filebeat-gateway.yml -e -system.hostfs=/hostfs
5455
user: root # Required to monitor docker containers
5556
environment:
@@ -61,6 +62,7 @@ services:
6162
- METRICBEAT_PASSWORD=${METRICBEAT_PASSWORD}
6263
- METRICBEAT_ENABLED=${METRICBEAT_ENABLED}
6364
- METRICBEAT_SETUP_DASHBOARDS=${METRICBEAT_SETUP_DASHBOARDS}
65+
- ELASTICSEARCH_ANONYMOUS_ENABLED=${ELASTICSEARCH_ANONYMOUS_ENABLED}
6466
volumes:
6567
- type: volume
6668
source: metricbeatdata

0 commit comments

Comments
 (0)