-
Notifications
You must be signed in to change notification settings - Fork 1
JSON structure of requests from Device Runtime
Aritz Brosa edited this page Feb 14, 2024
·
2 revisions
When running the Device Runtime library against a given COGNIT instance, the users application should print these warnings or similar ones:
[2024-02-13 17:47:03,078] [WARNING] [_prov_engine_client.py::45] Latency to Provisioning Engine is: 0.156159
[2024-02-13 17:47:03,287] [WARNING] [serverless_runtime_context.py::55] {'ip': '193.145.247.253', 'city': 'Arrasate / Mondragón', 'region': 'Basque Country', 'country': 'ES', 'loc': '43.0644,-2.4898', 'org': 'AS766 Entidad Publica Empresarial Red.es', 'postal': '20500', 'timezone': 'Europe/Madrid', 'readme': 'https://ipinfo.io/missingauth'}
[2024-02-13 17:47:03,289] [WARNING] [serverless_runtime_context.py::152] ¡ATTENTION! Your Requirements ENERGY_RENEWABLE=YES are NOT being sent to COGNIT Scheduler.
[2024-02-13 17:47:03,290] [WARNING] [serverless_runtime_context.py::153] ¡ATTENTION! This is a temporary measure until Schduler is working full steam.
[2024-02-13 17:47:03,291] [WARNING] [_prov_engine_client.py::63] {'SERVERLESS_RUNTIME': {'NAME': 'Example Serverless Runtime', 'FAAS': {'CPU': 1, 'MEMORY': 768, 'DISK_SIZE': 3072, 'FLAVOUR': 'Energy', 'ENDPOINT': ''}, 'SCHEDULING': {'POLICY': 'ENERGY'}, 'DEVICE_INFO': {'LATENCY_TO_PE': 0.156159, 'GEOGRAPHIC_LOCATION': "{'ip': '193.145.247.253', 'city': 'Arrasate / Mondragón', 'region': 'Basque Country', 'country': 'ES', 'loc': '43.0644,-2.4898', 'org': 'AS766 Entidad Publica Empresarial Red.es', 'postal': '20500', 'timezone': 'Europe/Madrid', 'readme': 'https://ipinfo.io/missingauth'}"}}}
The ¡ATTENTION! prefixed warning, are only temporary ones to warn the user that REQUIREMENTS are not being sent to COGNIT, until the Scheduling schema is fully working in the Testbed's COGNIT instance.
{
'SERVERLESS_RUNTIME': {
'NAME': 'Example Serverless Runtime',
'FAAS': {
'CPU': 1,
'MEMORY': 768,
'DISK_SIZE': 3072,
'FLAVOUR': 'Energy',
'ENDPOINT': ''
},
'SCHEDULING': {
'POLICY': 'ENERGY'
},
'DEVICE_INFO': {
'LATENCY_TO_PE': 0.156159,
'GEOGRAPHIC_LOCATION': "{'ip': '193.145.247.253', 'city': 'Arrasate / Mondragón', 'region': 'Basque Country', 'country': 'ES', 'loc': '43.0644,-2.4898', 'org': 'AS766 Entidad Publica Empresarial Red.es', 'postal': '20500', 'timezone': 'Europe/Madrid', 'readme': 'https://ipinfo.io/missingauth'}"
}
}
}
-
'FAAS' field:
Specs of the FAAS (function execution environment) component, being FLAVOUR the one used for the deployment of the VM within COGNIT. -
'SCHEDULING' field:
Defines the Scheduling of the request's SR. This is where the REQUIREMENTS (the deployment preferences specified by the user's app) will be specified (which are disabled temporarily). -
'DEVICE_INFO' field:
Additional device information is given to COGNIT. Being LATENCY_TO_PE, latency to Provisioning Engine in seconds, plus Geolocation information (only available in the Python version), based on the IP information.