Commit bbaa5e8b authored by Daniele Venzano's avatar Daniele Venzano
Browse files

Make the image registry configurable

parent 97f2dfd0
......@@ -13,7 +13,8 @@ config_paths = [
defaults = {
'docker': {
'swarm_manager_url': 'tcp://swarm.example.com:2380'
'swarm_manager_url': 'tcp://swarm.example.com:2380',
'private_registry': '10.1.0.1:5000'
},
'intervals': {
'status_refresh': 10,
......@@ -123,5 +124,9 @@ class ZoeConfig(ConfigParser):
def cookies_secret_key(self):
return self.get('flask', 'secret_key')
@property
def docker_private_registry(self) -> str:
return self.get('docker', 'private_registry')
zoeconf = ZoeConfig()
zoeconf.read(config_paths)
......@@ -13,12 +13,11 @@ from common.exceptions import UserIDDoesNotExist, ApplicationStillRunning
import common.object_storage as storage
from common.configuration import zoeconf, rpycconf
REGISTRY = "10.1.0.1:5000"
MASTER_IMAGE = REGISTRY + "/zoe/spark-master-1.4.1:1.3"
WORKER_IMAGE = REGISTRY + "/zoe/spark-worker-1.4.1:1.3"
SHELL_IMAGE = REGISTRY + "/zoe/spark-shell-1.4.1:1.3"
SUBMIT_IMAGE = REGISTRY + "/zoe/spark-submit-1.4.1:1.3"
NOTEBOOK_IMAGE = REGISTRY + "/zoe/spark-notebook-1.4.1:1.3"
REGISTRY = zoeconf.docker_private_registry
MASTER_IMAGE = REGISTRY + "/zoerepo/spark-master"
WORKER_IMAGE = REGISTRY + "/zoerepo/spark-worker"
SUBMIT_IMAGE = REGISTRY + "/zoerepo/spark-submit"
NOTEBOOK_IMAGE = REGISTRY + "/zoerepo/spark-notebook"
class ZoeClient:
......
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