Commit 61a11f50 authored by Daniele Venzano's avatar Daniele Venzano

Remove the "networks" ZApp field

parent 9b27ef8b
......@@ -21,7 +21,6 @@
"essential_count": 1,
"monitor": false,
"name": "spark-master",
"networks": [],
"ports": [
{
"expose": true,
......@@ -69,7 +68,6 @@
"essential_count": 1,
"monitor": false,
"name": "spark-worker",
"networks": [],
"ports": [
{
"is_main_endpoint": false,
......@@ -120,7 +118,6 @@
"essential_count": 1,
"monitor": true,
"name": "spark-jupyter",
"networks": [],
"ports": [
{
"is_main_endpoint": false,
......
......@@ -139,7 +139,7 @@ The function `gen_app()` takes as arguments the options defined in the previous
Each framework package defines functions that fill in a template. These functions are actually quite simple, but they hide the structure of the Zoe application description format to simplify the creation of ZApps. They are also hiding the complexities of running Spark in Docker containers: network details and configuration options are already defined and setup correctly.
As can be seen in some of the sample applications (have a look at the `eurecom_aml_lab` one, for example) the service descriptions returned by the template functions can be further customized to add environment variables, docker networks, volumes, etc.
As can be seen in some of the sample applications (have a look at the `eurecom_aml_lab` one, for example) the service descriptions returned by the template functions can be further customized to add environment variables, volumes, etc.
Step 5 - putting it all together
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
......
......@@ -84,13 +84,6 @@ A number of special values can be used, these will be substituted by Zoe when th
* ``{dns_name#self}`` : the DNS name for this service itself
* ``{dns_name#<service_name_with_counter>}`` : the DNS name of another service defined in the same ZApp. For example, ``{dns_name#jupyter0}`` will be substituted with the DNS name of the first instance of the Jupyter service,
networks
^^^^^^^^
optional, array
A list of additional Docker network IDs to connect to this service. By default only the network configured in Zoe configuration file will be connected.
volumes
^^^^^^^
......@@ -218,7 +211,6 @@ Example
"environment": [
["NB_USER", "{user_name}"]
],
"networks": [],
"docker_image": "docker-registry:5000/apps/jupyter-notebook",
"monitor": true,
"total_count": 1,
......
......@@ -8,7 +8,6 @@
"essential_count": 1,
"monitor": true,
"name": "nginx",
"networks": [],
"ports": [
{
"expose": false,
......
......@@ -7,7 +7,6 @@ export class ServiceDescription implements Serializable<ServiceDescription> {
environment: string[][];
requiredResources: Resource;
startupOrder: number;
//networks: string[];
ports: Port[];
totalCount: number;
monitor: boolean;
......
......@@ -18,7 +18,6 @@ export class Service implements Serializable<Service> {
environment: string[][];
essentialCount: number;
monitor: boolean;
//networks: string[];
ports: Port[];
requiredResources: Resource;
startupOrder: number;
......
......@@ -315,24 +315,6 @@ class SwarmClient:
if not res:
break
def connect_to_network(self, container_id: str, network_id: str) -> None:
"""Connect a container to a network."""
try:
net = self.cli.networks.get(network_id)
except docker.errors.NotFound:
log.error('Trying to connect to a non-existent network')
return
net.connect(container_id)
def disconnect_from_network(self, container_id: str, network_id: str) -> None:
"""Disconnects a container from a network."""
try:
net = self.cli.networks.get(network_id)
except docker.errors.NotFound:
log.error('Trying to connect to a non-existent network')
return
net.disconnect(container_id)
def list(self, only_label=None) -> Iterable[dict]:
"""
List running or defined containers.
......
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