Skip to content
Snippets Groups Projects
Commit ee2233ca authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Use a dedicated playbook for tools imported with ansible galaxy

parent a75f73ee
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env ansible-playbook
---
- name: DEPLOY ELASTIC KIBANA SERVER
hosts: elastic
tags: [ 'never', 'monbench' ]
vars:
- es_heap_size: 2g
- es_config:
network.host: "{{ hostvars[groups['elastic'][0]]['ansible_default_ipv4']['address'] }}"
node.data: true
node.master: true
cluster.initial_master_nodes: "{{ hostvars[groups['elastic'][0]].ansible_hostname }}"
- kibana_server_host: "{{ hostvars[groups['elastic'][0]]['ansible_default_ipv4']['address'] }}"
- elastic_host: "{{ es_config['network.host'] }}"
- es_api_host: "{{ es_config['network.host'] }}"
roles:
- elastic.elasticsearch
- elastic
- name: DEPLOY METRICBEAT WORKERS
hosts: mediaserver,postgres
tags: [ 'never', 'monbench' ]
vars:
- kibana_server_host: "{{ hostvars[groups['elastic'][0]]['ansible_default_ipv4']['address'] }}"
- elastic_host: "{{ es_config['network.host'] }}"
- es_api_host: "{{ es_config['network.host'] }}"
roles:
- metricbeat
...
......@@ -30,31 +30,4 @@
state: restarted
tags: [ 'never', 'prepare-bench' ]
- name: DEPLOY ELASTIC KIBANA SERVER
hosts: elastic
tags: [ 'never', 'monbench' ]
vars:
- es_heap_size: 2g
- es_config:
network.host: "{{ hostvars[groups['elastic'][0]]['ansible_default_ipv4']['address'] }}"
node.data: true
node.master: true
cluster.initial_master_nodes: "{{ hostvars[groups['elastic'][0]].ansible_hostname }}"
- kibana_server_host: "{{ hostvars[groups['elastic'][0]]['ansible_default_ipv4']['address'] }}"
- elastic_host: "{{ es_config['network.host'] }}"
- es_api_host: "{{ es_config['network.host'] }}"
roles:
- elastic.elasticsearch
- elastic
- name: DEPLOY METRICBEAT WORKERS
hosts: mediaserver,postgres
tags: [ 'never', 'monbench' ]
vars:
- kibana_server_host: "{{ hostvars[groups['elastic'][0]]['ansible_default_ipv4']['address'] }}"
- elastic_host: "{{ es_config['network.host'] }}"
- es_api_host: "{{ es_config['network.host'] }}"
roles:
- metricbeat
...
......@@ -63,7 +63,7 @@ If the server hosting the bench server is using a firewall, disable it to be abl
Launch the test stream on the bench server, using the docker container :
`cd /usr/share/ms-testing-suite && make run_live`
Or directly by hand :
Or directly by hand:
`/usr/share/ms-testing-suite/ms_live_streamer.py /etc/mediaserver/bench-streaming.conf`
Go with your browser on `http://<bench_server>:8089`. You might have to use an SSH tunnel to access this port.
......@@ -74,7 +74,7 @@ Watch for `/var/log/access.log` (warning: this file is buffered by default, you
## Restart Locust server & workers
If you need to restart both server & workers, you can launch the playbook with the tag `prepare-bench`
If you need to restart both server & workers, you can launch the playbook with the tag `prepare-bench`:
```
# ansible-playbook -i inventories/<your inventory> playbooks/bench.yml -t prepare-bench
```
......@@ -89,10 +89,10 @@ First you need to add a new group to your hosts files :
elastic1.test.com
```
Then launch the playbook with the tag `monbench` wich will install both the elastic suite on the elastic host, and metricbeat on mediaserver & postgres servers.
Then launch the playbook `bench-monitoring` which will install both the elastic suite on the elastic host, and metricbeat on mediaserver & postgres servers.
```
# ansible-playbook -i inventories/<your inventory> playbooks/bench.yml -t monbench
# ansible-playbook -i inventories/<your inventory> playbooks/bench-monitoring.yml
```
Your kibana instance will be accessible at `http://elastic1.test.com:5601`
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment