-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcppcomet.yml
85 lines (72 loc) · 2.12 KB
/
cppcomet.yml
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
---
- hosts: all
vars:
cppcomet_node_name: n1
cppcomet_useQueryLoger: false
cppcomet_base_dir: static
cppcomet_buf_size: 10384
cppcomet_fragment_buf_max_size: 10384
cppcomet_answer_buf_size: 1000000
cppcomet_db_host: localhost
cppcomet_db_user: root
cppcomet_db_password: root
cppcomet_db_name: comet_db
cppcomet_db_port: 3306
cppcomet_ws_ip: 0.0.0.0
cppcomet_ws_thread_num: 4
cppcomet_statistics: 10
cppcomet_ws_port: 8087
cppcomet_cometql_ip: 0.0.0.0
cppcomet_cometql_thread_num: 4
cppcomet_cometql_port: 3307
cppcomet_mysqlproxy_ip: 0.0.0.0
cppcomet_mysqlproxy_thread_num: 4
cppcomet_mysqlproxy_port: 3308
cppcomet_log_level: 200
cppcomet_password: root
cppcomet_fragment_buf_size: 600
cppcomet_git_branch: master
remote_user: root
tasks:
- name: Update
apt: update_cache=yes
- name: Installing deps
apt:
name: cmake,make,cpp,gcc,libssl-dev,g++,nginx,pkg-config,libmariadbclient-dev-compat,mysql-client,flex,mailutils,uuid-dev,git,wget
state: present
- name: Clean CppComet dir
file:
state: absent
path: "/usr/src/cppcomet"
- name: Git clone CppComet
git:
repo: https://github.com/CppComet/comet-server
dest: /usr/src/cppcomet
version: alfa
- name: cmake
shell: cmake .
args:
chdir: /usr/src/cppcomet/
- name: make
shell: make
args:
chdir: /usr/src/cppcomet/
- name: make install
shell: make install
args:
chdir: /usr/src/cppcomet/
- name: set comet.ini
template:
src: cppcomet/comet.ini.j2
dest: /etc/comet-server/comet.ini
- name: add as service
shell: cp ./comet.service /etc/systemd/system
args:
chdir: /usr/src/cppcomet/
- name: systemctl daemon-reload
shell: systemctl daemon-reload
- name: systemctl enable comet.service
shell: systemctl enable comet.service
- name: Start CppComet
service:
service: name=comet.service state=start