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