Deploy-collector-in-cluster-mode.md 2.0 KB
Newer Older
wu-sheng's avatar
wu-sheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14
## Required of third party softwares
- JDK 6+(instruments application can run in jdk6)
- JDK8  ( skywalking collector and skywalking webui )
- Elasticsearch 5.2.2 or 5.3, cluster mode or not
- Zookeeper 3.4.10

## Download released version
- Go to [released page](https://github.com/OpenSkywalking/skywalking/releases)

## Deploy Elasticsearch server
- Modify `elasticsearch.yml`
  - Set `cluster.name: CollectorDBCluster`
  - Set `node.name: anyname`, this name can be any, it based on Elasticsearch.
  - Add the following configurations to   
wu-sheng's avatar
wu-sheng 已提交
15

wu-sheng's avatar
wu-sheng 已提交
16 17 18 19 20 21 22 23 24 25
```
# The ip used for listening
network.host: 0.0.0.0
thread_pool.bulk.queue_size: 1000
```

- Start Elasticsearch

### Deploy collector servers
1. Run `tar -xvf skywalking-collector.tar.gz`
wu-sheng's avatar
wu-sheng 已提交
26 27 28
2. Config collector in cluster mode.

Cluster mode depends on Zookeeper register and application discovery capabilities. So, you just need to adjust the IP config items in `config/application.yml`. Change IP and port configs of agent_server, agent_stream, ui, collector_inside, replace them to the real ip or hostname which you want to use for cluster.
wu-sheng's avatar
wu-sheng 已提交
29 30 31 32

- `config/application.yml`
```
cluster:
wu-sheng's avatar
wu-sheng 已提交
33
# The Zookeeper cluster for collector cluster management.
wu-sheng's avatar
wu-sheng 已提交
34 35 36
  zookeeper:
    hostPort: localhost:2181
    sessionTimeout: 100000
wu-sheng's avatar
wu-sheng 已提交
37 38
naming:
# Host and port used for agent config
wu-sheng's avatar
wu-sheng 已提交
39 40 41 42
  jetty:
    host: localhost
    port: 10800
    context_path: /
wu-sheng's avatar
wu-sheng 已提交
43 44 45 46 47 48
remote:
  gRPC:
    host: localhost
    port: 11800
agent_gRPC:
  gRPC:
wu-sheng's avatar
wu-sheng 已提交
49 50
    host: localhost
    port: 11800
wu-sheng's avatar
wu-sheng 已提交
51
agent_jetty:
wu-sheng's avatar
wu-sheng 已提交
52 53 54 55
  jetty:
    host: localhost
    port: 12800
    context_path: /
wu-sheng's avatar
wu-sheng 已提交
56 57 58 59 60
agent_stream:
  default:
    buffer_file_path: ../buffer/
    buffer_offset_max_file_size: 10M
    buffer_segment_max_file_size: 500M
wu-sheng's avatar
wu-sheng 已提交
61 62 63 64 65
ui:
  jetty:
    host: localhost
    port: 12800
    context_path: /
wu-sheng's avatar
wu-sheng 已提交
66
# Config Elasticsearch cluster connection info.
wu-sheng's avatar
wu-sheng 已提交
67 68 69 70 71 72 73
storage:
  elasticsearch:
    cluster_name: CollectorDBCluster
    cluster_transport_sniffer: true
    cluster_nodes: localhost:9300
    index_shards_number: 2
    index_replicas_number: 0
wu-sheng's avatar
wu-sheng 已提交
74
    ttl: 7
wu-sheng's avatar
wu-sheng 已提交
75 76
```

wu-sheng's avatar
wu-sheng 已提交
77 78

3. Run `bin/startup.sh`