mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
elk
This commit is contained in:
parent
a62f11411a
commit
9a284f0378
11 changed files with 78 additions and 0 deletions
0
apps/roles/elk/Notes.md
Normal file
0
apps/roles/elk/Notes.md
Normal file
1
apps/roles/elk/defaults/main.yml
Normal file
1
apps/roles/elk/defaults/main.yml
Normal file
|
@ -0,0 +1 @@
|
|||
|
0
apps/roles/elk/files/template.service
Normal file
0
apps/roles/elk/files/template.service
Normal file
0
apps/roles/elk/handlers/main.yml
Normal file
0
apps/roles/elk/handlers/main.yml
Normal file
19
apps/roles/elk/meta/main.yml
Normal file
19
apps/roles/elk/meta/main.yml
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
dependencies: []
|
||||
|
||||
galaxy_info:
|
||||
author:
|
||||
description:
|
||||
company:
|
||||
license:
|
||||
min_ansible_version:
|
||||
platforms:
|
||||
- name: EL
|
||||
versions:
|
||||
- 7
|
||||
- name: Ubuntu
|
||||
versions:
|
||||
- 18.04
|
||||
|
||||
galaxy_tags:
|
||||
|
0
apps/roles/elk/tasks/Debian.yml
Normal file
0
apps/roles/elk/tasks/Debian.yml
Normal file
0
apps/roles/elk/tasks/RedHat.yml
Normal file
0
apps/roles/elk/tasks/RedHat.yml
Normal file
21
apps/roles/elk/tasks/main.yml
Normal file
21
apps/roles/elk/tasks/main.yml
Normal file
|
@ -0,0 +1,21 @@
|
|||
- name: wait for {{appname}} start
|
||||
wait_for:
|
||||
port: "{{nginx_reverse_proxy_port}}"
|
||||
delay: 10
|
||||
timeout: 300
|
||||
|
||||
- name: Check {{appname}} Version
|
||||
shell: |
|
||||
sudo echo -e "elk_version: `docker exec -it elk-elasticsearch bin/elasticsearch --version | awk -F ' ' '{print $2}'`" |sudo tee -a /data/logs/install_version.txt
|
||||
|
||||
- block:
|
||||
- pause:
|
||||
prompt: "Please login to Kibana UI and check it, then input Enter to continue"
|
||||
echo: no
|
||||
- name: Delete contains and images resources
|
||||
shell: |
|
||||
docker-compose down -v
|
||||
docker system prune --all --force
|
||||
args:
|
||||
chdir: /data/wwwroot/elk
|
||||
when: elk_delete_image == 'y'
|
20
apps/roles/elk/tasks/pre.yml
Normal file
20
apps/roles/elk/tasks/pre.yml
Normal file
|
@ -0,0 +1,20 @@
|
|||
- pause:
|
||||
prompt: |
|
||||
Do you want to delete containers and images (y/n):
|
||||
'y': Delete image
|
||||
'n': Do not delete image
|
||||
private: no
|
||||
Default: 'y'
|
||||
register: delete_image
|
||||
|
||||
- set_fact:
|
||||
elk_delete_image: "{{delete_image.user_input}}"
|
||||
|
||||
- debug:
|
||||
msg: "elk_delete_image is {{elk_delete_image}}"
|
||||
|
||||
- name: Config .env for start containers
|
||||
shell: |
|
||||
public_ip=`wget -O - https://download.websoft9.com/ansible/get_ip.sh | bash`
|
||||
sed -i 's/APP_VERSION=.*/APP_VERSION=v{{erpnext_version}}/g' {{installpath}}/{{appname}}/.env
|
||||
sed -i "s/erp.example.com/$public_ip/g" {{installpath}}/{{appname}}/.env
|
0
apps/roles/elk/templates/template.conf
Normal file
0
apps/roles/elk/templates/template.conf
Normal file
17
apps/roles/elk/vars/main.yml
Normal file
17
apps/roles/elk/vars/main.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
# global
|
||||
region: "0"
|
||||
|
||||
common_install_docker: True
|
||||
docker_install: False
|
||||
|
||||
nginx_vhost_mode: "reverse"
|
||||
nginx_reverse_proxy_port: "9001"
|
||||
nginx_appname: "ELK"
|
||||
|
||||
init_application:
|
||||
elk:
|
||||
username: elastic
|
||||
password: "elastic123"
|
||||
commands:
|
||||
- sudo sed -i "s/elastic123/$new_password/g" `grep 'elastic123' /data/apps/elk/.env -rnl`
|
||||
- sudo sed -i "s/elastic123/$new_password/g" `grep 'elastic123' /data/apps/elk/src/logstash/pipeline/logstash.conf -rnl`
|
Loading…
Reference in a new issue