diff --git a/mesos-templates/mesos-dns/0/README.md b/mesos-templates/mesos-dns/0/README.md new file mode 100644 index 0000000..dd546dc --- /dev/null +++ b/mesos-templates/mesos-dns/0/README.md @@ -0,0 +1,46 @@ +# Mesos-dns (Experimental) + +### Info + +Add mesos-dns component to your mesos orchestrator, to be able that docker + +### Usage + +Mesos-dns will be listening at link_local_ip and will forward dns queries to rancherDNS. + +To deploy marathon tasks, you need to set network=HOST and set dns=link_local_ip + +Marathon json template example +``` +{ + "id": "NAME", + "cmd": null, + "cpus": 1, + "mem": 128, + "disk": 0, + "instances": 1, + "container": { + "type": "DOCKER", + "volumes": [], + "docker": { + "image": “DOCKER_IMAGE", + "network": "HOST", + "privileged": false, + "parameters": [ + { + "key": "dns", + "value": "169.254.169.251" + } + ], + "forcePullImage": false + } + }, + "portDefinitions": [ + { + "port": 10000, + "protocol": "tcp", + "labels": {} + } + ] +} +``` \ No newline at end of file diff --git a/mesos-templates/mesos-dns/0/docker-compose.yml b/mesos-templates/mesos-dns/0/docker-compose.yml new file mode 100644 index 0000000..b0adcf6 --- /dev/null +++ b/mesos-templates/mesos-dns/0/docker-compose.yml @@ -0,0 +1,34 @@ +version: '2' +services: + mesos-dns: + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.sidekicks: mesos-dns-route + tty: true + image: rawmind/alpine-mesos-dns:0.6.0-3 + cap_add: + - NET_ADMIN + external_links: + - mesos/zookeeper:zookeeper + - mesos/mesos-master:master + environment: + - MESOS_ZK=zk://zookeeper.mesos:2181/mesos + - MESOS_MASTER="master.mesos:5050" + - MESOS_DNS_DOMAIN=${mesos_domain} + - MESOS_DNS_RESOLVERS="169.254.169.250" + - LINK_LOCAL_IP=${mesos_localip} + mesos-dns-route: + labels: + io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name} + io.rancher.container.hostname_override: container_name + io.rancher.container.start_once: 'true' + tty: true + network_mode: host + image: rawmind/alpine-link-local:0.1-2 + cap_add: + - NET_ADMIN + environment: + - DESTINATION_IP=${mesos_localip} + - BRIDGE=${mesos_bridge} diff --git a/mesos-templates/mesos-dns/0/rancher-compose.yml b/mesos-templates/mesos-dns/0/rancher-compose.yml new file mode 100644 index 0000000..a6fe5ee --- /dev/null +++ b/mesos-templates/mesos-dns/0/rancher-compose.yml @@ -0,0 +1,32 @@ +.catalog: + name: mesos-dns + version: v0.6.0-rancher1 + description: | + (Experimental) Mesos-dns. + minimum_rancher_version: v0.59.0 + maintainer: "Raul Sanchez " + uuid: mesos-dns-0 + questions: + - variable: "mesos_domain" + description: "Mesos domain." + label: "Mesos domain:" + required: true + default: "mesos" + type: "string" + - variable: "mesos_localip" + description: "Link Local Ip." + label: "Mesos LLI:" + required: true + default: "169.254.169.251" + type: "string" + - variable: "mesos_bridge" + description: "Bridge." + label: "Mesos bridge:" + required: true + default: "docker0" + type: "string" +mesos-dns: + retain_ip: true + + + diff --git a/mesos-templates/mesos-dns/catalogIcon-mesos-dns.svg b/mesos-templates/mesos-dns/catalogIcon-mesos-dns.svg new file mode 100644 index 0000000..c54b281 --- /dev/null +++ b/mesos-templates/mesos-dns/catalogIcon-mesos-dns.svg @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/mesos-templates/mesos-dns/config.yml b/mesos-templates/mesos-dns/config.yml new file mode 100644 index 0000000..6059f4d --- /dev/null +++ b/mesos-templates/mesos-dns/config.yml @@ -0,0 +1,8 @@ +name: Mesos-dns +description: | + (Experimental) Mesos-dns +version: v0.6.0-rancher1 +category: External DNS +maintainer: "Raul Sanchez " +license: +projectURL: https://github.com/rawmind0/alpine-mesos-dns diff --git a/templates/traefik/5/README.md b/templates/traefik/5/README.md index 64fa02f..393d65f 100644 --- a/templates/traefik/5/README.md +++ b/templates/traefik/5/README.md @@ -33,7 +33,9 @@ Traefik labels has to be added in your services, in order to get included in tra - false: the service will not be published - traefik.priority = # Override for frontend priority. 5 by default - traefik.protocol = < http | https > # Override the default http protocol -- traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". WARNING: You could have collisions BE CAREFULL +- traefik.sticky = < true | false > # Enable/disable sticky sessions to the backend +- traefik.alias = < alias > # Alternate names to route rule. Multiple values separated by ",". traefik.domain is appended. WARNING: You could have collisions BE CAREFULL +- traefik.alias.fqdn = < alias fqdn > # Alternate names to route rule. Multiple values separated by ",". traefik.domain must be defined but is not appended here. - traefik.domain = < domain.name > # Domain names to route rules. Multiple domains separated by "," - traefik.domain.regexp = < domain.regexp > # Domain name regexp rule. Multiple domains separated by "," - traefik.port = < port > # Port to expose throught traefik diff --git a/templates/traefik/5/docker-compose.yml b/templates/traefik/5/docker-compose.yml index d879727..348bb15 100644 --- a/templates/traefik/5/docker-compose.yml +++ b/templates/traefik/5/docker-compose.yml @@ -33,7 +33,7 @@ traefik-conf: io.rancher.container.start_once: 'true' tty: true log_opt: {} - image: rawmind/rancher-traefik:0.3.4-18 + image: rawmind/rancher-traefik:0.3.4-19 net: none volumes: - /opt/tools