Commit d95f3736 authored by Daniele Venzano's avatar Daniele Venzano

Create a separate JSON file for the CLOUDS lab

parent e7f7de43
Pipeline #10879 passed with stages
in 59 seconds
......@@ -41,6 +41,7 @@ test:json:
artifacts:
paths:
- spark.json
- clouds.json
- manifest.json
- logo.png
- README.md
......
......@@ -175,7 +175,8 @@ def spark_jupyter_notebook_service(mem_limit, worker_mem_limit):
'name': "Jupyter Notebook interface",
'protocol': "tcp",
'port_number': 8888,
'url_template': "http://{ip_port}/",
"url_template": "http://{ip_port}{proxy_path}",
"proxy": True
}
],
'environment': [
......@@ -197,6 +198,7 @@ def spark_jupyter_notebook_service(mem_limit, worker_mem_limit):
if __name__ == '__main__':
## Standard ZApp
sp_master = spark_master_service(options['master_mem_limit']['value'])
sp_worker = spark_worker_service(options['worker_count']['value'], options['worker_mem_limit']['value'], options['worker_cores']['value'])
jupyter = spark_jupyter_notebook_service(options['notebook_mem_limit']['value'], options['worker_mem_limit']['value'])
......@@ -215,6 +217,30 @@ if __name__ == '__main__':
json.dump(app, open("spark.json", "w"), sort_keys=True, indent=4)
## CLOUDS ZAPP
sp_master = spark_master_service(options['master_mem_limit']['value'])
sp_worker = spark_worker_service(options['worker_count']['value'], options['worker_mem_limit']['value'], options['worker_cores']['value'])
jupyter = spark_jupyter_notebook_service(options['notebook_mem_limit']['value'], options['worker_mem_limit']['value'])
sp_worker['labels'] = ['labs']
sp_master['labels'] = ['labs']
jupyter['labels'] = ['labs']
app = {
'name': 'clouds',
'version': ZOE_APPLICATION_DESCRIPTION_VERSION,
'will_end': False,
'size': 512,
'services': [
sp_master,
sp_worker,
jupyter
]
}
json.dump(app, open("clouds.json", "w"), sort_keys=True, indent=4)
with open("images", "w") as fp:
fp.write(MASTER_IMAGE + '\n')
fp.write(WORKER_IMAGE + '\n')
......
......@@ -57,7 +57,7 @@
{
"category": "Labs",
"name": "CLOUDS",
"description": "spark.json",
"description": "clouds.json",
"readable_descr": "README-clouds.md",
"parameters": []
}
......
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