Merge branch 'tiexin.yang' into 'master'
同步aws inventory hosts ## inventory >aws spot实例发布后同步aws inventory hosts配置 ## role >新增redis-alone角色用于部署单节点(无tweproxy)的redis实例 >修改redis集群角色的readme说明文件 See merge request !4
Showing
10 changed files
with
224 additions
and
3 deletions
1 | # inventory file for az2 | 1 | # inventory file for az2 |
2 | -# auto generated at 2018-12-28 07:41:28 | 2 | +# auto generated at 2019-01-02 06:39:19 |
3 | 3 | ||
4 | [nameservers] | 4 | [nameservers] |
5 | 172.31.9.217 | 5 | 172.31.9.217 |
@@ -19,50 +19,70 @@ | @@ -19,50 +19,70 @@ | ||
19 | 19 | ||
20 | [java-activity] | 20 | [java-activity] |
21 | 172.31.70.6 | 21 | 172.31.70.6 |
22 | +172.31.70.82 | ||
22 | 23 | ||
23 | 24 | ||
24 | [java-bigdata] | 25 | [java-bigdata] |
25 | 172.31.70.6 | 26 | 172.31.70.6 |
27 | +172.31.70.82 | ||
26 | 28 | ||
27 | 29 | ||
28 | [java-brower] | 30 | [java-brower] |
29 | 172.31.70.36 | 31 | 172.31.70.36 |
32 | +172.31.70.46 | ||
30 | 33 | ||
31 | 34 | ||
32 | [java-erpgateway] | 35 | [java-erpgateway] |
33 | 172.31.70.36 | 36 | 172.31.70.36 |
37 | +172.31.70.46 | ||
34 | 38 | ||
35 | 39 | ||
36 | [java-gateway] | 40 | [java-gateway] |
37 | 172.31.70.77 | 41 | 172.31.70.77 |
42 | +172.31.70.113 | ||
43 | +172.31.70.8 | ||
44 | +172.31.70.104 | ||
38 | 45 | ||
39 | 46 | ||
40 | [java-message] | 47 | [java-message] |
41 | 172.31.70.114 | 48 | 172.31.70.114 |
49 | +172.31.70.59 | ||
42 | 50 | ||
43 | 51 | ||
44 | [java-order] | 52 | [java-order] |
45 | 172.31.70.116 | 53 | 172.31.70.116 |
54 | +172.31.70.124 | ||
55 | +172.31.70.43 | ||
56 | + | ||
57 | + | ||
58 | +[java-platform-cms] | ||
59 | +172.31.70.42 | ||
46 | 60 | ||
47 | 61 | ||
48 | [java-product] | 62 | [java-product] |
49 | 172.31.70.114 | 63 | 172.31.70.114 |
64 | +172.31.70.59 | ||
50 | 65 | ||
51 | 66 | ||
52 | [java-promotion] | 67 | [java-promotion] |
53 | 172.31.70.116 | 68 | 172.31.70.116 |
69 | +172.31.70.124 | ||
70 | +172.31.70.43 | ||
54 | 71 | ||
55 | 72 | ||
56 | [java-resources] | 73 | [java-resources] |
57 | 172.31.70.75 | 74 | 172.31.70.75 |
75 | +172.31.70.99 | ||
58 | 76 | ||
59 | 77 | ||
60 | [java-risk] | 78 | [java-risk] |
61 | 172.31.70.6 | 79 | 172.31.70.6 |
80 | +172.31.70.82 | ||
62 | 81 | ||
63 | 82 | ||
64 | [java-sns] | 83 | [java-sns] |
65 | 172.31.70.114 | 84 | 172.31.70.114 |
85 | +172.31.70.59 | ||
66 | 86 | ||
67 | 87 | ||
68 | [java-ufo-fore] | 88 | [java-ufo-fore] |
@@ -75,18 +95,22 @@ | @@ -75,18 +95,22 @@ | ||
75 | 95 | ||
76 | [java-uic] | 96 | [java-uic] |
77 | 172.31.70.36 | 97 | 172.31.70.36 |
98 | +172.31.70.46 | ||
78 | 99 | ||
79 | 100 | ||
80 | [java-union] | 101 | [java-union] |
81 | 172.31.70.69 | 102 | 172.31.70.69 |
103 | +172.31.70.44 | ||
82 | 104 | ||
83 | 105 | ||
84 | [java-users] | 106 | [java-users] |
85 | 172.31.70.75 | 107 | 172.31.70.75 |
108 | +172.31.70.99 | ||
86 | 109 | ||
87 | 110 | ||
88 | [java-wechat] | 111 | [java-wechat] |
89 | 172.31.70.36 | 112 | 172.31.70.36 |
113 | +172.31.70.46 | ||
90 | 114 | ||
91 | 115 | ||
92 | [search-service] | 116 | [search-service] |
roles/redis-alone/README.md
0 → 100644
No preview for this file type
roles/redis-alone/files/redis-3.2.12.tar.gz
0 → 100644
No preview for this file type
roles/redis-alone/handlers/main.yml
0 → 100644
roles/redis-alone/meta/main.yml
0 → 100644
1 | +galaxy_info: | ||
2 | + author: tiexin.yang@yoho.cn | ||
3 | + description: install redis with twemproxy supported HA available | ||
4 | + company: yohobuy.com | ||
5 | + | ||
6 | + # If the issue tracker for your role is not on github, uncomment the | ||
7 | + # next line and provide a value | ||
8 | + # issue_tracker_url: http://example.com/issue/tracker | ||
9 | + | ||
10 | + # Some suggested licenses: | ||
11 | + # - BSD (default) | ||
12 | + # - MIT | ||
13 | + # - GPLv2 | ||
14 | + # - GPLv3 | ||
15 | + # - Apache | ||
16 | + # - CC-BY | ||
17 | + license: license (GPLv2, CC-BY, etc) | ||
18 | + | ||
19 | + min_ansible_version: 1.2 | ||
20 | + | ||
21 | + # If this a Container Enabled role, provide the minimum Ansible Container version. | ||
22 | + # min_ansible_container_version: | ||
23 | + | ||
24 | + # Optionally specify the branch Galaxy will use when accessing the GitHub | ||
25 | + # repo for this role. During role install, if no tags are available, | ||
26 | + # Galaxy will use this branch. During import Galaxy will access files on | ||
27 | + # this branch. If Travis integration is configured, only notifications for this | ||
28 | + # branch will be accepted. Otherwise, in all cases, the repo's default branch | ||
29 | + # (usually master) will be used. | ||
30 | + #github_branch: | ||
31 | + | ||
32 | + # | ||
33 | + # platforms is a list of platforms, and each platform has a name and a list of versions. | ||
34 | + # | ||
35 | + # platforms: | ||
36 | + # - name: Fedora | ||
37 | + # versions: | ||
38 | + # - all | ||
39 | + # - 25 | ||
40 | + # - name: SomePlatform | ||
41 | + # versions: | ||
42 | + # - all | ||
43 | + # - 1.0 | ||
44 | + # - 7 | ||
45 | + # - 99.99 | ||
46 | + | ||
47 | + galaxy_tags: [] | ||
48 | + # List tags for your role here, one per line. A tag is a keyword that describes | ||
49 | + # and categorizes the role. Users find roles by searching for tags. Be sure to | ||
50 | + # remove the '[]' above, if you add tags to this list. | ||
51 | + # | ||
52 | + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. | ||
53 | + # Maximum 20 tags per role. | ||
54 | + | ||
55 | +dependencies: [] | ||
56 | + # List your role dependencies here, one per line. Be sure to remove the '[]' above, | ||
57 | + # if you add dependencies to this list. |
roles/redis-alone/tasks/main.yml
0 → 100644
1 | +--- | ||
2 | +# tasks file for redis-cluster | ||
3 | + | ||
4 | +# install redis server | ||
5 | + | ||
6 | +- name: Ensure libselinux-python is installed | ||
7 | + yum: | ||
8 | + name: libselinux-python | ||
9 | + state: installed | ||
10 | + update_cache: yes | ||
11 | + | ||
12 | +- name: Check if redis already installed | ||
13 | + stat: path=/Data/local/redis/bin/redis-server | ||
14 | + register: redis_binary | ||
15 | + | ||
16 | +- name: Upload redis source package | ||
17 | + copy: | ||
18 | + src: "redis-3.2.12.tar.gz" | ||
19 | + dest: "/root/redis-3.2.12.tar.gz" | ||
20 | + mode: 0755 | ||
21 | + when: redis_binary.stat.exists == False | ||
22 | + | ||
23 | +- name: Make sure autoconf268 utils installed | ||
24 | + yum: | ||
25 | + name: autoconf268,automake,libtool,gcc | ||
26 | + state: installed | ||
27 | + update_cache: yes | ||
28 | + when: not dc == "aws" | ||
29 | + | ||
30 | +- name: Make sure autoconf utils installed | ||
31 | + yum: | ||
32 | + name: autoconf,automake,libtool,gcc | ||
33 | + state: installed | ||
34 | + update_cache: yes | ||
35 | + when: dc == "aws" | ||
36 | + | ||
37 | + | ||
38 | +- name: Decompress and install redis | ||
39 | + shell: cd /root/ && mkdir -p /Data/local/ && tar -zxvf redis-3.2.12.tar.gz && cd redis-3.2.12 && make MALLOC=libc && make PREFIX=/Data/local/redis install && mkdir -p /Data/local/redis/conf /Data/logs/redis/ /Data/local/redis/data | ||
40 | + when: redis_binary.stat.exists == False | ||
41 | + | ||
42 | +- name: Update redis configuration file | ||
43 | + template: | ||
44 | + src: "redis.conf.j2" | ||
45 | + dest: "/Data/local/redis/conf/redis.conf" | ||
46 | + notify: | ||
47 | + - stop redis | ||
48 | + - start redis | ||
49 | + | ||
50 | +- name: set autoconf binary file | ||
51 | + set_fact: | ||
52 | + autoreconf: 'autoconf' | ||
53 | + when: dc == "aws" | ||
54 | + | ||
55 | +- name: set autoconfa68 binary file | ||
56 | + set_fact: | ||
57 | + autoreconf: 'autoconf268 -ivf' | ||
58 | + when: not dc == "aws" |
roles/redis-alone/templates/README.md
0 → 100644
roles/redis-alone/templates/redis.conf.j2
0 → 100644
1 | +daemonize yes | ||
2 | +pidfile /Data/local/redis/redis.pid | ||
3 | +bind "{{ ansible_default_ipv4['address'] }}" | ||
4 | +port 6379 | ||
5 | +tcp-backlog 511 | ||
6 | +timeout 300 | ||
7 | +tcp-keepalive 60 | ||
8 | +loglevel notice | ||
9 | +logfile "/Data/logs/redis/redis.log" | ||
10 | +databases 16 | ||
11 | +save "" | ||
12 | +stop-writes-on-bgsave-error yes | ||
13 | +rdbcompression yes | ||
14 | +rdbchecksum yes | ||
15 | +dbfilename redis01.rdb | ||
16 | +dir /Data/local/redis/data | ||
17 | +slave-serve-stale-data yes | ||
18 | +slave-read-only yes | ||
19 | +repl-diskless-sync no | ||
20 | +repl-diskless-sync-delay 5 | ||
21 | +repl-disable-tcp-nodelay no | ||
22 | +slave-priority 100 | ||
23 | +maxclients 2048 | ||
24 | +maxmemory {{ ansible_memtotal_mb*0.8 }}M | ||
25 | +appendonly no | ||
26 | +appendfilename "appendonly.aof" | ||
27 | +appendfsync everysec | ||
28 | +no-appendfsync-on-rewrite no | ||
29 | +auto-aof-rewrite-percentage 100 | ||
30 | +auto-aof-rewrite-min-size 64mb | ||
31 | +aof-load-truncated yes | ||
32 | +lua-time-limit 5000 | ||
33 | +slowlog-log-slower-than 10000 | ||
34 | +slowlog-max-len 128 | ||
35 | +latency-monitor-threshold 0 | ||
36 | +notify-keyspace-events "" | ||
37 | +hash-max-ziplist-entries 512 | ||
38 | +hash-max-ziplist-value 64 | ||
39 | +list-max-ziplist-entries 512 | ||
40 | +list-max-ziplist-value 64 | ||
41 | +set-max-intset-entries 512 | ||
42 | +zset-max-ziplist-entries 128 | ||
43 | +zset-max-ziplist-value 64 | ||
44 | +hll-sparse-max-bytes 3000 | ||
45 | +activerehashing yes | ||
46 | +client-output-buffer-limit normal 0 0 0 | ||
47 | +client-output-buffer-limit slave 256mb 64mb 60 | ||
48 | +client-output-buffer-limit pubsub 32mb 8mb 60 | ||
49 | +hz 10 | ||
50 | +aof-rewrite-incremental-fsync yes | ||
51 | +requirepass redis9646 |
@@ -3,13 +3,13 @@ redis.conf | @@ -3,13 +3,13 @@ redis.conf | ||
3 | 3 | ||
4 | - 基本路径:/Data/local/redis/ | 4 | - 基本路径:/Data/local/redis/ |
5 | - 禁用redis持久化配置 | 5 | - 禁用redis持久化配置 |
6 | -- 监听端口6379 | 6 | +- 监听端口16379 |
7 | - 最大可使用内存(maxmemory)默认为系统物理内存的80% | 7 | - 最大可使用内存(maxmemory)默认为系统物理内存的80% |
8 | 8 | ||
9 | nutcracker.yml | 9 | nutcracker.yml |
10 | ========= | 10 | ========= |
11 | 11 | ||
12 | -- redis集群默认监听端口: 22121 | 12 | +- redis集群默认监听端口: 6379 |
13 | 13 | ||
14 | Author Information | 14 | Author Information |
15 | ------------------ | 15 | ------------------ |
-
Please register or login to post a comment