Skip to content

Commit 7f9e050

Browse files
committed
Add cluster fd control and fix deployed version file
1 parent aa3eeb2 commit 7f9e050

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

group_vars/ipfs-cluster.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ dist_url: https://dist.ipfs.io
22
ipfs_cluster_secret: "use `od -vN 32 -An -tx1 /dev/urandom | tr -d ' \n' ; echo` to generate this"
33
ipfs_cluster_arch: amd64
44
ipfs_cluster_version: v0.10.0
5+
ipfs_cluster_fd_max: 10000

roles/ipfs-cluster/tasks/main.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@
7575

7676
- name: make .ipfs-cluster directory
7777
become: yes
78-
become_user: ipfs
7978
file:
8079
state: directory
8180
mode: 0700
@@ -85,7 +84,6 @@
8584

8685
- name: copy configuration
8786
become: yes
88-
become_user: ipfs
8987
template:
9088
src: "{{ item }}"
9189
dest: "{{ ipfs_home }}/.ipfs-cluster/{{ item }}"
@@ -101,18 +99,16 @@
10199

102100
- name: set version file (to notify restart on upgrades)
103101
become: yes
104-
become_user: ipfs
105102
copy:
106103
content: "{{ ipfs_cluster_version }}"
107-
dest: "{{ ipfs_home }}/deployed_version"
104+
dest: "{{ ipfs_home }}/cluster_deployed_version"
108105
mode: 0644
109106
owner: ipfs
110107
group: ipfs
111108
notify: restart IPFS Cluster
112109

113110
- name: copy peerstore
114111
become: yes
115-
become_user: ipfs
116112
template:
117113
src: peerstore
118114
dest: "{{ ipfs_home }}/.ipfs-cluster/peerstore"

roles/ipfs-cluster/templates/etc/systemd/system/ipfs-cluster.service

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ Description=IPFS Cluster Service
33
After=network.target
44

55
[Service]
6+
LimitNOFILE={{ ipfs_cluster_fd_max }}
7+
Environment="IPFS_CLUSTER_FD_MAX={{ ipfs_cluster_fd_max}}"
68
ExecStart=/usr/local/bin/ipfs-cluster-service daemon
79
Restart=on-failure
810
User=ipfs

roles/ipfs/tasks/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
become: yes
111111
copy:
112112
content: "{{ ipfs_version }}"
113-
dest: "{{ ipfs_home }}/deployed_version"
113+
dest: "{{ ipfs_home }}/ipfs_deployed_version"
114114
mode: 0644
115115
owner: ipfs
116116
group: ipfs

0 commit comments

Comments
 (0)