Gordon is no longer developed publicly. This code will remain available, but will not change.
Event-driven Cloud DNS and DNS Reconciliation Services
Google Cloud Platform (GCP) plugins for gordon, an open-source, event-driven service for 3rd party DNS providers, and for gordon-janitor, an open-source service that checks Cloud DNS records against a source of truth (e.g. Compute Engine) and submits corrections to gordon via Google Pubsub.
The gordon-gcp
plugins add optional support for the following:
Service:
- Consuming events from Google Cloud Pub/Sub
- Reading from Google Compute Engine for record information
- Creating, updating, and deleting records within Google Cloud DNS
Janitor:
- Reading instance lists from Google Compute Engine
- Comparing record sets from Google Compute Engine and Google Cloud DNS
- Publishing any required DNS changes to Google Cloud Pub/Sub
NOTICE: This is still in the planning phase and under active development. Gordon, Gordon Janitor, and these plugins should not be used in production yet.
- Python 3.6
- Google Cloud Platform account
- Service account JSON key that has relevant access (i.e. read and/or write) to the plugin service you want to use (e.g. Google Cloud DNS, Pub/Sub, or Compute Engine). See Google's documentation on how to create a key.
Support for other Python versions may be added in the future.
For development and running tests, your system must have all supported versions of Python installed. We suggest using pyenv.
$ git clone [email protected]:spotify/gordon-gcp.git && cd gordon-gcp
# make a virtualenv
(env) $ pip install -r dev-requirements.txt
To run the entire test suite:
# outside of the virtualenv
# if tox is not yet installed
$ pip install tox
$ tox
If you want to run the test suite for a specific version of Python:
# outside of the virtualenv
$ tox -e py36
To run an individual test, call pytest
directly:
# inside virtualenv
(env) $ pytest tests/test_foo.py
To generate documentation:
(env) $ pip install -r docs-requirements.txt
(env) $ cd docs && make html # builds HTML files into _build/html/
(env) $ cd _build/html
(env) $ python -m http.server $PORT
Then navigate to localhost:$PORT
!
To watch for changes and automatically reload in the browser:
(env) $ cd docs
(env) $ make livehtml # default port 8888
# to change port
(env) $ make livehtml PORT=8080
This project adheres to the Open Code of Conduct. By participating, you are expected to honor this code.