decking
decking copied to clipboard
Share a container among different clusters
I want to link the same container to different clusters (eg. to have a shared dbms among all the clusters). Is it possible? How can I do that?
This is my current configuration:
containers:
a:
image: a
dependencies:
- b
b:
image: b
dependencies:
- db
db:
image: db
clusters:
c1: ["a", "b"]
c2: ["a", "b"]
groups:
c1:
options:
env: ["CLUSTER_NAME=c1"]
containers:
c2:
options:
env: ["CLUSTER_NAME=c2"]
containers:
and I would like to have only one container for db linked both from b.c1 and b.c2. But if I try to create and run the clusters:
# decking build all
# decking create c1
# decking create c2
# decking start c1
# decking start c2
I get 6 containers running:
- a.c1, b.c1, db.c1,
- a.c2, b.c2, db.c2
I think this commit may do the job: https://github.com/guillaumelecerf/decking/commit/4ace57ed3937b995d577736707430533d3b13669