-
Notifications
You must be signed in to change notification settings - Fork 1
/
make_sync_gateway-1.5.yml
103 lines (84 loc) · 2.99 KB
/
make_sync_gateway-1.5.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
---
- hosts: sync-gateway
tasks:
- name: Update apt-get
apt: update_cache=true
sudo: yes
- name: Adding user {{ user }}
user: name=sync_gateway
groups=sudo
append=yes
sudo: yes
- name: Creates Download directory /home/sync_gateway/downloads
file:
path: /home/sync_gateway/downloads
state: directory
owner: sync_gateway
group: sync_gateway
mode: 0775
recurse: yes
sudo: yes
- name: Increase File Descriptor max to 500,000
lineinfile:
path: /etc/sysctl.conf
line: 'fs.file-max = 500000'
sudo: yes
- name: tcp keep alive to 5 minutes
lineinfile:
path: /etc/sysctl.conf
line: 'net.ipv4.tcp_keepalive_time = 600'
sudo: yes
- name: tcp keep alive intervals to 10
lineinfile:
path: /etc/sysctl.conf
line: 'net.ipv4.tcp_keepalive_intvl = 10'
sudo: yes
- name: tcp keep alive probes to 9
lineinfile:
path: /etc/sysctl.conf
line: 'net.ipv4.tcp_keepalive_probes = 9'
sudo: yes
- name: presist /etc/sysctl.conf
raw: (sysctl -p)
sudo: yes
- name: Increase File Descriptors (soft) to 500000
lineinfile:
path: /etc/security/limits.conf
line: '* soft nofile 250000'
sudo: yes
- name: Increase File Descriptors (hard) to 500000
lineinfile:
path: /etc/security/limits.conf
line: '* hard nofile 250000'
sudo: yes
- name: Download SG 1.5.0 BETA 2 for Ubuntu in downloads dir
#raw: (wget https://packages.couchbase.com/releases/couchbase-sync-gateway/1.3.1/couchbase-sync-gateway-enterprise_1.3.1-16_x86_64.deb -P /home/sync_gateway/downloads)
raw: (wget https://packages.couchbase.com/releases/couchbase-sync-gateway/1.5.0/couchbase-sync-gateway-enterprise_1.5.0-494_x86_64.deb -P /home/sync_gateway/downloads)
sudo: yes
# - name: download Couchbase package
# get_url: url=https://packages.couchbase.com/releases/4.6.2/couchbase-server-enterprise_4.6.2-ubuntu14.04_amd64.deb dest=~/downloads
- name: Installing SG 1.5.0 BETA 2 binary
#raw: (dpkg -i /home/sync_gateway/downloads/couchbase-sync-gateway-enterprise_1.3.1-16_x86_64.deb)
raw: (dpkg -i /home/sync_gateway/downloads/couchbase-sync-gateway-enterprise_1.5.0-494_x86_64.deb)
register: out
sudo: yes
- debug: var=out.stdout_lines
- name: make backup of default sync gateway config
raw: (cp /home/sync_gateway/sync_gateway.json /home/sync_gateway/bk_sync_gateway.json)
sudo: yes
- name: update sg config file with local bare
copy: src=/Users/fujio.turner/Documents/ansible/bare-bones-config-xattr.json dest=/home/sync_gateway/sync_gateway.json mode=0755
sudo: yes
#- name: start sync gateway
- name: restart sync gateway with new bare bones
service:
name: sync_gateway
state: restarted
sudo: yes
# - pause:
# seconds: 10
- name: check sync gateway config
raw: (curl http://127.0.0.0.1:4985/_config)
register: out
sudo: yes
- debug: var=out.stdout_lines