Coder Social home page Coder Social logo

wheel-dns's Introduction

DNSMasq

This is a Radial Wheel repository for running dnsmasq as a stand-alone DNS server.

Setup

DNS is fussy on most systems. Ubuntu desktop, for example, runs a barebones version of DNSMasq already to serve it's DNS. So check that it is disabled before running it in this container because life is easier if you can run this service on port 53. Ubuntu server I think has this disabled by default.

I only really know Ubuntu, so this might not work for all systems. But here we go:

  1. Regardless of your hosts setup, it should correctly serve the other computers on your network out of the box (I think) on eth0 (or whatever).
  2. But you should make sure your host can serve itself correctly anyway. 1. Make sure the only mention of dns nameservers in /etc/resolv.conf is 127.0.0.1. 2. On Ubuntu server, this is done by setting it in /etc/network/interfaces with dns-nameserver 127.0.0.1 under your ethernet device. 3. Either restart, which will update /etc/resolv.conf, or do sudo ifdown eth0 && sudo ifup eth0 which will update without a restart.

Tunables

  • $CONF_FILE: ["/config/dnsmasq"] Path to dnsmasq.conf file.

Radial

Radial is a Docker container topology strategy that seeks to put the canon of Docker best-practices into simple, re-usable, and scalable images, dockerfiles, and repositories. Radial categorizes containers into 3 types: Axles, Hubs, and Spokes. A Wheel is a repository used to recreate an application stack consisting of any combination of all three types of containers. Check out the Radial documentation for more.

One of the main design goals of Radial containers is simple and painless modularity. All Spoke (application/binary) containers are designed to be run by themselves as a service (a Wheel consisting of a Hub container for configuration and a Spoke container for the running binary) or as part of a larger stack as a Wheel of many Spokes all joined by the Hub container (database, application code, web server, backend services etc.). Check out the Wheel tutorial for some more details on how this works.

Note also that for now, Radial makes use of Fig for all orchestration, demonstration, and testing. Radial is just a collection of images and strategies, so technically, any orchestration tool can work. But Fig was the leanest and most logical to use for now.

How to Use

Static Build

In case you need to modify the entrypoint script, the Dockerfile itself, create your "config" branch for dynamic building, or just prefer to build your own from scratch, then you can do the following:

  1. Clone this repository
  2. Make whatever changes needed to configuration and add whatever files
  3. fig up

Dynamic Build

A standard feature of all Radial images is their ability to be used dynamically. This means that since great care is made to separate the application code from it's configuration, as long as you make your application configuration available as a git repository, and in it's own "config" branch as per the guidelines in the Wheel template, no building of any images will be necessary at deploy time. This has many benefits as it allows rapid deployment and configuration without any wait time in the building process. However:

Dynamic builds will not commit your configuration files into any resulting images like static builds.

Static builds do a "COPY" of files into the image before exposing the directories as volumes. Dynamic builds do a git fetch at run time and the resulting data is downloaded to an already existing volume location, which is now free from Docker versioning. Both methods have their advantages and disadvantages. Deploying the same exact configuration might benefit from a single image built statically whereas deploying many different disposable configurations rapidly are best done dynamically with no building.

To run dynamically:

  1. Modify the fig-dynamic.yml file to point at your own Wheel repository location by setting the $WHEEL_REPO variable. When run, the Hub container will pull the "config" branch of that repository and use it to run the Spoke container with your own configuration.
  2. fig -f fig-dynamic.yml up

License

MIT

Credits

Much thanks to Jérôme Petazzoni for PXE, which this container is mainly based off of.

wheel-dns's People

Contributors

brianclements avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.