Added mesos-dns package

This commit is contained in:
Raul Sanchez 2017-02-03 19:41:30 +01:00
parent ef37392cd3
commit a1ceaa6142
5 changed files with 157 additions and 0 deletions

View File

@ -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": {}
}
]
}
```

View File

@ -0,0 +1,35 @@
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"
- MESOS_DNS_LISTENER=${mesos_localip}
- 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}

View File

@ -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 <rawmind@gmail.com>"
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

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="-323 267 56 64" style="enable-background:new -323 267 56 64;" xml:space="preserve">
<style type="text/css">
.st0{fill:#00435A;}
.st1{fill:#00AEDE;}
.st2{fill:#394D54;}
</style>
<g>
<path class="st0" d="M-281.5,306v-13.8l-11.9,6.9L-281.5,306"/>
<path class="st1" d="M-282.2,290.8l-11.9-6.9v13.8L-282.2,290.8"/>
<path class="st1" d="M-295.7,297.7v-13.8l-12,6.9L-295.7,297.7"/>
<path class="st1" d="M-296.5,282.6l-11.9-6.9v13.9L-296.5,282.6"/>
<path class="st0" d="M-282.2,307.3l-11.9-6.9v13.8L-282.2,307.3"/>
<path class="st0" d="M-295.7,314.3v-13.8l-12,6.9L-295.7,314.3"/>
<path class="st1" d="M-267.9,299.1l-12-6.9V306L-267.9,299.1"/>
<path class="st1" d="M-310,289.5v-13.9l-12,6.9L-310,289.5"/>
<path class="st0" d="M-296.5,315.6l-11.9-6.9v13.8L-296.5,315.6"/>
<path class="st1" d="M-310,322.5v-13.8l-12,6.9L-310,322.5"/>
<path class="st0" d="M-296.5,299.1l-11.9-6.9V306L-296.5,299.1"/>
<path class="st1" d="M-281.5,289.5v-13.9l-11.9,6.9L-281.5,289.5"/>
<path class="st0" d="M-294.2,267.4v13.8l11.9-6.9L-294.2,267.4"/>
<path class="st0" d="M-307.7,274.3l12,6.9v-13.8L-307.7,274.3"/>
<path class="st0" d="M-282.2,323.8l-11.9-6.9v13.8L-282.2,323.8"/>
<path class="st0" d="M-295.7,330.8v-13.8l-12,6.9L-295.7,330.8"/>
<path class="st1" d="M-267.2,314.3v-13.8l-11.9,6.9L-267.2,314.3"/>
<path class="st1" d="M-310,306v-13.9l-12,6.9L-310,306"/>
<path class="st1" d="M-310.8,307.3l-12.1-6.9v13.8L-310.8,307.3"/>
<path class="st1" d="M-267.2,297.7v-13.8l-11.9,6.9L-267.2,297.7"/>
<path class="st1" d="M-267.9,282.6l-12-6.9v13.9L-267.9,282.6"/>
<path class="st1" d="M-267.9,315.6l-12-6.9v13.8L-267.9,315.6"/>
<path class="st0" d="M-281.5,322.5v-13.8l-11.9,6.9L-281.5,322.5"/>
<path class="st1" d="M-310.8,290.8l-12.1-6.9v13.8L-310.8,290.8"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,8 @@
name: Mesos-dns
description: |
(Experimental) Mesos-dns
version: v0.6.0-rancher1
category: External DNS
maintainer: "Raul Sanchez <rawmind@gmail.com>"
license:
projectURL: https://github.com/rawmind0/alpine-mesos-dns