summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlijia <[email protected]>2019-09-24 21:26:18 +0800
committerlijia <[email protected]>2019-09-24 21:26:18 +0800
commit02f2469f6054fab782183d778d70818307ed36d0 (patch)
tree67eb72405752b4be0c6026ec711441b95a322b9c
parente948ec211c8b125c0767b23848e16fbee3773f01 (diff)
增加信息港第2台测试设备IP;
增加astana部署环境IP; 修改tsg-monitor服务开启自启动方式;
-rw-r--r--README.md19
-rw-r--r--astana_ADC_IPlist_V1.xlsxbin0 -> 20524 bytes
-rw-r--r--hosts.astana70
-rw-r--r--hosts.xxg.new28
-rw-r--r--roles/tsg-cli-mcn0/tasks/main.yml12
-rw-r--r--roles/tsg-cli-mcn1/files/tsg-monitor.sh3
-rw-r--r--roles/tsg-cli-mcn1/tasks/main.yml11
-rw-r--r--roles/tsg-cli-mcn2/files/tsg-monitor.sh3
-rw-r--r--roles/tsg-cli-mcn2/tasks/main.yml11
-rw-r--r--roles/tsg-cli-mcn3/files/tsg-monitor.sh3
-rw-r--r--roles/tsg-cli-mcn3/tasks/main.yml11
-rw-r--r--roles/tsg-cli-mxn/tasks/main.yml11
12 files changed, 109 insertions, 73 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..9a40fdb
--- /dev/null
+++ b/README.md
@@ -0,0 +1,19 @@
+TSG CLI 模块安装部署说明:
+
+1.安装文件
+ git_project_url: https://git.mesalab.cn/tsg/cli
+ 或使用离线RPM安装包。
+
+2.部署工具
+ tsg cli模块使用ansible工具自动部署,
+ 与tsg cli部署相关的脚本和配置文件已上传至: https://git.mesalab.cn/tsg/cli-deploy
+ 只需根据实际部署环境,修改IP地址配置文件hosts即可,
+ 更多详细信息请参考: https://www.ansible.com
+
+3.部署步骤
+ 3.1)解压cli-deploy.tgz安装包至任意目录
+ 3.2)进入cli-deploy目录, 根据要部署的实际网络环境, 选择合适的hosts文件,
+ 例如,在信息港部署TSG设备, 执行以下命令:
+ ansible-playbook -i hosts.xxg ./tsg-cli-playbook.yml
+ 3.3)ansible工具会根据预设的playbook自动部署, 部署完成后, 会生成报告,
+ 状态正常包括ok和changed, 如果有failed计数, 请联系开发人员解决。 \ No newline at end of file
diff --git a/astana_ADC_IPlist_V1.xlsx b/astana_ADC_IPlist_V1.xlsx
new file mode 100644
index 0000000..b4ec45d
--- /dev/null
+++ b/astana_ADC_IPlist_V1.xlsx
Binary files differ
diff --git a/hosts.astana b/hosts.astana
index 87a1021..68dbd98 100644
--- a/hosts.astana
+++ b/hosts.astana
@@ -3,49 +3,49 @@ ansible_user=root
rpm_file_name=tsg-cli-1.0.6-1.el7.x86_64.rpm
[sled-mxn]
-10.4.164.23 SN=CBT2201840103123
-10.4.164.24 SN=CBT2201840103124
-10.4.164.25 SN=CBT2201840103125
-10.4.164.26 SN=CBT2201840103126
-10.4.164.27 SN=CBT2201840103127
-10.4.164.28 SN=CBT2201840103128
-10.4.164.29 SN=CBT2201840103129
+10.4.164.23 SN=CBT2201840103110
+10.4.164.24 SN=CBT2201840103111
+10.4.164.25 SN=CBT2201840103112
+10.4.164.26 SN=CBT2201840103113
+10.4.164.27 SN=CBT2201840103114
+10.4.164.28 SN=CBT2201840103115
+10.4.164.29 SN=CBT2201840103116
[sled-mcn0]
-10.4.39.9 SN=CBT2201840103123
-10.4.39.13 SN=CBT2201840103124
-10.4.39.17 SN=CBT2201840103125
-10.4.39.21 SN=CBT2201840103126
-10.4.39.25 SN=CBT2201840103127
-10.4.39.29 SN=CBT2201840103128
-10.4.39.33 SN=CBT2201840103129
+10.4.39.9 SN=CBT2201840103110
+10.4.39.13 SN=CBT2201840103111
+10.4.39.17 SN=CBT2201840103112
+10.4.39.21 SN=CBT2201840103113
+10.4.39.25 SN=CBT2201840103114
+10.4.39.29 SN=CBT2201840103115
+10.4.39.33 SN=CBT2201840103116
[sled-mcn1]
-10.4.39.10 SN=CBT2201840103123
-10.4.39.14 SN=CBT2201840103124
-10.4.39.18 SN=CBT2201840103125
-10.4.39.22 SN=CBT2201840103126
-10.4.39.26 SN=CBT2201840103127
-10.4.39.30 SN=CBT2201840103128
-10.4.39.34 SN=CBT2201840103129
+10.4.39.10 SN=CBT2201840103110
+10.4.39.14 SN=CBT2201840103111
+10.4.39.18 SN=CBT2201840103112
+10.4.39.22 SN=CBT2201840103113
+10.4.39.26 SN=CBT2201840103114
+10.4.39.30 SN=CBT2201840103115
+10.4.39.34 SN=CBT2201840103116
[sled-mcn2]
-10.4.39.11 SN=CBT2201840103123
-10.4.39.15 SN=CBT2201840103124
-10.4.39.19 SN=CBT2201840103125
-10.4.39.23 SN=CBT2201840103126
-10.4.39.27 SN=CBT2201840103127
-10.4.39.31 SN=CBT2201840103128
-10.4.39.35 SN=CBT2201840103129
+10.4.39.11 SN=CBT2201840103110
+10.4.39.15 SN=CBT2201840103111
+10.4.39.19 SN=CBT2201840103112
+10.4.39.23 SN=CBT2201840103113
+10.4.39.27 SN=CBT2201840103114
+10.4.39.31 SN=CBT2201840103115
+10.4.39.35 SN=CBT2201840103116
[sled-mcn3]
-10.4.39.12 SN=CBT2201840103123
-10.4.39.16 SN=CBT2201840103124
-10.4.39.20 SN=CBT2201840103125
-10.4.39.24 SN=CBT2201840103126
-10.4.39.28 SN=CBT2201840103127
-10.4.39.32 SN=CBT2201840103128
-10.4.39.36 SN=CBT2201840103129
+10.4.39.12 SN=CBT2201840103110
+10.4.39.16 SN=CBT2201840103111
+10.4.39.20 SN=CBT2201840103112
+10.4.39.24 SN=CBT2201840103113
+10.4.39.28 SN=CBT2201840103114
+10.4.39.32 SN=CBT2201840103115
+10.4.39.36 SN=CBT2201840103116
[tsg-all:children]
sled-mxn
diff --git a/hosts.xxg.new b/hosts.xxg.new
new file mode 100644
index 0000000..f915186
--- /dev/null
+++ b/hosts.xxg.new
@@ -0,0 +1,28 @@
+[all:vars]
+ansible_user=root
+rpm_file_name=tsg-cli-1.0.7-1.el7.x86_64.rpm
+
+[sled-mxn]
+192.168.40.25 SN=CBT2201925000002
+
+[sled-mcn0]
+192.168.40.21 SN=CBT2201925000002
+
+[sled-mcn1]
+192.168.40.22 SN=CBT2201925000002
+
+[sled-mcn2]
+192.168.40.23 SN=CBT2201925000002
+
+[sled-mcn3]
+192.168.40.24 SN=CBT2201925000002
+
+[tsg-all:children]
+sled-mxn
+sled-mcn0
+sled-mcn1
+sled-mcn2
+sled-mcn3
+
+
+
diff --git a/roles/tsg-cli-mcn0/tasks/main.yml b/roles/tsg-cli-mcn0/tasks/main.yml
index a15b827..b4d2e9c 100644
--- a/roles/tsg-cli-mcn0/tasks/main.yml
+++ b/roles/tsg-cli-mcn0/tasks/main.yml
@@ -35,11 +35,9 @@
dest: "/opt/tsg/tsg-monitor/"
mode: 0755
-- name: "reload systemd config"
- command: systemctl daemon-reload
-
- name: "enable tsg-monitor service"
- command: systemctl enable tsg-monitor.service
-
-#- name: "start tsg-monitor service"
-# command: systemctl start tsg-monitor.service
+ systemd:
+ name: tsg-monitor
+ enabled: yes
+ daemon_reload: yes
+
diff --git a/roles/tsg-cli-mcn1/files/tsg-monitor.sh b/roles/tsg-cli-mcn1/files/tsg-monitor.sh
index b92fb1e..bad8e24 100644
--- a/roles/tsg-cli-mcn1/files/tsg-monitor.sh
+++ b/roles/tsg-cli-mcn1/files/tsg-monitor.sh
@@ -10,7 +10,7 @@ killall_uncompleted_cmd(){
killall -9 -q tsg_diagnose_background
killall -9 -q tsg_update_tags
killall -9 -q tsg_monit_interface
-
+ killall -9 -q tsg_monit_intercept
}
start_background_cmd(){
@@ -19,6 +19,7 @@ start_background_cmd(){
/opt/tsg/tsg-monitor/tsg_diagnose_background > /dev/null &
/opt/tsg/tsg-monitor/tsg_update_tags > /dev/null &
/opt/tsg/tsg-monitor/tsg_monit_interface > /dev/null &
+ /opt/tsg/tsg-monitor/tsg_monit_intercept > /dev/null &
}
#return value: current time in ms
diff --git a/roles/tsg-cli-mcn1/tasks/main.yml b/roles/tsg-cli-mcn1/tasks/main.yml
index dff0f21..b564225 100644
--- a/roles/tsg-cli-mcn1/tasks/main.yml
+++ b/roles/tsg-cli-mcn1/tasks/main.yml
@@ -35,11 +35,8 @@
dest: "/opt/tsg/tsg-monitor/"
mode: 0755
-- name: "reload systemd config"
- command: systemctl daemon-reload
-
- name: "enable tsg-monitor service"
- command: systemctl enable tsg-monitor.service
-
-#- name: "start tsg-monitor service"
-# command: systemctl start tsg-monitor.service
+ systemd:
+ name: tsg-monitor
+ enabled: yes
+ daemon_reload: yes
diff --git a/roles/tsg-cli-mcn2/files/tsg-monitor.sh b/roles/tsg-cli-mcn2/files/tsg-monitor.sh
index 8756f76..74d7fa8 100644
--- a/roles/tsg-cli-mcn2/files/tsg-monitor.sh
+++ b/roles/tsg-cli-mcn2/files/tsg-monitor.sh
@@ -10,7 +10,7 @@ killall_uncompleted_cmd(){
killall -9 -q tsg_diagnose_background
killall -9 -q tsg_update_tags
killall -9 -q tsg_monit_interface
-
+ killall -9 -q tsg_monit_intercept
}
start_background_cmd(){
@@ -19,6 +19,7 @@ start_background_cmd(){
/opt/tsg/tsg-monitor/tsg_diagnose_background > /dev/null &
/opt/tsg/tsg-monitor/tsg_update_tags > /dev/null &
/opt/tsg/tsg-monitor/tsg_monit_interface > /dev/null &
+ /opt/tsg/tsg-monitor/tsg_monit_intercept > /dev/null &
}
#return value: current time in ms
diff --git a/roles/tsg-cli-mcn2/tasks/main.yml b/roles/tsg-cli-mcn2/tasks/main.yml
index dff0f21..b564225 100644
--- a/roles/tsg-cli-mcn2/tasks/main.yml
+++ b/roles/tsg-cli-mcn2/tasks/main.yml
@@ -35,11 +35,8 @@
dest: "/opt/tsg/tsg-monitor/"
mode: 0755
-- name: "reload systemd config"
- command: systemctl daemon-reload
-
- name: "enable tsg-monitor service"
- command: systemctl enable tsg-monitor.service
-
-#- name: "start tsg-monitor service"
-# command: systemctl start tsg-monitor.service
+ systemd:
+ name: tsg-monitor
+ enabled: yes
+ daemon_reload: yes
diff --git a/roles/tsg-cli-mcn3/files/tsg-monitor.sh b/roles/tsg-cli-mcn3/files/tsg-monitor.sh
index 9d534ee..49f913b 100644
--- a/roles/tsg-cli-mcn3/files/tsg-monitor.sh
+++ b/roles/tsg-cli-mcn3/files/tsg-monitor.sh
@@ -10,7 +10,7 @@ killall_uncompleted_cmd(){
killall -9 -q tsg_diagnose_background
killall -9 -q tsg_update_tags
killall -9 -q tsg_monit_interface
-
+ killall -9 -q tsg_monit_intercept
}
start_background_cmd(){
@@ -19,6 +19,7 @@ start_background_cmd(){
/opt/tsg/tsg-monitor/tsg_diagnose_background > /dev/null &
/opt/tsg/tsg-monitor/tsg_update_tags > /dev/null &
/opt/tsg/tsg-monitor/tsg_monit_interface > /dev/null &
+ /opt/tsg/tsg-monitor/tsg_monit_intercept > /dev/null &
}
#return value: current time in ms
diff --git a/roles/tsg-cli-mcn3/tasks/main.yml b/roles/tsg-cli-mcn3/tasks/main.yml
index dff0f21..b564225 100644
--- a/roles/tsg-cli-mcn3/tasks/main.yml
+++ b/roles/tsg-cli-mcn3/tasks/main.yml
@@ -35,11 +35,8 @@
dest: "/opt/tsg/tsg-monitor/"
mode: 0755
-- name: "reload systemd config"
- command: systemctl daemon-reload
-
- name: "enable tsg-monitor service"
- command: systemctl enable tsg-monitor.service
-
-#- name: "start tsg-monitor service"
-# command: systemctl start tsg-monitor.service
+ systemd:
+ name: tsg-monitor
+ enabled: yes
+ daemon_reload: yes
diff --git a/roles/tsg-cli-mxn/tasks/main.yml b/roles/tsg-cli-mxn/tasks/main.yml
index 581d5b5..6de139d 100644
--- a/roles/tsg-cli-mxn/tasks/main.yml
+++ b/roles/tsg-cli-mxn/tasks/main.yml
@@ -30,11 +30,8 @@
dest: "/opt/tsg/tsg-monitor/"
mode: 0755
-- name: "reload systemd config"
- command: systemctl daemon-reload
-
- name: "enable tsg-monitor service"
- command: systemctl enable tsg-monitor.service
-
-- name: "start tsg-monitor service"
- command: systemctl start tsg-monitor.service \ No newline at end of file
+ systemd:
+ name: tsg-monitor
+ enabled: yes
+ daemon_reload: yes \ No newline at end of file