Giter Club home page Giter Club logo

vagrant-ddns-scripts's Introduction

vagrant-ddns-scripts

Goals

  • Allow for dynamically updating DNS when Vagrant machines change state. vagrant-triggers plugin handles hooking into the events, the scripts provided in this repo bridge the gap between Vagrant and nsupdate.

Prerequisites

Setup

  • Put the appropriate script for your environment somewhere in your path. I recommend a dedicated scripts directory.

Usage

  • There are two ways you can use the vagrant-ddns scripts, implicitly within a Vagrant project or explicitly via the command line.

Options

  • -a: (Required) nsupdate actions. Currently add, delete, dryadd, and drydelete are supported.
  • -e: (Optional) run with elevated permissions. Executes ifconfig as sudo.
  • -s: (Required) DNS server supporting DDNS updates. IP address or hostname.
  • -m: (Optional) Vagrant machine id. Optional for implicit usage, Required for explicit.
  • -i: (Optional) Interface on the guest machine to extract IP address from. Required when action is add.
  • -h: (Required) Hostname to be added to DNS.
  • -k: (Required) Path to keyfile required to perform DDNS update.

Explicit

  • Occasionally it may be necessary to dynamically modify DNS entries for virtual machines directly from the command line. This could be useful in the event that a trigger doesn't actually fire properly or you need to manually update your DNS server.
  • Since the script may be called from anywhere in the filesystem -m (machine id) IS required.
    # Get the list of machines on this host
    C:\> vagrant global-status
    id       name    provider   state   directory
    -------------------------------------------------------------------------------------------------------
    ea6156e  myvm    virtualbox running C:/Path/To/vagrant-ddns-scripts/example
    
    # Explicitly add a DNS entry for this guest
    C:\> vagrant-ddns -a add -s 127.0.0.1 -m ea6156e -h myvm.localhost -i eth0 -k C:\Path\To\vagrant-ddns-scripts\example\Klocalhost.+157+11776.key
    
    # Explicitly delete the DNS entry of this guest
    C:\> vagrant-ddns -a delete -s 127.0.0.1 -m ea6156e -h myvm.localhost -k C:\Path\To\vagrant-ddns-scripts\example\Klocalhost.+157+11776.key

Implicit

  • Implicit usage is outlined in the example/ Vagrantfile. Basically you define your DDNS particulars and then hook the script into various Vagrant machine events.
  • Since the script is being called from within Vagrant it automatically knows which machine it should be interacting with, therefore -m (machine id) is not required.

vagrant-ddns-scripts's People

Contributors

bstoots avatar

Watchers

 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.