Skip to content

Commit 4cdd1ac

Browse files
authored
Merge pull request #128 from cloudfoundry-community/es6
Upgrade to ES6
2 parents 1eb4cf0 + 9e661aa commit 4cdd1ac

File tree

33 files changed

+132
-52
lines changed

33 files changed

+132
-52
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,17 @@ Logsearch < v23.0.0 was based on Elasticsearch 1.x and Kibana 3.
1111

1212
Logsearch > v200 is based on Elasticsearch 2.x and Kibana 4.
1313

14-
There is NO upgrade path from Elasticsearch 1.x to 2.x. Sorry :(
14+
- There is NO upgrade path from Elasticsearch 1.x to 2.x. Sorry :(
1515

16-
Logsearch > v204.0.0 is based on Elasticsearch 5.x and Kibana 5.
16+
Logsearch > v204.0.0 is based on Elastic stack version 5.
17+
18+
- For upgrade procedure from Elasticsearch 2.x please refer to [v205.0.0 release notes](https://github.com/cloudfoundry-community/logsearch-boshrelease/releases/tag/v205.0.0#component-updates).
19+
20+
Logsearch > v210.0.0 is based on Elastic stack version 6.
21+
22+
- Elasticsearch 6.x can use indices created in Elasticsearch 5.x, but not those created in Elasticsearch 2.x or before.
23+
- **Important**: After upgrading running 5.x cluster to 6.x all existing indicies will be available for reading data. However, writing to these indicies is not possible. In order to write data immediatelly after upgrade you have to [change index naming convention](https://github.com/cloudfoundry-community/logsearch-boshrelease/commit/2f83b41ee14dbe3141e21cc0c40df340d50e0169). As long as index names are usually based on current date, this change can be safely reverted in a day or so.
1724

18-
For upgrade procedure from Elasticsearch 2.x please refer to [v205.0.0 release notes](https://github.com/cloudfoundry-community/logsearch-boshrelease/releases/tag/v205.0.0#component-updates).
1925

2026
## Getting Started
2127

config/blobs.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ curator/vendor/voluptuous-0.10.5.tar.gz:
3030
size: 41436
3131
object_id: b67881a7-7adb-4456-7d0b-f5b00e936152
3232
sha: 31373cc4ba935eda76b55e64e8bd218ce4882e2b
33-
elasticsearch/elasticsearch-5.6.13.tar.gz:
34-
size: 33894848
35-
object_id: 19557b81-5d85-4d8b-7d80-1ecb540b145b
36-
sha: 4c8ed27d362d76b5bdc52327721b44bb55215205
33+
elasticsearch/elasticsearch-6.4.3.tar.gz:
34+
size: 97872736
35+
object_id: 23a715d7-4f0c-48c4-41f4-8090f6148a11
36+
sha: 57f2d6066b1277ab575e252044bee0ea9fd1b979
3737
haproxy/haproxy-1.7.5.tar.gz:
3838
size: 1743979
3939
object_id: 27004bb4-29f6-493f-80ec-6a4170a955d5
@@ -42,18 +42,18 @@ haproxy/pcre-8.40.tar.gz:
4242
size: 2065161
4343
object_id: edf51dad-4c6c-4a3d-8ebb-3a9b9f9641e5
4444
sha: 10384eb3d411794cc15f55b9d837d3f69e35391e
45-
java8/openjdk-1.8.0_152.tar.gz:
46-
size: 45661256
47-
object_id: 2211b342-4102-4587-6037-23a143726f2b
48-
sha: 0d5758ed6f0e040684ea8bdf410ba44422f29f47
49-
kibana/kibana-5.6.13-linux-x86_64.tar.gz:
50-
size: 53161803
51-
object_id: f305ce78-cc27-4fc3-65e6-7351c78bed22
52-
sha: 5562635acea8b262dc47e2c09f25572e30cef950
53-
logstash/logstash-5.6.13.tar.gz:
54-
size: 104517136
55-
object_id: 16463798-cf0d-46b9-43b9-abbe235737b4
56-
sha: f83fb75409e63c5e0450f22d5d14a7c3c5af3192
45+
java8/openjdk-1.8.0_192.tar.gz:
46+
size: 45305426
47+
object_id: 0a033904-08ea-41d5-6191-62a634526d8f
48+
sha: dae286f0e11c1a401e2c84a371f5cc2c6e2637ef
49+
kibana/kibana-6.4.3-linux-x86_64.tar.gz:
50+
size: 235299366
51+
object_id: 0aad6732-1974-4211-6661-6b064d324644
52+
sha: 30d9adca00c0c4bae35b40a305fcb16a046a9601
53+
logstash/logstash-6.4.3.tar.gz:
54+
size: 153936585
55+
object_id: 8d5c9c76-018d-4dec-6a31-5dc2c8018c57
56+
sha: cb1c4c6ff2c5ef9b14809733624b5c4b5e55e78d
5757
logstash/logstash-filter-alter-3.0.2.zip:
5858
size: 7425
5959
object_id: 543e5010-6449-400b-489d-31b82dcb4670

deployment/logsearch-deployment.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ instance_groups:
3333
elasticsearch:
3434
node:
3535
allow_master: true
36+
config_options:
37+
xpack.monitoring.enabled: false
38+
xpack.graph.enabled: false
39+
xpack.ml.enabled: false
40+
xpack.security.enabled: false
41+
xpack.watcher.enabled: false
3642
- name: syslog_forwarder
3743
release: logsearch
3844
consumes:
@@ -172,6 +178,12 @@ instance_groups:
172178
elasticsearch:
173179
node:
174180
allow_data: true
181+
config_options:
182+
xpack.monitoring.enabled: false
183+
xpack.graph.enabled: false
184+
xpack.ml.enabled: false
185+
xpack.security.enabled: false
186+
xpack.watcher.enabled: false
175187
- name: syslog_forwarder
176188
release: logsearch
177189
consumes:
@@ -210,10 +222,15 @@ instance_groups:
210222
properties:
211223
kibana:
212224
health:
213-
timeout: 300
225+
timeout: 500
214226
env:
215227
- NODE_ENV: production
216-
228+
config_options:
229+
xpack.monitoring.enabled: false
230+
xpack.graph.enabled: false
231+
xpack.ml.enabled: false
232+
xpack.security.enabled: false
233+
xpack.watcher.enabled: false
217234
- name: syslog_forwarder
218235
release: logsearch
219236
consumes:
@@ -292,7 +309,7 @@ releases:
292309

293310
stemcells:
294311
- alias: default
295-
os: ubuntu-trusty
312+
os: ubuntu-xenial
296313
version: "latest"
297314

298315
variables: []

deployment/operations/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ Includes [logsearch-for-cloudfoundry](https://github.com/cloudfoundry-community/
2828

2929
To use this extention, you have to provide following variables: `cf_admin_password`, `uaa_admin_client_secret` and `system_domain`. You can find them in your CloudFoundry deployment variables.
3030

31-
After deployment, please run `create-uaa-client` errand to create UAA client. After that, you will be able to login into Logsearch UI using your CloudFoundry credentials, and use `https://logs.<YOUR_DOMAIN>` endpoint to access Logsearch UI.
31+
After deployment, please run `create-uaa-client` errand to create UAA client. After that, you will be able to login into Logsearch UI using your CloudFoundry credentials, and use `https://logs.<YOUR_DOMAIN>` endpoint to access Logsearch UI.
32+
33+
## cf-kibana.yml
34+
Errand to push Kibana application into CloudFoundry as an alternative to running it as a separate job.
35+
36+
- Depend from **cloudfoundry.yml**
37+
- Requires `cf-kibana_client_secre` variable
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
- type: replace
3+
path: /instance_groups/name=maintenance/jobs/-
4+
value:
5+
name: cf-kibana
6+
release: logsearch-for-cloudfoundry
7+
lifecycle: errand
8+
consumes:
9+
elasticsearch: {from: elasticsearch_master}
10+
cloud_controller: {from: cloud_controller, deployment: cf}
11+
properties:
12+
cloudfoundry:
13+
admin_password: "((cf_admin_password))"
14+
cf-kibana:
15+
app_name: kibana
16+
app_memory: 4G
17+
oauth2_client_secret: "((cf-kibana_client_secret))"
18+
cloudfoundry:
19+
uaa_admin_client_secret: "((uaa_admin_client_secret))"
20+
api_security_group: public_networks
21+
system_org: system
22+
apps_domain: ((system_domain))
23+
config_options:
24+
xpack.monitoring.enabled: false
25+
xpack.graph.enabled: false
26+
xpack.ml.enabled: false
27+
xpack.security.enabled: false
28+
xpack.watcher.enabled: false

deployment/operations/cloudfoundry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
- type: replace
7373
path: /instance_groups/name=ingestor/jobs/name=ingestor_syslog/properties/logstash_parser/elasticsearch?
7474
value:
75-
index: logs-%{[@metadata][index]}-%{+YYYY.MM.dd}
75+
index: logs-%{[@metadata][index]}-v6-%{+YYYY.MM.dd}
7676

7777
- type: replace
7878
path: /instance_groups/name=ingestor/jobs/-

jobs/archiver_syslog/spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ templates:
1313
config/syslog_tls.crt.erb: config/syslog_tls.crt
1414
config/syslog_tls.key.erb: config/syslog_tls.key
1515
config/logstash.yml.erb: config/logstash.yml
16+
config/jvm.options.erb: config/jvm.options
1617
data/properties.sh.erb: data/properties.sh
1718
helpers/ctl_setup.sh: helpers/ctl_setup.sh
1819
helpers/ctl_utils.sh: helpers/ctl_utils.sh
@@ -33,6 +34,9 @@ provides:
3334
properties:
3435
logstash.heap_size:
3536
description: sets jvm heap sized
37+
logstash.jvm_options:
38+
description: additional jvm options
39+
default: []
3640
logstash.metadata_level:
3741
description: "Whether to include additional metadata throughout the event lifecycle. NONE = disabled, DEBUG = fully enabled"
3842
default: "NONE"

jobs/archiver_syslog/templates/bin/archiver_syslog_ctl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ case $1 in
4141
# construct a complete config file from all the fragments
4242
cat ${JOB_DIR}/config/input_and_output.conf > ${JOB_DIR}/config/logstash.conf
4343

44+
# clear persistent queue if the upgrade failed last run
45+
if tail -8 $LOG_DIR/$JOB_NAME.stdout.log | grep 'QueueUpgrade - Logstash was unable to upgrade your persistent queue data' >/dev/null ; then
46+
mkdir ${STORE_DIR}/oldqueue.$$
47+
mv ${STORE_DIR}/queue ${STORE_DIR}/.lock ${STORE_DIR}/dead_letter_queue ${STORE_DIR}/uuid ${STORE_DIR}/oldqueue.$$
48+
fi
49+
50+
ulimit -n <%= p("logstash_archiver.files") %>
4451
exec chpst -u vcap:vcap /var/vcap/packages/logstash/bin/logstash \
4552
--path.data ${STORE_DIR} \
4653
--path.config ${JOB_DIR}/config/logstash.conf \
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# the default /tmp dir is often noexec, so we need to use one that is not.
2+
-Djava.io.tmpdir=/var/vcap/data/sys/tmp/archiver_syslog
3+
4+
<% p('logstash.jvm_options').each do |opt| %><%= opt %><% end %>

jobs/elasticsearch/templates/bin/elasticsearch_ctl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export HEAP_SIZE=$((( $( cat /proc/meminfo | grep MemTotal | awk '{ print $2 }'
1919
<% end %>
2020

2121
export ES_JAVA_OPTS="-Xms$HEAP_SIZE -Xmx$HEAP_SIZE -Djava.io.tmpdir=$TMP_DIR"
22-
export ES_JVM_OPTIONS="${JOB_DIR}/config/jvm.options"
22+
export ES_PATH_CONF=${JOB_DIR}/config
2323
# encountered environment variables that are no longer suppor; thentted
2424

2525
export MAX_OPEN_FILES=<%= p("elasticsearch.limits.fd") %>
@@ -66,7 +66,6 @@ case $1 in
6666

6767
chpst -u vcap:vcap /var/vcap/packages/elasticsearch/bin/elasticsearch \
6868
-p ${PIDFILE} \
69-
-Epath.conf=${JOB_DIR}/config \
7069
<%= p("elasticsearch.exec.options", []).join(' ') %> \
7170
>>$LOG_DIR/$JOB_NAME.stdout.log \
7271
2>>$LOG_DIR/$JOB_NAME.stderr.log

0 commit comments

Comments
 (0)