更新influxdb安装模块
This commit is contained in:
@@ -1,70 +0,0 @@
|
||||
- hosts: cluster_server
|
||||
roles:
|
||||
- consul-cluster
|
||||
- mariadb
|
||||
- influxdb
|
||||
|
||||
- hosts: blade-mxn
|
||||
roles:
|
||||
- jdk1.8.0_73
|
||||
- consul-external
|
||||
|
||||
- hosts: blade-00
|
||||
roles:
|
||||
- jdk1.8.0_73
|
||||
- mariadb
|
||||
- consul-internal
|
||||
- telegraf
|
||||
- influxdb
|
||||
- grafana
|
||||
|
||||
- hosts: blade-01
|
||||
roles:
|
||||
- jdk1.8.0_73
|
||||
- consul-internal
|
||||
|
||||
- hosts: blade-02
|
||||
roles:
|
||||
- jdk1.8.0_73
|
||||
- consul-internal
|
||||
|
||||
- hosts: blade-03
|
||||
roles:
|
||||
- jdk1.8.0_73
|
||||
- consul-internal
|
||||
|
||||
- hosts: sled-mxn
|
||||
roles:
|
||||
- tsg-cli-mxn
|
||||
- oam_cli_agent_mxn
|
||||
- oam_cli
|
||||
- oam_core
|
||||
- oam_snmp
|
||||
|
||||
- hosts: sled-mcn0
|
||||
roles:
|
||||
- tsg-cli-mcn0
|
||||
- oam_cli_agent
|
||||
|
||||
- hosts: sled-mcn1
|
||||
roles:
|
||||
- tsg-cli-mcn1
|
||||
- oam_cli_agent
|
||||
|
||||
- hosts: sled-mcn2
|
||||
roles:
|
||||
- tsg-cli-mcn2
|
||||
- oam_cli_agent
|
||||
|
||||
- hosts: sled-mcn3
|
||||
roles:
|
||||
- tsg-cli-mcn3
|
||||
- oam_cli_agent
|
||||
|
||||
- hosts: sled-mxn
|
||||
roles:
|
||||
- oam_core_start
|
||||
|
||||
- hosts: cluster_server
|
||||
roles:
|
||||
- oam_cluster
|
||||
@@ -21,15 +21,17 @@
|
||||
state: restarted
|
||||
enabled: yes
|
||||
|
||||
- name: "create database"
|
||||
shell: influx -host '127.0.0.1' -port '58086' -execute 'create database tsg_stat;'
|
||||
|
||||
- name: "create user"
|
||||
shell: influx -host '127.0.0.1' -port '58086' -database 'tsg_stat' -execute "create user "admin" with password 'tsg2019' with all privileges"
|
||||
shell: influx -host '127.0.0.1' -port '58086' -database '{{ influxdb.dbname }}' -execute "create user "{{ influxdb.username }}" with password '{{ influxdb.passwd }}' with all privileges"
|
||||
|
||||
- name: "create database"
|
||||
shell: influx -host '127.0.0.1' -port '58086' -username '{{ influxdb.username }}' -password '{{ influxdb.passwd }}' -execute 'create database {{ influxdb.dbname }};'
|
||||
|
||||
- name: "set cluster influxdb retention policy"
|
||||
shell: influx -port 58086 -execute 'CREATE RETENTION POLICY "1_year" ON "tsg_stat" DURATION 365d REPLICATION 1 DEFAULT'
|
||||
shell: influx -host '127.0.0.1' -port '58086' -username '{{ influxdb.username }}' -password '{{ influxdb.passwd }}' -execute 'CREATE RETENTION POLICY "1_year" ON "tsg_stat" DURATION 365d REPLICATION 1 DEFAULT'
|
||||
when: influxdb_cluster is defined
|
||||
|
||||
- name: "set mcn0 influxdb retention policy"
|
||||
shell: influx -port 58086 -execute 'CREATE RETENTION POLICY "1_day" ON "tsg_stat" DURATION 1d REPLICATION 1 DEFAULT'
|
||||
shell: influx -host '127.0.0.1' -port '58086' -username '{{ influxdb.username }}' -password '{{ influxdb.passwd }}' -execute 'CREATE RETENTION POLICY "1_day" ON "tsg_stat" DURATION 1d REPLICATION 1 DEFAULT'
|
||||
when: influxdb_cluster is not defined
|
||||
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
# The bind address used by the HTTP service.
|
||||
bind-address = ":58086"
|
||||
# Determines whether user authentication is enabled over HTTP/HTTPS.
|
||||
# auth-enabled = false
|
||||
auth-enabled = true
|
||||
|
||||
# The default realm sent back when issuing a basic auth challenge.
|
||||
# realm = "InfluxDB"
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
influxdb:
|
||||
cluster_agent: "no"
|
||||
mcn0_agent: "yes"
|
||||
@@ -1,4 +0,0 @@
|
||||
influxdb:
|
||||
cluster_agent: "yes"
|
||||
mcn0_agent: "no"
|
||||
|
||||
@@ -4,7 +4,7 @@ use_chassis_hardware_sn=false
|
||||
rpm_file_name=tsg-cli-1.0.14.eccfd07-1.el7.x86_64.rpm
|
||||
|
||||
[cluster_server]
|
||||
192.168.40.210
|
||||
192.168.40.210 influxdb_cluster=true
|
||||
|
||||
[blade-mxn]
|
||||
192.168.40.170 SN=CBT2201925000003 mcn0_ip=192.168.40.166
|
||||
|
||||
Reference in New Issue
Block a user