Commit 894f5045 authored by Daniele Venzano's avatar Daniele Venzano

Finalize new application description format

parent 2e0c3e43
......@@ -79,7 +79,7 @@ def app_validate(data):
def _service_check(data):
required_keys = ['name', 'docker_image', 'monitor', 'ports', 'required_resources', 'total_count', 'essential_count', 'start_order']
required_keys = ['name', 'docker_image', 'monitor', 'ports', 'required_resources', 'total_count', 'essential_count', 'startup_order']
for k in required_keys:
if k not in data:
raise InvalidApplicationDescription(msg="Missing required key: %s" % k)
......@@ -100,7 +100,7 @@ def _service_check(data):
raise InvalidApplicationDescription(msg="essential_count field should be an int")
try:
int(data['start_order'])
int(data['startup_order'])
except ValueError:
raise InvalidApplicationDescription(msg="start_order field should be an int")
......
......@@ -24,7 +24,10 @@
],
"required_resources": {
"memory": 4294967296
}
},
"total_count": 1,
"essential_count": 1,
"startup_order": 0
},
{
"docker_image": "192.168.45.252:5000/zoerepo/spark-jupyter-notebook",
......@@ -66,7 +69,10 @@
],
"required_resources": {
"memory": 4294967296
}
},
"total_count": 1,
"essential_count": 1,
"startup_order": 2
},
{
"docker_image": "192.168.45.252:5000/zoerepo/spark-worker",
......@@ -101,79 +107,12 @@
],
"required_resources": {
"memory": 8589934592
}
},
{
"docker_image": "192.168.45.252:5000/zoerepo/spark-worker",
"environment": [
[
"SPARK_WORKER_CORES",
"4"
],
[
"SPARK_WORKER_RAM",
"7516192768"
],
[
"SPARK_MASTER_IP",
"{name_prefix}-spark-master-{execution_id}.{name_prefix}-usernet-{user_id}"
],
[
"SPARK_LOCAL_IP",
"{name_prefix}-spark-worker-1-{execution_id}.{name_prefix}-usernet-{user_id}"
]
],
"monitor": false,
"name": "spark-worker-1",
"ports": [
{
"is_main_endpoint": false,
"name": "Spark worker web interface",
"path": "/",
"port_number": 8081,
"protocol": "http"
}
],
"required_resources": {
"memory": 8589934592
}
},
{
"docker_image": "192.168.45.252:5000/zoerepo/spark-worker",
"environment": [
[
"SPARK_WORKER_CORES",
"4"
],
[
"SPARK_WORKER_RAM",
"7516192768"
],
[
"SPARK_MASTER_IP",
"{name_prefix}-spark-master-{execution_id}.{name_prefix}-usernet-{user_id}"
],
[
"SPARK_LOCAL_IP",
"{name_prefix}-spark-worker-2-{execution_id}.{name_prefix}-usernet-{user_id}"
]
],
"monitor": false,
"name": "spark-worker-2",
"ports": [
{
"is_main_endpoint": false,
"name": "Spark worker web interface",
"path": "/",
"port_number": 8081,
"protocol": "http"
}
],
"required_resources": {
"memory": 8589934592
}
},
"total_count": 3,
"essential_count": 1,
"startup_order": 1
}
],
"version": 1,
"version": 2,
"will_end": false
}
ZOE_VERSION = '0.9.7-beta'
ZOE_API_VERSION = '0.6'
ZOE_APPLICATION_FORMAT_VERSION = '2'
ZOE_APPLICATION_FORMAT_VERSION = 2
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment