Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Commit ba1cdd5

Browse files
committed
Adding Rancher notes
1 parent faae59f commit ba1cdd5

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,19 @@ The Docker-Compose.yml file contains `links: [fs-server:fs-server]` which enable
9797

9898
### Rancher Environment
9999

100-
- todo
100+
Filesync can be used as a way to share files between hosts. Container deployment can be controlled by assigning labels and using the Rancher scheduling system.
101+
102+
By labelling the primary host with `filesync=server`, these labels can be used to add a Filesync server and multiple clients:
103+
104+
```yml
105+
# Server
106+
labels:
107+
io.rancher.scheduler.affinity:host_label: filesync=server
108+
109+
# Client
110+
labels:
111+
io.rancher.scheduler.global: 'true'
112+
io.rancher.scheduler.affinity:host_label_ne: filesync=server
113+
```
114+
115+
The host labelled with `filesync=server` will receive a Filesync server container, and all other hosts (`io.rancher.scheduler.global: 'true'`) not labelled with this (`host_label_ne: filesync=server`) will receive a client container.

docker-compose.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ services:
66
tty: true
77
stdin_open: true
88
labels:
9-
io.rancher.container.create_agent: 'true'
10-
io.rancher.container.agent.role: 'environment'
119
io.rancher.scheduler.affinity:host_label: rgon=primary
1210
environment:
1311
FILESYNC_MODE: 'server'
@@ -22,8 +20,6 @@ services:
2220
- fs-server:fs-server
2321
labels:
2422
io.rancher.scheduler.global: 'true'
25-
io.rancher.container.create_agent: 'true'
26-
io.rancher.container.agent.role: 'environment'
2723
io.rancher.scheduler.affinity:host_label_ne: rgon=primary
2824
environment:
2925
FILESYNC_MODE: 'client'
@@ -39,8 +35,6 @@ services:
3935
- fs-server:fs-server
4036
labels:
4137
io.rancher.scheduler.global: 'true'
42-
io.rancher.container.create_agent: 'true'
43-
io.rancher.container.agent.role: 'environment'
4438
io.rancher.scheduler.affinity:host_label_ne: rgon=primary
4539
environment:
4640
FILESYNC_MODE: 'client'

0 commit comments

Comments
 (0)