forked from UoW-CPC/COLARepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrel_import_test.yaml
117 lines (107 loc) · 3.39 KB
/
rel_import_test.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
107
108
109
110
111
112
113
114
115
116
117
tosca_definitions_version: tosca_simple_yaml_1_0
imports:
- ../nodes/custom_types.yaml
repositories:
docker_hub: https://hub.docker.com/
topology_template:
inputs:
stress_img:
type: string
description: Docker image for stress
default: lorel/docker-stress-ng
mount_point:
type: string
description: Mount point for attached volume
default: /tmp
exposed_ports:
type: list
description: Ports to expose
default: ["6379:6379"]
node_templates:
jobber:
type: tosca.nodes.MiCADO.Container.Application.Docker
properties:
# You may treat this section as you would a key under "services" in D-Compose
entrypoint: sh -c "stress-ng --cpu 0 --cpu-method pi -l 10 -t 30 && (echo done >> /tmp/runs)"
artifacts:
image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: { get_input: stress_img }
repository: docker_hub
requirements:
- volume:
node: busydata
relationship:
type: tosca.relationships.ConnectsTo
properties:
target: /tmp
- host:
node: MICADO-worker
relationship: tosca.relationships.HostedOn
stress:
type: tosca.nodes.MiCADO.Container.Application.Docker
properties:
entrypoint: sh -c "stress-ng --cpu 0 --cpu-method pi -l 75"
deploy:
resources:
reservations:
cpus: '1.0'
artifacts:
image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: lorel/docker-stress-ng
repository: docker_hub
db:
type: tosca.nodes.MiCADO.Container.Application.Docker
properties:
ports: { get_input: exposed_ports }
artifacts:
image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: redis
repository: docker_hub
updater:
type: tosca.nodes.MiCADO.Container.Application.Docker
properties:
command: sh -c "while true; do echo set runs $$(wc -l /tmp/runs | cut -d' ' -f1) | nc test_db 6379; sleep 30; done"
artifacts:
image:
type: tosca.artifacts.Deployment.Image.Container.Docker
file: busybox
repository: docker_hub
requirements:
- service:
node: db
relationship:
type: tosca.relationships.ConnectsTo
properties:
target: stressnet
- volume:
node: busydata
relationship:
type: tosca.relationships.AttachesTo
properties:
target: /tmp
- host:
node: db
relationship: tosca.relationships.HostedOn
MICADO-worker:
type: tosca.nodes.MiCADO.Occopus.CloudSigma.Compute
properties:
cloud:
interface_cloud: cloudsigma
endpoint_cloud: https://zrh.cloudsigma.com/api/2.0
capabilities:
host:
properties:
num_cpus: 2
disk_size: 10 GB
mem_size: 2 GB
libdrive_id: "some_unused_id_goes_here"
stressynet:
type: tosca.nodes.MiCADO.network.Network.Docker
properties:
# Treat this section as you would a key under "networks" in D-Compose
driver: "overlay"
busydata:
type: tosca.nodes.MiCADO.Volume.Docker