Git Product home page Git Product logo

puppet-dnsmasq's Introduction

Dnsmasq Puppet Module for Boxen

Build Status

Install the Dnsmasq local resolver. After this module is included the .dev domain will consistently resolve to 127.0.0.1.

Usage

include dnsmasq

Using a domain other than .dev

If you wish to use something other than .dev you can set call your class with the following:

class { 'dnsmasq': tld => 'docker' }

Required Puppet Modules

  • boxen
  • homebrew

Development

Write code. Run script/cibuild to test it. Check the script directory for other useful tools.

puppet-dnsmasq's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

puppet-dnsmasq's Issues

Use a reserved domain name

Both Amazon and Google have applied for the dev TLD. Given that one of those applications may be approved and that using an unreserved domain name is bad form anyway, it would be wise to switch to a reserved domain name. It may not be pretty, but localhost is arguably the most appropriate.

Help instructions

Please help! The only documentation I can find to get this working seems to be here. Here's what I've done so far...

First I have a simple rack app called myapp which I can start successfully with thin on it's default port.

Then, inside the myapp.pp project manifest:

boxen::project { 'myapp':
  ruby          => '2.0.0-p247',
  dir           => "${boxen::config::srcdir}/myapp",
  source        => "gituser/myapp",
  nginx         => true
}

Running boxen then creates /opt/boxen/config/nginx/sites/myapp.config which wants a socket file:

upstream myapp.dev {
  server unix:/opt/boxen/data/project-sockets/myapp;
}

So instead of starting thin on it's default port, I try starting it on a socket which seems to work:

% bundle exec thin start -S "${BOXEN_SOCKET_DIR}/myapp"
Using rack adapter
Thin web server (v1.6.1 codename Death Proof)
Maximum connections set to 1024
Listening on /opt/boxen/data/project-sockets/myapp, CTRL+C to stop

However, when I visit http://myapp.dev nothing resolves and it never even hits nginx. I've tried restarting dnsmasq with boxen --restart-service dnsmasq and still nothing.

What am I missing?

Lost in configuration

Hi guys, I want to modify my dnsmasq entry but I somehow can't find the right way to do it, does someone have an idea how to do this ?
I just want to add an entry, but I don't know how to restart the dnsmasq service, and besides when I run the boxen command again it overwrites my modifs :s

I asked on IRC about this but nobody's answering, so if anyone sees this, please halp :D (maybe this is the wrong place but I don't know where else to ask this).

Overriding config file

Issue #5 references a way to override the config via dnsmasq::config class but that class was removed. There is reference to a $configfile param but it is not used. I'm going to fix in my personal fork. If would like me to submit a PR, help me understand how $configfile was intended to be used: a source, a template, or something else entirely?

Uses deprecated brew sha1 method

The brew formula uses the deprecated sha1 method. We should upgrade to sha256 for security.

Warning: Calling Formula.sha1 is deprecated!
Use Formula.sha256 instead.
/opt/boxen/homebrew/Library/Taps/boxen/homebrew-brews/dnsmasq.rb:6:in `<class:Dnsmasq>'

Version: 2.0.1

Error during boxen run

Error: Execution of '/bin/launchctl start dev.dnsmasq' returned 3:
Error: /Stage[main]/Dnsmasq/Service[dev.dnsmasq]/ensure: change from stopped to running failed: Execution of '/bin/launchctl start dev.dnsmasq' returned 3:

any hints on that or how to fix that?

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.