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

Commit b3b54e7

Browse files
author
Chris Wiechmann
authored
Update UPDATE.md
1 parent 9136f78 commit b3b54e7

File tree

1 file changed

+35
-28
lines changed

1 file changed

+35
-28
lines changed

UPDATE.md

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -120,73 +120,80 @@ Sometimes it may be necessary to include newly introduced parameters in your `.e
120120

121121
The solution ships the latest available Elastic version with new releases. However, this does not force you to update to the appropriate Elastic version with each update. So, for example, if version 3.4.0 ships with Elastic version 7.14.0, you can still stay on version 7.12.1. You can find the minimum required Elastic version [here](README.md#requirements).
122122

123-
Watch this video to see a demonstration how to update the Elastic-Stack:
124-
[![Update Elastic-Stack](https://img.youtube.com/vi/Oht_Xnzurok/0.jpg)](https://youtu.be/Oht_Xnzurok)
125-
126123
### 3 Elasticsearch nodes required
127124

128125
:exclamation: Before proceeding, make sure that your Elasticsearch cluster consists of __at least 3 nodes__. For example 3 Elasticsearch nodes running on two machines is perfectly fine for this.
129126
There are 3 Elasticsearch nodes required, as there must always be a master node in the cluster. If this master node is stopped, a quorum of remaining cluster nodes must still be running to elect a new master, otherwise an upgraded Elasticsearch node cannot join the cluster. [Learn more](https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-discovery-quorums.html)
130127

131128
[Read more](README.md##general-remarks) information about adding additional cluster nodes. After the upgrade, you can remove the third cluster node if necessary. Before proceeding, make sure that Elasticsearch is in the Green state.
132129

130+
Watch this video to see a demonstration how to update the Elastic-Stack:
131+
[![Update Elastic-Stack](https://img.youtube.com/vi/Oht_Xnzurok/0.jpg)](https://youtu.be/Oht_Xnzurok)
132+
133133
### Elastic stack upgrade steps
134134

135135
Please follow these steps to update the Elastic version.
136136

137137
__1. Update .env file__
138138

139-
- Open your `.env` file and change the parameter: `ELASTIC_VERSION` to the necessary version as specified in the release or the version you would like to use
139+
- Open your `.env` file and change the parameter: `ELASTIC_VERSION` to the version as specified in the release or the version you would like to use
140140
- Make sure that the `.env` file contains the correct/same version on all machines
141141
- To avoid any downtime, double check all Elasticsearch clients (API-Builder, Logstash, Filebeat) using the `ELASTICSEARCH_HOSTS` have multiple or all Elasticsearch nodes configured so that they can fail over
142142

143143
__2. Update Elasticsearch cluster__
144144

145-
Updating the Elasticsearch cluster happens one node after next. Before updating the next node it's strongly recommended that the cluster state is green and remaining nodes have enough disk space to take over the shards from the node to be upgraded.
145+
Updating the Elasticsearch cluster happens one node after next. Make sure:
146+
- You have three Elasticsearch-Node
147+
- Before updating the next node it's strongly recommended to validate a new master has been elected
148+
- and remaining nodes have enough disk space to take over the shards from the node to be upgraded
149+
146150
```
147-
wget --no-check-certificate https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/releases/download/v3.4.0/axway-apim-elk-v3.4.0.tar.gz -O - | tar -xvz
148-
cd axway-apim-elk-v3.4.0
149-
cp ~/axway-apim-elk-v3.2.0/.env .
150-
cp ~/axway-apim-elk-v3.2.0/config/all-my-custom-certificates ./config
151-
docker-compose -f elasticsearch/docker-compose.es01.yml stop
151+
# On the Elasticsearch node you would like to update, navigate into your ELK-Solution directory
152+
cd axway-apim-elk-v4.0.2
153+
# Stop the existing Elasticsearch container you would like to update
154+
docker stop elasticsearch1
155+
# Start a new Elasticsearch node (in this case Elasticsearch-Node-1), which will
156+
# create a new container based on the version you configured in your .env file
152157
docker-compose -f elasticsearch/docker-compose.es01.yml up -d
153158
```
154-
Repeat these steps on the remaining Eleasticsearch nodes, but only after the Elasticsearch cluster has returned to Green status.
159+
160+
Repeat these steps on the remaining Eleasticsearch nodes, but make sure a new Elasticsearch-Master has been elected.
155161

156162
__3. Update Kibana__
157163

158-
It is recommended to run the entire Elastic stack with the same version, so Kibana should/must be updated as well. To update Kibana you need to perform the following steps after adjusting the `ELASTIC_VERSION` accordingly.
164+
It is recommended to run the entire Elastic stack with the same version, so Kibana should/must be updated as well. To update Kibana you need to perform the following steps after adjusting the `ELASTIC_VERSION` accordingly. Kibana must be updated as it otherwise is no longer compatible with the Elasticsearch version.
159165

160166
```
161-
wget --no-check-certificate https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/releases/download/v3.4.0/axway-apim-elk-v3.4.0.tar.gz -O - | tar -xvz
162-
cd axway-apim-elk-v3.4.0
163-
cp ~/axway-apim-elk-v3.2.0/.env .
164-
cp ~/axway-apim-elk-v2.0.0/config/all-my-custom-certificates ./config
165-
docker-compose -f kibana/docker-compose.kibana.yml stop
167+
# On the Kibana node you would like to update, navigate into your ELK-Solution directory
168+
cd axway-apim-elk-v4.0.2
169+
# Stop the existing Kibana container
170+
docker stop kibana
171+
# Start a new Kibana-Container with the configured ELASTIC_VERSION in your .env file
166172
docker-compose -f kibana/docker-compose.kibana.yml up -d
167173
```
168174

169175
__4. Update Logstash__
170176

171177
It is recommended to run the entire Elastic stack with the same version, so Logstash should/must be updated as well. Same procedure as for Kibana but repeat this on all Logstash nodes.
172178
```
173-
wget --no-check-certificate https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/releases/download/v3.4.0/axway-apim-elk-v3.4.0.tar.gz -O - | tar -xvz
174-
cd axway-apim-elk-v3.4.0
175-
cp ~/axway-apim-elk-v3.2.0/.env .
176-
cp ~/axway-apim-elk-v2.0.0/config/all-my-custom-certificates ./config
177-
docker-compose stop
179+
# On the Logstash node you would like to update, navigate into your ELK-Solution directory
180+
cd axway-apim-elk-v4.0.2
181+
# Stop the existing Logstash container
182+
docker stop logstash
183+
# Start a new Logstash with the configured ELASTIC_VERSION in your .env file
178184
docker-compose up -d
179185
```
180186

181187
__5. Update Filebeat__
182188

183-
It is recommended to run the entire Elastic stack with the same version, so Filebeat should/must be updated as well. Same procedure as for Kibana and Logstash but repeat this on all Filebeat nodes.
189+
It is recommended to run the entire Elastic stack with the same version, so Filebeat should/must be updated as well. Same procedure as for Kibana and Logstash but repeat this on all Filebeat nodes. Of course, these steps are only valid if you run Filebeat as part of the Docker-Compose approach.
190+
184191
```
185-
wget --no-check-certificate https://github.com/Axway-API-Management-Plus/apigateway-openlogging-elk/releases/download/v3.4.0/axway-apim-elk-v3.4.0.tar.gz -O - | tar -xvz
186-
cd axway-apim-elk-v3.4.0
187-
cp ~/axway-apim-elk-v3.2.0/.env .
188-
cp ~/axway-apim-elk-v2.0.0/config/all-my-custom-certificates ./config
189-
docker-compose -f filebeat/docker-compose.filebeat.yml stop
192+
# On the Filebeat node you would like to update, navigate into your ELK-Solution directory
193+
cd axway-apim-elk-v4.0.2
194+
# Stop existing filebeat container
195+
docker stop filebeat
196+
# Start a new Filebeat with the configured ELASTIC_VERSION in your .env file
190197
docker-compose -f filebeat/docker-compose.filebeat.yml up -d
191198
```
192199

0 commit comments

Comments
 (0)