|
1 | 1 | tosca_definitions_version: tosca_simple_yaml_1_3 |
2 | 2 |
|
3 | | - |
| 3 | +metadata: |
| 4 | + name: "TrafficApplication" |
| 5 | + targetNamespace: "example.eu.myrtus.servicetemplates" |
4 | 6 |
|
5 | 7 | topology_template: |
6 | | - inputs: |
7 | | - edge_high_cpu_threshold |
8 | | - type: float |
9 | | - default: '0.7' |
10 | | - fog_high_cpu_threshold |
11 | | - type: integer |
12 | | - default: '0.6' |
13 | | - high_traffic_threshold_15min |
14 | | - type: integer |
15 | | - default: '125' |
16 | | - low_traffic_threshold_15min |
17 | | - type: integer |
18 | | - default: '25' |
19 | | - groups: |
| 8 | + node_templates: |
| 9 | + groups: |
20 | 10 | compute_nodes: |
21 | 11 | node_templates: |
22 | | - cloud_instance_1: |
23 | | - type: .CloudInstance |
24 | | - properties: |
25 | | - memory: "128 GB DDR4" |
26 | | - storageCapacity: "4000 GB SSD" |
27 | | - processingCapabilities: "Intel Xeon Platinum 8358, 32 cores @ 2.60 GHz" |
28 | | - maxNetworkBandwidth: "10 Gbps" |
29 | | - highCpuThreshold: "0.7" |
30 | | - fog_node_1: |
31 | | - type: .FogNode |
32 | | - properties: |
33 | | - processingCapabilities: "Intel Xeon E-2224, 4 cores @ 3.40 GHz" |
34 | | - memory: "16 GB DDR4" |
35 | | - maxNetworkBandwidth: "1 Gbps" |
36 | | - storageCapacity: "500 GB SSD" |
37 | | - highCpuThreshold: "0.8" |
38 | | - basic_edge_camera_1: |
39 | | - type: .EdgeCamera |
40 | | - properties: |
41 | | - processingCapability: "ARM Cortex-A73, Quad-core 1.4 GHz" |
42 | | - memory: "2 GB LPDDR4" |
43 | | - maxNetworkBandwidth: "100 Mbps" |
44 | | - cameraSensorSpec: "1/2.8-inch CMOS, 12 MP, 4K@30fps" |
45 | | - location: "Intersection of Main St. and 1st Ave." |
46 | | - maxPowerConsumptionThreshold: "11.5W" |
47 | | - minPowerConsumptionThreshold: "3.5W" |
48 | | - baselineAveragePowerConsumption: "4.5W" |
49 | | - highCpuThreshold: "0.7" |
50 | | - basic_edge_camera_2: |
51 | | - type: .EdgeCamera |
| 12 | + EdgeComputeNode: |
| 13 | + type: example.eu.myrtus.nodetypes.myrtus.dpe.compute |
52 | 14 | properties: |
53 | | - processingCapability: "ARM Cortex-A73, Quad-core 1.4 GHz" |
54 | | - memory: "2 GB LPDDR4" |
55 | | - maxNetworkBandwidth: "100 Mbps" |
56 | | - cameraSensorSpec: "1/2.8-inch CMOS, 12 MP, 4K@30fps" |
57 | | - location: "Intersection of Main St. and 1st Ave." |
58 | | - baselineAveragePowerConsumption: "4.5W" |
59 | | - minPowerConsumptionThreshold: "3.5W" |
60 | | - maxPowerConsumptionThreshold: "11.5W" |
61 | | - highCpuThreshold: "0.7" |
62 | | - advanced_edge_camera_1: |
63 | | - type: .EdgeCamera |
| 15 | + cpu_cores: "4" |
| 16 | + memory_gb: "8" |
| 17 | + layer: "edge" |
| 18 | + num_instances: "50" |
| 19 | + FogComputeNode: |
| 20 | + type: example.eu.myrtus.nodetypes.myrtus.dpe.compute |
64 | 21 | properties: |
65 | | - processingCapability: "NVIDIA Jetson TX2" |
66 | | - memory: "4 GB LPDDR4" |
67 | | - maxNetworkBandwidth: "1 Gbps" |
68 | | - cameraSensorSpec: "1/1.8-inch CMOS, 20 MP, 4K@60fps" |
69 | | - location: "Intersection of Main St. and 1st Ave." |
70 | | - maxPowerConsumptionThreshold: "20W" |
71 | | - minPowerConsumptionThreshold: "5W" |
72 | | - baselineAveragePowerConsumption: "8W" |
73 | | - highCpuThreshold: "0.8" |
74 | | - advanced_edge_camera_2: |
75 | | - type: .EdgeCamera |
| 22 | + cpu_cores: "16" |
| 23 | + memory_gb: "32" |
| 24 | + layer: "fog" |
| 25 | + num_instances: "10" |
| 26 | + CloudComputeNode: |
| 27 | + type: example.eu.myrtus.nodetypes.myrtus.dpe.compute |
76 | 28 | properties: |
77 | | - processingCapability: "NVIDIA Jetson TX2" |
78 | | - minPowerConsumptionThreshold: "5W" |
79 | | - maxNetworkBandwidth: "1 Gbps" |
80 | | - location: "Intersection of Main St. and 1st Ave." |
81 | | - memory: "4 GB LPDDR4" |
82 | | - cameraSensorSpec: "1/1.8-inch CMOS, 20 MP, 4K@60fps" |
83 | | - maxPowerConsumptionThreshold: "20W" |
84 | | - baselineAveragePowerConsumption: "8W" |
85 | | - highCpuThreshold: "0.8" |
| 29 | + cpu_cores: "64" |
| 30 | + memory_gb: "32" |
| 31 | + layer: "cloud" |
| 32 | + num_instances: "1" |
86 | 33 | software_component_nodes: |
87 | 34 | node_templates: |
88 | | - object_detection_1: |
89 | | - type: .object_detection |
| 35 | + MultisensorMerger: |
| 36 | + type: example.eu.myrtus.nodetypes.myrtus.DPE.nodes.LakesidePod |
| 37 | + metadata: |
| 38 | + dataSensitivity: "Medium" |
| 39 | + dataIntegrity: "High" |
90 | 40 | properties: |
91 | | - dockerImage: "dockerHub/objectDetection" |
| 41 | + dockerImage: "ci.hesi.energy:5000/myrtus/multi_sensor_merger" |
| 42 | + port: "5557" |
| 43 | + required_cpu_cores: "4" |
| 44 | + required_memory_gb: "8" |
| 45 | + creation_probability: "0.4" |
| 46 | + min_exec_steps: "60" |
| 47 | + max_exec_steps: "120" |
| 48 | + layer_restriction: "none" |
92 | 49 | requirements: |
93 | | - - host: |
94 | | - node: basic_edge_camera_1 |
| 50 | + - connects: |
| 51 | + node: '' |
95 | 52 | relationship: |
96 | | - capability: |
97 | | - properties: |
98 | | - processingRequirement: "0.4" |
99 | | - memoryRequirement: "250MB" |
100 | | - object_tracking_1: |
101 | | - type: .object_tracking |
102 | | - properties: |
103 | | - dockerImage: "dockerHub/objectTracking" |
104 | | - requirements: |
| 53 | + capability: service |
105 | 54 | - host: |
106 | | - node: basic_edge_camera_1 |
| 55 | + node: '' |
107 | 56 | relationship: |
108 | | - capability: |
109 | | - properties: |
110 | | - processingRequirement: "0.5" |
111 | | - memoryRequirement: "300MB" |
112 | | - image_processing_1: |
113 | | - type: .image_processing |
| 57 | + capability: host |
| 58 | + MapMatcher: |
| 59 | + type: example.eu.myrtus.nodetypes.myrtus.DPE.nodes.LakesidePod |
| 60 | + metadata: |
| 61 | + dataSensitivity: "Medium" |
| 62 | + dataIntegrity: "High" |
114 | 63 | properties: |
115 | | - dockerImage: "dockerHub/imageProcessing" |
| 64 | + dockerImage: "ci.hesi.energy:5000/myrtus/map-matcher" |
| 65 | + port: "5557" |
| 66 | + required_cpu_cores: "2" |
| 67 | + required_memory_gb: "4" |
| 68 | + creation_probability: "0.3" |
| 69 | + min_exec_steps: "30" |
| 70 | + max_exec_steps: "90" |
| 71 | + layer_restriction: "none" |
116 | 72 | requirements: |
117 | 73 | - host: |
118 | | - node: fog_node_1 |
| 74 | + node: '' |
119 | 75 | relationship: |
120 | | - capability: |
121 | | - properties: |
122 | | - processingRequirement: "0.4" |
123 | | - memoryRequirement: "250MB" |
124 | | - traffic_data_analysis_1: |
125 | | - type: .traffic_data_analysis |
| 76 | + capability: host |
| 77 | + RedLightDetection: |
| 78 | + type: example.eu.myrtus.nodetypes.myrtus.DPE.nodes.LakesidePod |
| 79 | + metadata: |
| 80 | + dataSensitivity: "Medium" |
| 81 | + dataIntegrity: "High" |
126 | 82 | properties: |
127 | | - dockerImage: "dockerHub/trafficDataAnalysis" |
| 83 | + dockerImage: "ci.hesi.energy:5000/myrtus/sensor_tracker" |
| 84 | + port: "5557" |
| 85 | + required_memory_gb: "4" |
| 86 | + required_cpu_cores: "2" |
| 87 | + creation_probability: "0.3" |
| 88 | + min_exec_steps: "10" |
| 89 | + max_exec_steps: "60" |
| 90 | + layer_restriction: "edge" |
128 | 91 | requirements: |
129 | 92 | - host: |
130 | | - node: cloud_instance_1 |
| 93 | + node: '' |
131 | 94 | relationship: |
132 | | - capability: |
133 | | - properties: |
134 | | - memoryRequirement: "0.7" |
135 | | - processingRequirement: "700MB" |
136 | | - digital_signature_verification_1: |
137 | | - type: .security_countermeasure |
138 | | - encryption_decryption_1: |
139 | | - type: .security_countermeasure |
140 | | - key_exchange_mechanism_1: |
141 | | - type: .security_countermeasure |
142 | | - ai_malware_mechanism_1: |
143 | | - type: .security_countermeasure |
144 | | - side_channel_secure_library_1: |
145 | | - type: .security_countermeasure |
146 | | - relationship_templates: |
| 95 | + capability: host |
147 | 96 | policies: |
148 | | - high_cpu_utilization_on_camera: |
149 | | - type: tosca.policies.Placement |
150 | | - description: Edge devices SHOULD maintain computational resource (CPU, GPU) utilization below 70% to ensure adequate headroom for handling unexpected traffic spikes or system events. |
151 | | - targets: [basic_edge_camera_1,basic_edge_camera_2,advanced_edge_camera_1,advanced_edge_camera_2] |
152 | | - triggers: |
153 | | - high_cpu_utilization_on_camera_trigger: |
154 | | - description: Edge devices SHOULD maintain computational resource (CPU, GPU) utilization below 70% to ensure adequate headroom for handling unexpected traffic spikes or system events. |
155 | | - condition: 'for camera in targets: camera.cpu_utilization > edge_high_cpu_threshold' |
156 | | - action: 'migrate: object_detection_service target: fog_node_1' |
157 | | - high_cpu_utilization_on_fog: |
158 | | - type: tosca.policies.Placement |
159 | | - description: Fog nodes SHOULD maintain computational resource (CPU, GPU) utilization below 60% to accommodate dynamic workload fluctuations and support real-time traffic data processing. |
160 | | - targets: [fog_node_1] |
161 | | - triggers: |
162 | | - high_cpu_utilization_on_fog_trigger: |
163 | | - description: Edge devices SHOULD maintain computational resource (CPU, GPU) utilization below 60% to ensure adequate headroom for handling unexpected traffic spikes or system events. |
164 | | - condition: 'for fog_node in targets: fog_node.cpu_utilization > fog_high_cpu_threshold' |
165 | | - action: 'migrate: object_detection_service target: cloud_instance_1' |
166 | | - edge_low_power_mode: |
167 | | - type: tosca.policies.Placement |
168 | | - targets: [basic_edge_camera_1,basic_edge_camera_2,advanced_edge_camera_1,advanced_edge_camera_2] |
169 | | - triggers: |
170 | | - edge_low_power_mode_trigger: |
171 | | - condition: 'datetime.datetime.now().time() >= datetime.time(1, 0) and datetime.datetime.now().time() <= datetime.time(5, 0) and average_traffic_density_15min < low_traffic_threshold_15min' |
172 | | - action: 'frame_rate: 10 else frame_rate: 30' |
173 | | - high_traffic_scaling: |
174 | | - type: tosca.policies.Scaling |
175 | | - targets: [cloud_instance_1] |
176 | | - triggers: |
177 | | - high_traffic_scaling_trigger: |
178 | | - condition: 'average_traffic_density_15min > high_traffic_threshold_15min' |
179 | | - action: 'scale_up: 1 target: cloud_server_1' |
180 | | - low_traffic_scaling: |
181 | | - type: tosca.policies.Scaling |
182 | | - targets: [cloud_instance_1] |
183 | | - triggers: |
184 | | - low_traffic_scaling_trigger: |
185 | | - condition: 'average_traffic_density_15min < low_traffic_threshold_15min' |
186 | | - action: 'scale_down: 1 target: cloud_server_1' |
| 97 | + communication_cost_objective: |
| 98 | + type: tosca.policies.Performance |
| 99 | + description: Objective to minimize the total communication cost for all inter-component connections. |
| 100 | + properties: |
| 101 | + target_metric: "total_communication_cost" |
| 102 | + objective: "minimize" |
| 103 | + targets: [MultisensorMerger, MapMatcher, RedLightDetection] |
| 104 | + dependency_objective: |
| 105 | + type: tosca.policies.Performance |
| 106 | + description: Objective to minimize the dependency on more expensive parts of the architecture |
| 107 | + properties: |
| 108 | + target_metric: "dependency_score" |
| 109 | + objective: "minimize" |
| 110 | + edge_weight: "0.1" |
| 111 | + fog_weight: "0.5" |
| 112 | + cloud_weight: "1.0" |
| 113 | + targets: [MultisensorMerger, MapMatcher, RedLightDetection] |
0 commit comments