Commit 3d49bb77 authored by Daniele Venzano's avatar Daniele Venzano

Reverting branch merge due to Jenking configuration error

parent 43439ddb
...@@ -33,7 +33,6 @@ ZApps will be distributed as self-contained set of files with this structure: ...@@ -33,7 +33,6 @@ ZApps will be distributed as self-contained set of files with this structure:
* app.json : ZApp description (the current one with a few changes) * app.json : ZApp description (the current one with a few changes)
* icon.png : an icon to be shown on graphical interfaces * icon.png : an icon to be shown on graphical interfaces
* metadata.json : metadata for the app and options that can be set to modify the app behaviour * metadata.json : metadata for the app and options that can be set to modify the app behaviour
* README.md : documentation on the ZApp and its parameters, in markdown format
* docker/ * docker/
* docker/image1/Dockerfile : the dockerfile needed to build the image for service 1 * docker/image1/Dockerfile : the dockerfile needed to build the image for service 1
* docker/image1/* : all the other files required to build the image for service 1 * docker/image1/* : all the other files required to build the image for service 1
......
...@@ -8,4 +8,3 @@ psycopg2>=2.6.1 ...@@ -8,4 +8,3 @@ psycopg2>=2.6.1
pyzmq>=15.2.0 pyzmq>=15.2.0
typing typing
python-consul python-consul
jsonschema>=2.5.1
...@@ -62,21 +62,17 @@ def load_configuration(test_conf=None): ...@@ -62,21 +62,17 @@ def load_configuration(test_conf=None):
argparser.add_argument('--influxdb-dbname', help='Name of the InfluxDB database to use for storing metrics', default='zoe') argparser.add_argument('--influxdb-dbname', help='Name of the InfluxDB database to use for storing metrics', default='zoe')
argparser.add_argument('--influxdb-url', help='URL of the InfluxDB service (ex. http://localhost:8086)', default='http://localhost:8086') argparser.add_argument('--influxdb-url', help='URL of the InfluxDB service (ex. http://localhost:8086)', default='http://localhost:8086')
argparser.add_argument('--influxdb-enable', action="store_true", help='Enable metric output toward influxDB') argparser.add_argument('--influxdb-enable', action="store_true", help='Enable metric output toward influxDB')
argparser.add_argument('--gelf-address', help='Enable Docker GELF log output to this destination (ex. udp://1.2.3.4:1234)', default='')
argparser.add_argument('--workspace-base-path', help='Path where user workspaces will be created by Zoe. Must be visible at this path on all Swarm hosts.', default='/mnt/zoe-workspaces') argparser.add_argument('--workspace-base-path', help='Path where user workspaces will be created by Zoe. Must be visible at this path on all Swarm hosts.', default='/mnt/zoe-workspaces')
argparser.add_argument('--workspace-deployment-path', help='Path appended to the workspace path to distinguish this deployment. If unspecified is equal to the deployment name.', default='--default--') argparser.add_argument('--workspace-deployment-path', help='Path appended to the workspace path to distinguish this deployment. If unspecified is equal to the deployment name.', default='--default--')
argparser.add_argument('--logs-base-path', help='Base path where containers will be able to save logs. Must be a shared directory, visible at this path on all Swarm hosts and writable by Zoe.', default='/mnt/zoe-logs') argparser.add_argument('--logs-base-path', help='Base path where containers will be able to save logs. Must be a shared directory, visible at this path on all Swarm hosts and writable by Zoe.', default='/mnt/zoe-logs')
argparser.add_argument('--overlay-network-name', help='Name of the Swarm overlay network Zoe should use', default='zoe')
# API options # API options
argparser.add_argument('--listen-address', type=str, help='Address to listen to for incoming connections', default="0.0.0.0") argparser.add_argument('--listen-address', type=str, help='Address to listen to for incoming connections', default="0.0.0.0")
argparser.add_argument('--listen-port', type=int, help='Port to listen to for incoming connections', default=5001) argparser.add_argument('--listen-port', type=int, help='Port to listen to for incoming connections', default=5001)
argparser.add_argument('--master-url', help='URL of the Zoe master process', default='tcp://127.0.0.1:4850') argparser.add_argument('--master-url', help='URL of the Zoe master process', default='tcp://127.0.0.1:4850')
argparser.add_argument('--cookie-secret', help='secret used to encrypt cookies', default='changeme')
# ZApp frontend options
argparser.add_argument('--zapp-storage', help='Path for storing available ZApps', default='/var/lib/zoe')
argparser.add_argument('--registry', help='Docker registry address with port number (ex. 127.0.0.1:5000), leave default to use the Docker Hub', default='')
argparser.add_argument('--registry-repository', help='Organization/Repository used to store ZApp Docker images', default='zapps')
# API auth options # API auth options
argparser.add_argument('--auth-type', help='Authentication type (text or ldap)', default='text') argparser.add_argument('--auth-type', help='Authentication type (text or ldap)', default='text')
...@@ -89,18 +85,16 @@ def load_configuration(test_conf=None): ...@@ -89,18 +85,16 @@ def load_configuration(test_conf=None):
argparser.add_argument('--ldap-user-gid', type=int, help='LDAP group ID for users', default=5001) argparser.add_argument('--ldap-user-gid', type=int, help='LDAP group ID for users', default=5001)
argparser.add_argument('--ldap-guest-gid', type=int, help='LDAP group ID for guests', default=5002) argparser.add_argument('--ldap-guest-gid', type=int, help='LDAP group ID for guests', default=5002)
# Scheduler options
argparser.add_argument('--scheduler-class', help='Scheduler class to use for scheduling ZApps', choices=['ZoeSimpleScheduler', 'ZoeElasticScheduler'], default='ZoeSimpleScheduler') argparser.add_argument('--scheduler-class', help='Scheduler class to use for scheduling ZApps', choices=['ZoeSimpleScheduler', 'ZoeElasticScheduler'], default='ZoeSimpleScheduler')
argparser.add_argument('--scheduler-policy', help='Scheduler policy to use for scheduling ZApps', choices=['FIFO', 'SIZE'], default='FIFO') argparser.add_argument('--scheduler-policy', help='Scheduler policy to use for scheduling ZApps', choices=['FIFO', 'SIZE'], default='FIFO')
# Backend options
argparser.add_argument('--backend', choices=['OldSwarm', 'OldSwarmNewAPI'], default='OldSwarmNewAPI') argparser.add_argument('--backend', choices=['OldSwarm', 'OldSwarmNewAPI'], default='OldSwarmNewAPI')
# Docker Swarm backend options # Docker Swarm backend options
argparser.add_argument('--backend-swarm-url', help='Swarm/Docker API endpoint (ex.: zk://zk1:2181,zk2:2181 or http://swarm:2380)', default='http://localhost:2375') argparser.add_argument('--backend-swarm-url', help='Swarm/Docker API endpoint (ex.: zk://zk1:2181,zk2:2181 or http://swarm:2380)', default='http://localhost:2375')
argparser.add_argument('--backend-swarm-zk-path', help='Swarm/Docker optional ZooKeeper path for Swarm Znodes', default='/docker') argparser.add_argument('--backend-swarm-zk-path', help='Swarm/Docker optional ZooKeeper path for Swarm Znodes', default='/docker')
argparser.add_argument('--overlay-network-name', help='Name of the Swarm overlay network Zoe should use', default='zoe')
argparser.add_argument('--gelf-address', help='Enable Docker GELF log output to this destination (ex. udp://1.2.3.4:1234)', default='') argparser.add_argument('--cookie-secret', help='secret used to encrypt cookies', default='changeme')
opts = argparser.parse_args() opts = argparser.parse_args()
if opts.debug: if opts.debug:
......
...@@ -24,8 +24,6 @@ from zoe_master.workspace.filesystem import ZoeFSWorkspace ...@@ -24,8 +24,6 @@ from zoe_master.workspace.filesystem import ZoeFSWorkspace
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
LOGS_MOUNT_POINT = '/logs'
def gen_environment(service: Service, execution: Execution): def gen_environment(service: Service, execution: Execution):
"""Return the list of environment variables that needs to be added to all containers.""" """Return the list of environment variables that needs to be added to all containers."""
...@@ -39,8 +37,7 @@ def gen_environment(service: Service, execution: Execution): ...@@ -39,8 +37,7 @@ def gen_environment(service: Service, execution: Execution):
('ZOE_OWNER', execution.user_id), ('ZOE_OWNER', execution.user_id),
('ZOE_DEPLOYMENT_NAME', get_conf().deployment_name), ('ZOE_DEPLOYMENT_NAME', get_conf().deployment_name),
('ZOE_MY_DNS_NAME', service.dns_name), ('ZOE_MY_DNS_NAME', service.dns_name),
('ZOE_WORKSPACE', fswk.get_mountpoint()), ('ZOE_WORKSPACE', fswk.get_mountpoint())
('ZOE_LOG_STORAGE', LOGS_MOUNT_POINT)
] ]
service_list = [] service_list = []
for tmp_service in execution.services: for tmp_service in execution.services:
...@@ -70,7 +67,8 @@ def gen_volumes(service: Service, execution: Execution): ...@@ -70,7 +67,8 @@ def gen_volumes(service: Service, execution: Execution):
logs_path = _create_logs_directories(execution.id, service.name) logs_path = _create_logs_directories(execution.id, service.name)
if logs_path is not None: if logs_path is not None:
logs_vol = VolumeDescription((logs_path, LOGS_MOUNT_POINT, True)) logs_mountpoint = '/logs'
logs_vol = VolumeDescription((logs_path, logs_mountpoint, True))
vol_list.append(logs_vol) vol_list.append(logs_vol)
return vol_list return vol_list
......
...@@ -38,6 +38,10 @@ class ServiceInstance: ...@@ -38,6 +38,10 @@ class ServiceInstance:
'zoe.deployment_name': get_conf().deployment_name, 'zoe.deployment_name': get_conf().deployment_name,
'zoe.type': 'app_service' 'zoe.type': 'app_service'
} }
if service.is_monitor:
self.labels['zoe_monitor'] = 'true'
else:
self.labels['zoe_monitor'] = 'false'
self.labels = zoe_master.backends.common.gen_labels(service, execution) self.labels = zoe_master.backends.common.gen_labels(service, execution)
self.environment = service.environment + zoe_master.backends.common.gen_environment(service, execution) self.environment = service.environment + zoe_master.backends.common.gen_environment(service, execution)
......
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