minimesos;
minimesos;

minimesos 0.12.0 – Local DNS for development with the .mm domain

Apache Mesos

Today we released minimesos 0.12.0. In this version we have added support for Mesos DNS and an integration with dnsmasq. With this change the minimesos containers and Marathon apps are available on the .mm domain. You can install the new version using the usual installer command: curl -sSL https://minimesos.org/install | sh. The Docker images are available on Docker Hub and the jar is available via Jitpack.

Predictable DNS vs unpredictable container IPs

One of my major pet peeves during development is working with unpredictable container IP addresses instead of predictable DNS names. Predictable DNS names provide easier configuration and a better Developer Experience (DX). Luckily we have an initial implementation to solve this problem with our support for Mesos DNS and dnsmasq. See the animated gif below. We can resolve the master and the deployed nginx container dircectly using predictible DNS names.

Mesos DNS

Mesos DNS is designed specifically for Mesos and created by our friends from Mesosphere. Mesos DNS monitors the master and automatically created DNS records for each task. By using Mesos DNS you can resolve the processes. The top level domain is configurable so we have used the .mm domain to create predictable naming conventions:

  • Master – master.mm
  • Zookeeper – zookeeper.mm
  • Agent – agent.mm
  • Marathon Application – app.marathon.mm

The Mesos DNS container is defined as one of the cluster processes you can configure in your minimesosFile. A mesosdns snippet is now added to the minimesosFile when you do minimesos init.

dnsmasq

The second piece of the puzzle is dnsmasq. It is a local DNS server that runs on many systems by default. When a program attempts to resolve a domain name it uses name services defined in /etc/nsswitch.conf. If dnsmasq is installed it is also listed as one of the name services besides your host file and your ISPs DNS. The key feature we use it that dnsmasq can forward DNS requests to another server, in our case Mesos DNS. By doing this every application the host machine can resolve minimesos containers and applications. This forwarding is done by adding a small line of configuration to dnsmasq. It is printed on minimesos up

When this configuration is in place all .mm addresses will be resolved through dnsmasq hence through Mesos DNS.

Keep in touch

Thanks for reading! Keep in touch by commenting on the blog, talking to us at @minimesos and @ContainerSoluti or ask a question on the mailing list. Do you have an idea on how to improve minimesos? Please open an issue or add a PR at the minimesos Github repo. We hope you find minimesos useful. See you next time!

The following two tabs change content below.

Frank Scholten

Senior Software Engineer at Container Solutions
Frank is a senior software engineer at Container Solutions. He focuses on Cloud Native applications with DC/OS and Apache Mesos, containers and Continuous Delivery. He created minimesos, the experimentation and testing tool for Apache Mesos. He is enthusiastic about Open Source software development, process improvement and automation in particular. Drawing on experience from a wide range of projects he is always on the lookout for new technologies, methods and ways to improve things and likes to write on speak on these topics.

Leave a Reply

Your email address will not be published. Required fields are marked *