Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 7 additions & 23 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
Zoe Analytics - Container-based Analytics as a Service
Atos customized version of the Zoe Analytics platform (Container-based Analytics as a Service)
======================================================

Zoe Analytics provides a simple way to provision any kind of data analytics applications.

This repository is used for day-to-day, open source development, feel free to fork and contribute.

Resources:

- Website: http://zoe-analytics.eu
- Documentation: http://docs.zoe-analytics.eu
- Roadmap: https://github.com/DistributedSystemsGroup/zoe/wiki/RoadMap
- Mailing list: http://www.freelists.org/list/zoe
- Issue tracker: https://github.com/DistributedSystemsGroup/zoe/issues
- Main repo: https://gitlab.eurecom.fr/zoe/main (GitHub is a read-only mirror)

Zoe applications (ZApps):

- Check the repositories at: https://gitlab.eurecom.fr/zoe-apps/
Zoe Analytics provides a simple way to provision any kind of data analytics applications. The Atos customized version is
able to run on a Google Kubernetes Engine (GKE) backend with Ingress / Reverse proxy features and supports the Atos Codex analytics components as ZApps.

Zoe is licensed under the terms of the Apache 2.0 license.

Research papers
---------------

If you are interested in learning more about Zoe and the underling scheduling theory, we published a paper with an experimental evaluation that show the advantages of our techniques.
References
------------------------------------------------------

The paper can be found on open access `at ArXiv <https://arxiv.org/abs/1611.09528>`_.
This customized version is a fork and is based on the Zoe Analytics platform (zoe-analytics.eu)

If you use Zoe Analytics for running your experiments, please do not forget to cite us::
Feel free to read the paper of the original developers: `at ArXiv <https://arxiv.org/abs/1611.09528>`_.

@inproceedings{Pace:2017:FSD:3101112.3101126,
author = {Pace, Francesco and Venzano, Daniele and Carra, Damiano and Michiardi, Pietro},
Expand All @@ -45,4 +30,3 @@ If you use Zoe Analytics for running your experiments, please do not forget to c
publisher = {IEEE Press},
address = {Piscataway, NJ, USA},
}

