-
Notifications
You must be signed in to change notification settings - Fork 6
/
model-v1.yaml
107 lines (99 loc) · 2.45 KB
/
model-v1.yaml
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
103
104
105
106
doctype: "com.datagridsys.doctype/skopos/model"
version: 1
lifecycle:
pre_flight:
steps:
- call:
plugin: docker
action: network_create
label: "Ensure project network exists"
components:
nginx:
image : datagridsys/sample-lb:1.0
replicas : 1
singleton: true
uses:
vote : {}
visual:
x: 300
y: 80
vote:
image: datagridsys/sample-vote:1.0
replicas: 3
lifecycle:
post_instance_attach:
steps:
- call:
plugin : docker
action : comp_signal
arguments: { target: "nginx", signal: "HUP" }
post_instance_detach:
steps:
- call:
plugin : docker
action : comp_signal
arguments: { target: "nginx", signal: "HUP" }
provides:
ports: [ "80" ]
uses:
redis: {}
visual:
x: 600
y: 80
redis:
image: redis:3.2.2
replicas: 1 # uses the stateless template
visual:
x: 900
y: 180
lifecycle:
steps:
- call:
plugin: docker
action: comp_signal
label: "Re-attach workers to redis"
arguments: { target: "worker", signal: "INT" }
worker:
image: datagridsys/sample-worker:1.0
replicas: 2
uses:
db: {}
redis: {}
visual:
x: 600
y: 280
db:
image: postgres:9.4
singleton: true
visual:
x: 900
y: 380
result:
image: datagridsys/sample-result:1.0
singleton: true
provides:
ports: [ "80" ]
uses:
db: {}
visual:
x: 600
y: 480
gateways:
vote-in:
type: host_port
target: ["nginx"]
exposes:
- port: "8880"
target_port: "80"
visual:
x: 20
y: 80
result-in:
type: host_port
exposes:
- port: "8881"
target_port: "80"
target: [result]
visual:
x: 20
y: 480