Ansible:部署数据库【redis/postgresql/mongodb/neodb】
最近两天,会在Gitee上写Ansible针对如题所示的四个数据库的自动化部署脚本。
具体的代码可以去以下地址查阅:
https://gitee.com/leviathan-litan/ansible-redis
https://gitee.com/leviathan-litan/ansible-[……]
Adamhuan's Data Center - 【逻辑驱动数据】
数据玩物、代码屋、1/0游戏:(零和博弈)/ 禅宗意志 / 规则战争 / 解放数据力量 / 技术的飞速发展并没有改变这个世界,因为,这个世界从没有变,它只是越来越趋近于它本来的模样。
最近两天,会在Gitee上写Ansible针对如题所示的四个数据库的自动化部署脚本。
具体的代码可以去以下地址查阅:
https://gitee.com/leviathan-litan/ansible-redis
https://gitee.com/leviathan-litan/ansible-[……]
如题所示,本文通过Ansible工具自动化的部署Cloudera的Cloudera Manager和CDH
Ansible的代码托管在Gitee:
https://gitee.com/leviathan-litan/ansible-cloudera-cm-cdh
由于Git有文件大小的限制[……]
如题所示,本文将呈现如何通过Ansible的方式,安装与部署Prometheus监控。
本文所包含的代码将发布在:
https://gitee.com/leviathan-litan/ansible-prometheus
Prometheus 官方网站:
https://prometheus[……]
命令:
ping 192.168.92.129 -W 2000 | awk ‘{print $0 “\t” strftime(“%Y-%m-%d %H:%M:%S”,systime())}’ | tee ping_data.log
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
[root@mysql-me ~]# ping 192.168.92.129 -W 2000 | awk '{print $0 "\t" strftime("%Y-%m-%d %H:%M:%S",systime())}' | tee ping_data.log PING 192.168.92.129 (192.168.92.129) 56(84) bytes of data. 2017-07-18 21:47:14 64 bytes from 192.168.92.129: icmp_seq=1 ttl=64 time=0.289 ms 2017-07-18 21:47:14 64 bytes from 192.168.92.129: icmp_seq=2 ttl=64 time=3.43 ms 2017-07-18 21:47:15 64 bytes from 192.168.92.129: icmp_seq=3 ttl=64 time=0.670 ms 2017-07-18 21:47:16 64 bytes from 192.168.92.129: icmp_seq=4 ttl=64 time=1.93 ms 2017-07-18 21:47:17 64 bytes from 192.168.92.129: icmp_seq=5 ttl=64 time=0.706 ms 2017-07-18 21:47:18 64 bytes from 192.168.92.129: icmp_seq=6 ttl=64 time=0.719 ms 2017-07-18 21:47:19 64 bytes from 192.168.92.129: icmp_seq=7 ttl=64 time=1.67 ms 2017-07-18 21:47:20 64 bytes from 192.168.92.129: icmp_seq=8 ttl=64 time=0.506 ms 2017-07-18 21:47:21 64 bytes from 192.168.92.129: icmp_seq=9 ttl=64 time=0.636 ms 2017-07-18 21:47:22 64 bytes from 192.168.92.129: icmp_seq=10 ttl=64 time=0.846 ms 2017-07-18 21:47:23 64 bytes from 192.168.92.129: icmp_seq=11 ttl=64 time=1.46 ms 2017-07-18 21:47:24 64 bytes from 192.168.92.129: icmp_seq=12 ttl=64 time=2.40 ms 2017-07-18 21:47:25 64 bytes from 192.168.92.129: icmp_seq=13 ttl=64 time=0.242 ms 2017-07-18 21:47:26 64 bytes from 192.168.92.129: icmp_seq=14 ttl=64 time=0.776 ms 2017-07-18 21:47:27 64 bytes from 192.168.92.129: icmp_seq=15 ttl=64 time=1.91 ms 2017-07-18 21:47:28 64 bytes from 192.168.92.129: icmp_seq=16 ttl=64 time=1.12 ms 2017-07-18 21:47:29 64 bytes from 192.168.92.129: icmp_seq=17 ttl=64 time=0.524 ms 2017-07-18 21:47:30 64 bytes from 192.168.92.129: icmp_seq=18 ttl=64 time=0.762 ms 2017-07-18 21:47:31 64 bytes from 192.168.92.129: icmp_seq=19 ttl=64 time=0.862 ms 2017-07-18 21:47:32 64 bytes from 192.168.92.129: icmp_seq=20 ttl=64 time=0.539 ms 2017-07-18 21:47:33 64 bytes from 192.168.92.129: icmp_seq=21 ttl=64 time=0.751 ms 2017-07-18 21:47:34 64 bytes from 192.168.92.129: icmp_seq=22 ttl=64 time=0.222 ms 2017-07-18 21:47:35 64 bytes from 192.168.92.129: icmp_seq=23 ttl=64 time=0.314 ms 2017-07-18 21:47:36 64 bytes from 192.168.92.129: icmp_seq=24 ttl=64 time=0.479 ms 2017-07-18 21:47:37 64 bytes from 192.168.92.129: icmp_seq=25 ttl=64 time=1.51 ms 2017-07-18 21:47:38 64 bytes from 192.168.92.129: icmp_seq=26 ttl=64 time=0.767 ms 2017-07-18 21:47:39 64 bytes from 192.168.92.129: icmp_seq=27 ttl=64 time=0.420 ms 2017-07-18 21:47:40 64 bytes from 192.168.92.129: icmp_seq=28 ttl=64 time=2.59 ms 2017-07-18 21:47:41 64 bytes from 192.168.92.129: icmp_seq=29 ttl=64 time=0.225 ms 2017-07-18 21:47:42 64 bytes from 192.168.92.129: icmp_seq=30 ttl=64 time=0.616 ms 2017-07-18 21:47:43 64 bytes from 192.168.92.129: icmp_seq=31 ttl=64 time=1.19 ms 2017-07-18 21:47:44 64 bytes from 192.168.92.129: icmp_seq=32 ttl=64 time=0.276 ms 2017-07-18 21:47:45 64 bytes from 192.168.92.129: icmp_seq=33 ttl=64 time=2.33 ms 2017-07-18 21:47:46 64 bytes from 192.168.92.129: icmp_seq=34 ttl=64 time=0.569 ms 2017-07-18 21:47:47 64 bytes from 192.168.92.129: icmp_seq=35 ttl=64 time=0.448 ms 2017-07-18 21:47:48 64 bytes from 192.168.92.129: icmp_seq=36 ttl=64 time=0.412 ms 2017-07-18 21:47:49 64 bytes from 192.168.92.129: icmp_seq=37 ttl=64 time=0.271 ms 2017-07-18 21:47:50 64 bytes from 192.168.92.129: icmp_seq=38 ttl=64 time=0.201 ms 2017-07-18 21:47:51 64 bytes from 192.168.92.129: icmp_seq=39 ttl=64 time=0.287 ms 2017-07-18 21:47:52 64 bytes from 192.168.92.129: icmp_seq=40 ttl=64 time=0.646 ms 2017-07-18 21:47:53 64 bytes from 192.168.92.129: icmp_seq=41 ttl=64 time=0.593 ms 2017-07-18 21:47:54 64 bytes from 192.168.92.129: icmp_seq=42 ttl=64 time=0.322 ms 2017-07-18 21:47:55 64 bytes from 192.168.92.129: icmp_seq=43 ttl=64 time=0.334 ms 2017-07-18 21:47:56 64 bytes from 192.168.92.129: icmp_seq=44 ttl=64 time=0.483 ms 2017-07-18 21:47:57 64 bytes from 192.168.92.129: icmp_seq=45 ttl=64 time=0.391 ms 2017-07-18 21:47:58 64 bytes from 192.168.92.129: icmp_seq=46 ttl=64 time=0.803 ms 2017-07-18 21:47:59 64 bytes from 192.168.92.129: icmp_seq=47 ttl=64 time=0.863 ms 2017-07-18 21:48:00 64 bytes from 192.168.92.129: icmp_seq=48 ttl=64 time=1.09 ms 2017-07-18 21:48:01 64 bytes from 192.168.92.129: icmp_seq=49 ttl=64 time= ^C [root@mysql-me ~]# [root@mysql-me ~]# cat ping_data.log PING 192.168.92.129 (192.168.92.129) 56(84) bytes of data. 2017-07-18 21:47:14 64 bytes from 192.168.92.129: icmp_seq=1 ttl=64 time=0.289 ms 2017-07-18 21:47:14 64 bytes from 192.168.92.129: icmp_seq=2 ttl=64 time=3.43 ms 2017-07-18 21:47:15 64 bytes from 192.168.92.129: icmp_seq=3 ttl=64 time=0.670 ms 2017-07-18 21:47:16 64 bytes from 192.168.92.129: icmp_seq=4 ttl=64 time=1.93 ms 2017-07-18 21:47:17 64 bytes from 192.168.92.129: icmp_seq=5 ttl=64 time=0.706 ms 2017-07-18 21:47:18 64 bytes from 192.168.92.129: icmp_seq=6 ttl=64 time=0.719 ms 2017-07-18 21:47:19 64 bytes from 192.168.92.129: icmp_seq=7 ttl=64 time=1.67 ms 2017-07-18 21:47:20 64 bytes from 192.168.92.129: icmp_seq=8 ttl=64 time=0.506 ms 2017-07-18 21:47:21 64 bytes from 192.168.92.129: icmp_seq=9 ttl=64 time=0.636 ms 2017-07-18 21:47:22 64 bytes from 192.168.92.129: icmp_seq=10 ttl=64 time=0.846 ms 2017-07-18 21:47:23 64 bytes from 192.168.92.129: icmp_seq=11 ttl=64 time=1.46 ms 2017-07-18 21:47:24 64 bytes from 192.168.92.129: icmp_seq=12 ttl=64 time=2.40 ms 2017-07-18 21:47:25 64 bytes from 192.168.92.129: icmp_seq=13 ttl=64 time=0.242 ms 2017-07-18 21:47:26 64 bytes from 192.168.92.129: icmp_seq=14 ttl=64 time=0.776 ms 2017-07-18 21:47:27 64 bytes from 192.168.92.129: icmp_seq=15 ttl=64 time=1.91 ms 2017-07-18 21:47:28 64 bytes from 192.168.92.129: icmp_seq=16 ttl=64 time=1.12 ms 2017-07-18 21:47:29 64 bytes from 192.168.92.129: icmp_seq=17 ttl=64 time=0.524 ms 2017-07-18 21:47:30 64 bytes from 192.168.92.129: icmp_seq=18 ttl=64 time=0.762 ms 2017-07-18 21:47:31 64 bytes from 192.168.92.129: icmp_seq=19 ttl=64 time=0.862 ms 2017-07-18 21:47:32 64 bytes from 192.168.92.129: icmp_seq=20 ttl=64 time=0.539 ms 2017-07-18 21:47:33 64 bytes from 192.168.92.129: icmp_seq=21 ttl=64 time=0.751 ms 2017-07-18 21:47:34 64 bytes from 192.168.92.129: icmp_seq=22 ttl=64 time=0.222 ms 2017-07-18 21:47:35 64 bytes from 192.168.92.129: icmp_seq=23 ttl=64 time=0.314 ms 2017-07-18 21:47:36 64 bytes from 192.168.92.129: icmp_seq=24 ttl=64 time=0.479 ms 2017-07-18 21:47:37 64 bytes from 192.168.92.129: icmp_seq=25 ttl=64 time=1.51 ms 2017-07-18 21:47:38 64 bytes from 192.168.92.129: icmp_seq=26 ttl=64 time=0.767 ms 2017-07-18 21:47:39 64 bytes from 192.168.92.129: icmp_seq=27 ttl=64 time=0.420 ms 2017-07-18 21:47:40 64 bytes from 192.168.92.129: icmp_seq=28 ttl=64 time=2.59 ms 2017-07-18 21:47:41 64 bytes from 192.168.92.129: icmp_seq=29 ttl=64 time=0.225 ms 2017-07-18 21:47:42 64 bytes from 192.168.92.129: icmp_seq=30 ttl=64 time=0.616 ms 2017-07-18 21:47:43 64 bytes from 192.168.92.129: icmp_seq=31 ttl=64 time=1.19 ms 2017-07-18 21:47:44 64 bytes from 192.168.92.129: icmp_seq=32 ttl=64 time=0.276 ms 2017-07-18 21:47:45 64 bytes from 192.168.92.129: icmp_seq=33 ttl=64 time=2.33 ms 2017-07-18 21:47:46 64 bytes from 192.168.92.129: icmp_seq=34 ttl=64 time=0.569 ms 2017-07-18 21:47:47 64 bytes from 192.168.92.129: icmp_seq=35 ttl=64 time=0.448 ms 2017-07-18 21:47:48 64 bytes from 192.168.92.129: icmp_seq=36 ttl=64 time=0.412 ms 2017-07-18 21:47:49 64 bytes from 192.168.92.129: icmp_seq=37 ttl=64 time=0.271 ms 2017-07-18 21:47:50 64 bytes from 192.168.92.129: icmp_seq=38 ttl=64 time=0.201 ms 2017-07-18 21:47:51 64 bytes from 192.168.92.129: icmp_seq=39 ttl=64 time=0.287 ms 2017-07-18 21:47:52 64 bytes from 192.168.92.129: icmp_seq=40 ttl=64 time=0.646 ms 2017-07-18 21:47:53 64 bytes from 192.168.92.129: icmp_seq=41 ttl=64 time=0.593 ms 2017-07-18 21:47:54 64 bytes from 192.168.92.129: icmp_seq=42 ttl=64 time=0.322 ms 2017-07-18 21:47:55 64 bytes from 192.168.92.129: icmp_seq=43 ttl=64 time=0.334 ms 2017-07-18 21:47:56 64 bytes from 192.168.92.129: icmp_seq=44 ttl=64 time=0.483 ms 2017-07-18 21:47:57 64 bytes from 192.168.92.129: icmp_seq=45 ttl=64 time=0.391 ms 2017-07-18 21:47:58 64 bytes from 192.168.92.129: icmp_seq=46 ttl=64 time=0.803 ms 2017-07-18 21:47:59 64 bytes from 192.168.92.129: icmp_seq=47 ttl=64 time=0.863 ms 2017-07-18 21:48:00 64 bytes from 192.168.92.129: icmp_seq=48 ttl=64 time=1.09 ms 2017-07-18 21:48:01 64 bytes from 192.168.92.129: icmp_seq=49 ttl=64 time=[root@mysql-me ~]# [root@mysql-me ~]# [root@mysql-me ~]# |