-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathservice_template.yml
125 lines (111 loc) · 3.42 KB
/
service_template.yml
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
118
119
120
121
122
123
124
125
tosca_definitions_version: tosca_simple_yaml_1_2
description: A toy example to get started with RADON
imports:
- file: radon_artifact_types.yml
- file: radon_relationship_types.yml
- file: radon_node_types.yml
- file: radon_policy_types.yml
- file: radon_private_types.yml
topology_template:
inputs:
aws_access_key:
type: string
aws_secret_access_key:
type: string
aws_region:
type: string
node_templates:
uploads:
type: radon.nodes.ObjectStorage
properties:
name: Uploads
maxsize: 1 GB
requirements:
- host:
node: amazon_aws
relationship: uploads_host
- invocation:
node: index_photo
relationship: uploads_invocation
interfaces:
Standard:
inputs:
host_access_key: { get_property: [ HOST, access_key ] }
host_secret_access_key: { get_property: [ HOST, secret_access_key ] }
host_region: { get_property: [ HOST, region ] }
index_photo:
type: radon.nodes.Function
properties:
name: IndexPhoto
runtime: nodejs
handler: index.handler
role: ''
memory: 512 MB
timeout: 60 s
requirements:
- host:
node: amazon_aws
relationship: index_photo_host
interfaces:
Standard:
inputs:
host_access_key: { get_property: [ HOST, access_key ] }
host_secret_access_key: { get_property: [ HOST, secret_access_key ] }
host_region: { get_property: [ HOST, region ] }
deployment_package_uri: { get_artifact: [ SELF, deployment_package ] }
artifacts:
deployment_package:
type: radon.artifacts.Deployment.Function
file: IndexPhoto.zip
amazon_aws:
type: radon.nodes.AmazonAWS
properties:
access_key: { get_input: aws_access_key }
secret_access_key: { get_input: aws_secret_access_key }
region: { get_input: aws_region }
relationship_templates:
uploads_host:
type: radon.relationships.HostedOn
index_photo_host:
type: radon.relationships.HostedOn
uploads_invocation:
type: radon.relationships.Invokes
policies:
- uploads_average_response_time:
type: radon.policies.Performance.AverageResponseTime
properties:
upper_bound: 12 s
targets:
- uploads
- uploads_workload:
type: radon.private.DecompositionTool.OpenWorkload
properties:
interarrival_time_distribution:
mean: 10 s
coefficient_of_variation: 1.0
targets:
- uploads
- uploads_host_demand:
type: radon.private.DecompositionTool.HostDemand
properties:
service_time_distribution:
mean: 5 s
coefficient_of_variation: 1.0
targets:
- uploads
- index_photo_host_demand:
type: radon.private.DecompositionTool.HostDemand
properties:
service_time_distribution:
mean: 3 s
coefficient_of_variation: 1.0
targets:
- index_photo
- uploads_invocation_behavior:
type: radon.private.DecompositionTool.RequestBehavior
properties:
mean_number_of_requests: 0.5
generation_pattern: geometric
interaction_mode: synchronous
target_relationships:
- uploads_invocation