-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmanifest.jps
87 lines (78 loc) · 3.65 KB
/
manifest.jps
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
type: install
version: 1.7
id: graylog
name: Graylog
logo: images/graylog-logo.png
homepage: https://www.graylog.org/
baseUrl: https://raw.githubusercontent.com/jelastic-jps/graylog/master/
description: |
Graylog is a centralized log management solution built to open standards for capturing, storing, and enabling real-time analysis.
Single server installation.
skipNodeEmails: true
requiredFeatures: extip
categories:
- apps/dev-and-admin-tools
globals:
GRAYLOG_PASSWD: ${fn.password(12)}
SECRET: ${fn.password(96)}
EXPOSE_PORT: 9000
settings:
fields:
- type: list
caption: Graylog Version
name: version
default: "4.0"
required: true
values:
"3.2": 3.2
"3.3": 3.3
"4.0": "4.0"
nodes:
- nodeType: centos-vps
cloudlets: 32
extip: true
env:
JELASTIC_EXPOSE: ${globals.EXPOSE_PORT}
JELASTIC_PORTS: ${globals.EXPOSE_PORT}
onInstall:
- installCommon
- installMongo
- installElastic
- installGraylog
- cmd [centos-vps]: while [[ $(curl -s -w "%{http_code}" http://localhost:${globals.EXPOSE_PORT}/ -o /dev/null) != "200" ]]; do echo "."; sleep 2; done
actions:
installCommon:
- cmd [centos-vps]: |-
rpm --quiet -q epel-release || yum install epel-release -y -q
rpm --quiet -q pwgen || yum install pwgen -y -q
rpm --quiet -q java-1.8.0-openjdk-headless || yum install java-1.8.0-openjdk-headless -y -q
installMongo:
- cmd [centos-vps]: |-
wget -qO /etc/yum.repos.d/mongodb-org.repo http://dot.jelastic.com/download/team.operations/graylog/mongodb-org.repo
yum install mongodb-org -y -q
systemctl daemon-reload ; systemctl enable mongod.service ; systemctl start mongod.service
installElastic:
- cmd [centos-vps]: |-
wget -qO /etc/yum.repos.d/elasticsearch.repo http://dot.jelastic.com/download/team.operations/graylog/elasticsearch.repo
rpm --quiet --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
yum install elasticsearch-oss -y -q
sed 's/#cluster.name: my-application/cluster.name: graylog/' -i /etc/elasticsearch/elasticsearch.yml
sed '/cluster.name: graylog/a action.auto_create_index: false' -i /etc/elasticsearch/elasticsearch.yml
systemctl daemon-reload ; systemctl enable elasticsearch.service ; systemctl restart elasticsearch.service
installGraylog:
- cmd [centos-vps]: |-
rpm --quiet -Uvh https://packages.graylog2.org/repo/packages/graylog-${settings.version}-repository_latest.rpm
yum install graylog-server -y -q
sed "s/password_secret =/password_secret = ${globals.SECRET}/" -i /etc/graylog/server/server.conf
PASSWORD_SHA2=$(echo -n ${globals.GRAYLOG_PASSWD} | sha256sum | cut -d" " -f1) ; sed "s/root_password_sha2 =/root_password_sha2 = ${PASSWORD_SHA2}/" -i /etc/graylog/server/server.conf
sed -e "/# Default:[[:space:]]127.0.0.1:9000/a http_bind_address = 0.0.0.0:9000" -i /etc/graylog/server/server.conf
sed -e "/#http_publish_uri/a http_publish_uri = http://${nodes.centos-vps.extips}:9000/" -i /etc/graylog/server/server.conf
sed -e "/allow_leading_wildcard_searches[[:space:]]*=[[:space:]]*false/allow_leading_wildcard_searches = true/" -i /etc/graylog/server/server.conf
systemctl daemon-reload ; systemctl enable graylog-server.service ; systemctl start graylog-server.service ; systemctl restart graylog-server.service
success:
text: |
### Graylog access credentials
**URL** [http://${nodes.centos-vps.extips}:9000](http://${nodes.centos-vps.extips}:9000)
**Login:** admin
**Password:** ${globals.GRAYLOG_PASSWD}
# https://docs.graylog.org/en/3.1/pages/installation/os/centos.html