summaryrefslogtreecommitdiffhomepage
path: root/public/v2/apps/graylog.json
blob: a9afa21e13a45d8251661a6b89c3cf3edbce9438 (plain)
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
{
    "captainVersion": "2",
    "documentation": "Taken from https://hub.docker.com/r/graylog/graylog",
    "displayName": "",
    "description": "Graylog is used for log management of both structured and unstructured data along with debugging applications.",
    "dockerCompose": {
        "version": "3.3",
        "services": {
            "$$cap_appname-mongodb": {
                "image": "mongo:$$cap_mongo_version",
                "notExposeAsWebApp": "true",
                "volumes": [
                    "$$cap_appname-db-data:/data/db",
                    "$$cap_appname-db-config:/data/configdb"
                ],
                "restart": "always"
            },
            "$$cap_appname-elasticsearch": {
                "notExposeAsWebApp": "true",
                "image": "docker.elastic.co/elasticsearch/elasticsearch:$$cap_elasticsearch_version",
                "volumes": [
                    "$$cap_appname-elasticsearch-data:/usr/share/elasticsearch/data"
                ],
                "restart": "always",
                "environment": {
                    "ES_JAVA_OPTS": "-Xms512m -Xmx512m",
                    "cluster.name": "$$cap_elasticsearch_cluster_name",
                    "http.port": "$$cap_container_port",
                    "node.master": "$$cap_elasticsearch_node_master",
                    "node.data": "$$cap_elasticsearch_node_data",
                    "discovery.zen.minimum_master_nodes": "$$cap_elasticsearch_minimum_master_nodes",
                    "discovery.zen.ping.unicast.hosts": "$$cap_elasticsearch_unicast_hosts"
                }
            },
            "$$cap_appname": {
                "depends_on": [
                    "$$cap_appname-mongodb",
                    "$$cap_appname-elasticsearch"
                ],
                "image": "graylog/graylog:$$cap_graylog_version",
                "containerHttpPort": "9000",
                "restart": "always",
                "environment": {
                    "GRAYLOG_MONGODB_URI": "mongodb://srv-captain--$$cap_appname-mongodb/graylog",
                    "GRAYLOG_ELASTICSEARCH_HOSTS": "http://srv-captain--$$cap_appname-elasticsearch:$$cap_container_port",
                    "GRAYLOG_HTTP_EXTERNAL_URI": "//$$cap_appname.$$cap_root_domain/",
                    "GRAYLOG_ROOT_PASSWORD_SHA2": "$$cap_graylog_password"
                }
            }
        }
    },
    "instructions": {
        "start": "Graylog Log Management. \n\nNOTICE!:\n Be sure to extend the virtual memory on all your hosts! \n  1. echo 'vm.max_map_count=262144' >> /etc/sysctl.conf\n  2. sysctl -p",
        "end": "Deployment of Graylog if finished. You will see 502 errors for the next 5+ minutes while Graylog starts up. Goto <YOUR-APP-URL> and login as \"admin\" with your unhashed password."
    },
    "variables": [
        {
            "id": "$$cap_graylog_version",
            "label": "Graylog Version",
            "defaultValue": "3.1",
            "description": "Checkout their docker page for the valid tags https://hub.docker.com/r/graylog/graylog/tags",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_graylog_password",
            "label": "Graylog Admin Password",
            "defaultValue": "",
            "description": "Admin password SHA256 encoded. Generate with: echo -n \"<password>\" | shasum -a 256 | cut -d\" \" -f1",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_mongo_version",
            "label": "MongoDB Version",
            "defaultValue": "4",
            "description": "Checkout their docker page for the valid tags https://hub.docker.com/r/library/mongo/tags/",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_elasticsearch_version",
            "label": "Elasticsearch Version Tag ",
            "description": "Checkout the releases overview: https://www.elastic.co/de/downloads/elasticsearch",
            "defaultValue": "6.7.1",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_elasticsearch_cluster_name",
            "label": "Elasticsearch Cluster Name",
            "description": "Only nodes within the same cluster name can be combined",
            "defaultValue": "elasticsearch-cluster",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_elasticsearch_unicast_hosts",
            "label": "Elasticsearch Unicasts hosts",
            "description": "References to other node to attach to. (for example: srv-captain--XXX)",
            "defaultValue": "false",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_elasticsearch_node_data",
            "label": "Elasticsearch Node Data",
            "description": "Should the node used for storing data? (true / false)",
            "defaultValue": "true",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_elasticsearch_node_master",
            "label": "Elasticsearch Node Master",
            "description": "Define node as master-eligible (usual first node YES, others NO).",
            "defaultValue": "true",
            "validRegex": "/^([^\\s^\\/])+$/"
        },
        {
            "id": "$$cap_elasticsearch_minimum_master_nodes",
            "label": "Elasticsearch Minimum Master Nodes",
            "description": "Define minimum amount of master (N) ( best practice: ceil(N/2 + 1) ).",
            "defaultValue": "1",
            "validRegex": "/^([0-9])+$/"
        },
        {
            "id": "$$cap_container_port",
            "label": "Elasticsearch Container TCP Port",
            "defaultValue": "9200",
            "description": "Internal port for Elasticsearch the container listens to.",
            "validRegex": "/^([0-9])+$/"
        }
    ]
}