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

Commit

Permalink
Adding Rancher notes
Browse files Browse the repository at this point in the history
  • Loading branch information
emcniece committed Mar 19, 2017
1 parent faae59f commit ba1cdd5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,19 @@ The Docker-Compose.yml file contains `links: [fs-server:fs-server]` which enable

### Rancher Environment

- todo
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.

By labelling the primary host with `filesync=server`, these labels can be used to add a Filesync server and multiple clients:

```yml
# Server
labels:
io.rancher.scheduler.affinity:host_label: filesync=server

# Client
labels:
io.rancher.scheduler.global: 'true'
io.rancher.scheduler.affinity:host_label_ne: filesync=server
```
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.
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ services:
tty: true
stdin_open: true
labels:
io.rancher.container.create_agent: 'true'
io.rancher.container.agent.role: 'environment'
io.rancher.scheduler.affinity:host_label: rgon=primary
environment:
FILESYNC_MODE: 'server'
Expand All @@ -22,8 +20,6 @@ services:
- fs-server:fs-server
labels:
io.rancher.scheduler.global: 'true'
io.rancher.container.create_agent: 'true'
io.rancher.container.agent.role: 'environment'
io.rancher.scheduler.affinity:host_label_ne: rgon=primary
environment:
FILESYNC_MODE: 'client'
Expand All @@ -39,8 +35,6 @@ services:
- fs-server:fs-server
labels:
io.rancher.scheduler.global: 'true'
io.rancher.container.create_agent: 'true'
io.rancher.container.agent.role: 'environment'
io.rancher.scheduler.affinity:host_label_ne: rgon=primary
environment:
FILESYNC_MODE: 'client'
Expand Down

0 comments on commit ba1cdd5

Please sign in to comment.