Code Monkey home page Code Monkey logo

gcpddns's Introduction

Github License Open Issues Docker Pulls Docker Build Last Commit Version

Google Cloud Platform Dynamic DNS Docker

This project is a containerized implementation of work done here. It contains both the underlying application and necessary components to launch it directly in Docker.

Requirements

  1. Google Cloud Platform project with Cloud DNS API enabled and domains active
  2. Docker

Configuration and Setup

You'll need to already have setup your DNS in GCP. This is beyond the scope of this project but instructions can be found online. You'll also need to setup a service account and get credentials for it. To do so, follow the directions below.

GCP Service Account Setup

  1. Create a GCP service account

    SA_EMAIL=$(gcloud iam service-accounts --format='value(email)' create gcpddns)

  2. Create a JSON key file associated with the new service account

    gcloud iam service-accounts keys create service-account.json --iam-account=$SA_EMAIL

  3. Add an IAM policy to the service account for the project.

    PROJECT=$(gcloud config list core/project --format='value(core.project)') gcloud projects add-iam-policy-binding $PROJECT --member serviceAccount:$SA_EMAIL --role roles/dns.admin

Once you've secured your GCP credentials, save the JSON as google.json in a directory that will be accessible to the running image (/config below)

Docker Setup

Docker Variables

Environmental

  • GOOGLE_APPLICATION_CREDENTIALS

Ports

  • 8080:8080

Volumes

  • {$Path_to_config}/config:/config
  1. Save the google.json service account credential in the directory you'll be using for this container.

  2. In that same directory, create a config.json for the client. Enter the domain name you want to update, the GCP project ID, and Cloud DNS managed zone name. Multiple domains can be added as part of the configuration.

    {
      "domains": {
        "mydomain.example.com": {
          "provider": "gcp",
          "provider_config": {
             "project_id": "example-project",
             "managed_zone": "example-zone",
          }
        }
      }
    }
    

I strongly recommend using a JSON linter at this step—especially if you're using multiple domains.

Running the Container

To run the container in Docker:

  docker run -d --name gcpddns \
  -v ${PATH}/config:/config \
  -p 8080:8080 \
  -e "GOOGLE_APPLICATION_CREDENTIALS=/config/google.json" \
  charlestephen/gcpddns:latest

gcpddns's People

Contributors

charlestephen avatar ianlewis avatar smgoller avatar

Stargazers

 avatar

Forkers

smgoller blusyn

gcpddns's Issues

Depfu Error: No dependency files found

Hello,

We've tried to activate or update your repository on Depfu and couldn't find any supported dependency files. If we were to guess, we would say that this is not actually a project Depfu supports and has probably been activated by error.

Monorepos

Please note that Depfu currently only searches for your dependency files in the root folder. We do support monorepos and non-root files, but don't auto-detect them. If that's the case with this repo, please send us a quick email with the folder you want Depfu to work on and we'll set it up right away!

How to deactivate the project

  • Go to the Settings page of either your own account or the organization you've used
  • Go to "Installed Integrations"
  • Click the "Configure" button on the Depfu integration
  • Remove this repo (charlestephen/gcpddns) from the list of accessible repos.

Please note that using the "All Repositories" setting doesn't make a lot of sense with Depfu.

If you think that this is a mistake

Please let us know by sending an email to [email protected].


This is an automated issue by Depfu. You're getting it because someone configured Depfu to automatically update dependencies on this project.

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.