3 changes: 3 additions & 0 deletions schemas/app_description_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
"monitor": {
"type": "boolean"
},
"loadBalancer": {
"type": "boolean"
},
"startup_order": {
"type": "number",
"multipleOf": 1.0
Expand Down
49 changes: 49 additions & 0 deletions zoe.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
deployment-name = prod1
dbname = zoe
dbuser = zoeuser
#postgres
dbpass = zoeuser
dbhost = 127.0.0.1
dbport = 5432
api-listen-uri = tcp://0.0.0.0:4850
#kairosdb-url = http://localhost:8090
#influxdb-url = http://localhost:8086
workspace-base-path = /mnt/stateful_partition/zoe-workspaces
workspace-deployment-path = default
overlay-network-name = zoe
gelf-address =
gelf-listener = 7896
service-logs-base-path = /var/lib/zoe/service-logs
#log-url = https://cloud-platform.eurecom.fr/zoe-logs/
listen-address = 0.0.0.0
listen-port = 80
master-url = tcp://127.0.0.1:4850
cookie-secret = changeme
auth-file = zoepass.csv
ldap-server-uri = ldap://localhost
ldap-bind-user = ou=something,dc=any,dc=local
ldap-bind-password = mysecretpassword
ldap-base-dn = ou=something,dc=any,dc=local
oauth-redirect-uri = https://my.zoe.com/api/v7/user/oauth
oauth-role = user
oauth-quota = default
oauth-create-workspace-script = /usr/local/bin/zoe_create_workspace.sh
fs-group-id = 5001
proxy-path = 127.0.0.1
#reverse-proxy-path =
#websocket_base = ws://{{ server_address }}
#traefik-base-url = /zoe/proxy/
scheduler-class = ZoeElasticScheduler
scheduler-policy = FIFO
placement-policy = average
backend = Kubernetes
backend-docker-config-file = docker.conf
kube-config-file = /root/.kube/config
kube-namespace = default
kube-ingress-controller = yes
kube-ingress-url-suffix = .platform.atosdigital.nl
zapp-shop-path = /var/lib/zoe-apps
log-file = stderr
max-core-limit = 16
max-memory-limit = 64
#additional-volumes = temp
4 changes: 4 additions & 0 deletions zoe_api/api_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,10 @@ def execution_endpoints(self, user: zoe_lib.state.User, execution: zoe_lib.state
endpoint_ext = '{}/{}'.format(zoe_lib.config.get_conf().traefik_base_url, port.proxy_key())
endpoint = port.url_template.format(**{"ip_port": port.external_ip + ":" + str(port.external_port), "proxy_path": endpoint_ext})
endpoints.append((port.readable_name, endpoint, endpoint_ext))
if get_conf().kube_ingress_controller.upper() == 'YES' and port.enable_proxy:
endpoint = port.url_template.format(**{"ip_port": str(service.name) + "-" + str(execution.id) + "-" + get_conf().deployment_name + get_conf().kube_ingress_url_suffix, "proxy_path": ""})
endpoint_ext = port.url_template.format(**{"ip_port": str(service.name) + "-" + str(execution.id) + "-" + get_conf().deployment_name + get_conf().kube_ingress_url_suffix, "proxy_path": ""})
endpoints.append((port.readable_name, endpoint, endpoint_ext))

return services_info, endpoints

Expand Down
4 changes: 4 additions & 0 deletions zoe_lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ def load_configuration(test_conf=None):
argparser.add_argument('--kube-config-file', help='Kubernetes configuration file', default='/opt/zoe/kube.conf')
argparser.add_argument('--kube-namespace', help='The namespace that Zoe operates on', default='default')

# Kubernetes Ingress Controller (NGINX)
argparser.add_argument('--kube-ingress-controller', help='Kubernetes Ingress controller is used. Impacts the endpoint handling in Zoe', default='no')
argparser.add_argument('--kube-ingress-url-suffix', help='URL suffix, for subdomain based ingress reverse proxy routing. Impacts endpoint URL creation', default='platform.atosdigital.nl')

# other options
argparser.add_argument('--zapp-shop-path', help='Path where ZApp folders are stored', default='/var/lib/zoe-apps')
argparser.add_argument('--log-file', help='output logs to a file', default='stderr')
Expand Down
5 changes: 5 additions & 0 deletions zoe_lib/state/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,11 @@ def __init__(self, d, sql_manager):
except KeyError:
self.work_dir = None

try:
self.load_balancer = self.description['loadBalancer']
except KeyError:
self.load_balancer = None

try:
self.labels = self.description['labels']
except KeyError:
Expand Down
16 changes: 14 additions & 2 deletions zoe_master/backends/kubernetes/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import socket
from typing import Dict, Any, List

import re

import humanfriendly
import pykube

Expand All @@ -33,7 +35,7 @@
ZOE_LABELS = {
"app": "zoe",
"version": ZOE_VERSION,
"auto-ingress/enabled": "enabled"
"auto-ingress/enabled": "enabled",
}


Expand All @@ -48,6 +50,7 @@ def __init__(self):
'namespace': get_conf().kube_namespace
},
'spec': {
'type': 'NodePort',
'selector': {},
'ports': []
},
Expand All @@ -62,6 +65,10 @@ def set_labels(self, lbs: dict):
for key in lbs:
self.conf['metadata']['labels'][key] = lbs[key]

def set_type(self,type):
"""Setter to override the service type"""
self.conf['spec']['type'] = type

def set_ports(self, ports):
"""Setter to set ports"""
self.conf['spec']['ports'] = [{} for _ in range(len(ports))]
Expand Down Expand Up @@ -334,6 +341,11 @@ def spawn_service(self, service_instance: ServiceInstance):
if len(service_instance.ports) > 0:
config.set_ports(service_instance.ports)

"""Handling for having a GCP LoadBalancer based exposure instead of the default nodeport/ingress"""
if service_instance.load_balancer == True:
config.set_labels({'auto-ingress/enabled': 'disabled'})
config.set_type('LoadBalancer')

config.set_selectors(ZOE_LABELS)
config.set_selectors({'service_name': service_instance.name})

Expand Down Expand Up @@ -411,7 +423,7 @@ def info(self) -> ClusterStats: # pylint: disable=too-many-locals
# Get basic information from nodes
for node in node_list:
nss = NodeStats(node.name)
nss.cores_total = float(node.obj['status']['allocatable']['cpu'])
nss.cores_total = float(node.obj['status']['allocatable']['cpu'][1]) ## Bug found on GKE
nss.memory_total = humanfriendly.parse_size(node.obj['status']['allocatable']['memory'])
nss.labels = node.obj['metadata']['labels']
nss.status = 'online'
Expand Down
2 changes: 2 additions & 0 deletions zoe_master/backends/service_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ def __init__(self, execution: Execution, service: Service, env_subst_dict):

self.image_name = service.image_name

self.load_balancer = service.load_balancer

self.ports = []
for port in service.ports:
self.ports.append(BackendPort(port.internal_number, port.protocol))
Expand Down