• Stars
    star
    573
  • Rank 74,803 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Portably control DNS clouds using java or bash

Denominator

Portable control of DNS clouds

Denominator is a portable Java library for manipulating DNS clouds. Denominator has pluggable back-ends, including AWS Route53, Neustar Ultra, DynECT, Rackspace Cloud DNS, OpenStack Designate, and a mock for testing. We also ship a command line version so it's easy for anyone to try it out. Denominator currently supports basic zone and record features, as well GEO (aka Directional) profiles. See Netflix Tech Blog for an introduction.

Build Status

Command line

For your convenience, the denominator cli is a single executable file. Under the hood, the cli uses airline to look and feel like dig or git.

Android

There's no official android client, yet. However, we do have an Android Example you can try out.

Binaries

If you are using OSX, Homebrew has a built-in installer for denominator.

Here's how to get denominator-cli 4.6.0 from bintray

  1. Download denominator
  2. Place it on your $PATH. (ex. ~/bin)
  3. Set it to be executable. (chmod 755 ~/bin/denominator)

Getting Started

Advanced usage, including ec2 hooks are covered in the readme. Here's a quick start for the impatient.

If you just want to fool around, you can use the mock provider.

# first column is the zone id, which isn't always its name!
$ denominator -p mock zone list
denominator.io.          denominator.io.                                          admin.denominator.io.                86400
$ denominator -p mock record -z denominator.io. list
denominator.io.                                    SOA   3600   ns1.denominator.io. admin.denominator.io. 1 3600 600 604800 60
denominator.io.                                    NS    86400  ns1.denominator.io.

Different providers connect to different urls and need different credentials. First step is to run ./denominator providers to see how many -c args you need and what values they should have:

$ denominator providers
provider   url                                                 duplicateZones credentialType credentialArgs
mock       mem:mock                                            false
clouddns   https://identity.api.rackspacecloud.com/v2.0/       true           apiKey         username apiKey
designate  http://localhost:5000/v2.0                          true           password       tenantId username password
dynect     https://api2.dynect.net/REST                        false          password       customer username password
route53    https://route53.amazonaws.com                       true           accessKey      accessKey secretKey
route53    https://route53.amazonaws.com                       true           session        accessKey secretKey sessionToken
ultradns   https://ultra-api.ultradns.com:8443/UltraDNS_WS/v01 false          password       username password

Now, you can list your zones or records.

$ denominator -p ultradns -c my_user -c my_password zone list
--snip--
netflix.com.
--snip--
$ denominator -p ultradns -c my_user -c my_password record --zone netflix.com. list
--snip--
email.netflix.com.                                 A     3600   192.0.2.1
--snip--

Code

Denominator exposes a portable model implemented by pluggable Providers such as route53, ultradns, dynect, clouddns, or mock. Under the covers, providers are Dagger modules. Except for the mock, all current providers bind to http requests via feign, which keeps the distribution light.

Binaries

The current version of denominator is 4.6.0

Denominator can be resolved as maven dependencies, or equivalent in lein, gradle, etc. Here are the coordinates, noting you only need to list the providers you use.

<dependencies>
  <dependency>
    <groupId>com.netflix.denominator</groupId>
    <artifactId>denominator-core</artifactId>
    <version>${denominator.version}</version>
  </dependency>
  <dependency>
    <groupId>com.netflix.denominator</groupId>
    <artifactId>denominator-clouddns</artifactId>
    <version>${denominator.version}</version>
  </dependency>
  <dependency>
    <groupId>com.netflix.denominator</groupId>
    <artifactId>denominator-dynect</artifactId>
    <version>${denominator.version}</version>
  </dependency>
  <dependency>
    <groupId>com.netflix.denominator</groupId>
    <artifactId>denominator-route53</artifactId>
    <version>${denominator.version}</version>
  </dependency>
  <dependency>
    <groupId>com.netflix.denominator</groupId>
    <artifactId>denominator-ultradns</artifactId>
    <version>${denominator.version}</version>
  </dependency>
</dependencies>

Getting Started

Creating a connection to a provider requires that you have access to two things: the name of the provider, and as necessary, credentials for it.

import static denominator.CredentialsConfiguration.credentials;
...
DNSApiManager manager = Denominator.create("ultradns", credentials(username, password)); // manager is closeable, so please close it!

The credentials are variable length, as certain providers require more that 2 parts. The above returns an instance of DNSApiManager where apis such as ZoneApis are found. Here's how to list zones:

for (Zone zone : manager.api().zones()) {
  for (ResourceRecordSet<?> rrs : manager.api().recordSetsInZone(zone.id())) {
    processRRS(rrs);
  }
}

If you are running unit tests, or don't have a cloud account yet, you can use mock, and skip the credentials part.

DNSApiManager manager = Denominator.create("mock");

The Denominator model is based on the ResourceRecordSet concept. A ResourceRecordSet is simply a group of records who share the same name and type. For example all address (A) records for the name www.netflix.com. are aggregated into the same ResourceRecordSet. The values of each record in a set are type-specific. These data types are implemented as map-backed interfaces. This affords both the strong typing of java and extensibility and versatility of maps.

For example, the following are identical:

mxData.getPreference();
mxData.get("preference");

Resource record sets live in a Zone, which is roughly analogous to a domain. Zones can be created on-demand and deleted.

Use via Dagger

Some users may wish to use Denominator as a Dagger library. Here's one way to achieve that:

import static denominator.CredentialsConfiguration.credentials;
import static denominator.Dagger.provider;
...
// this shows how to facilitate runtime url updates
Provider fromDiscovery = new UltraDNSProvider() {
  public String url() {
    return discovery.urlFor("ultradns");
  }
};
// this shows how to facilitate runtime credential updates
Supplier<Credentials> fromEncryptedStore = new Supplier<Credentials>() {
  public Credentials get() {
    return encryptedStore.getCredentialsFor("ultradns");
  }
}
DNSApiManager manager = ObjectGraph.create(provider(fromDiscovery), new UltraDNSProvider.Module(), credentials(fromEncryptedStore))
                                   .get(DNSApiManager.java);

Third-Party Providers

Denominator also operates with third-party DNS providers such as DiscoveryDNS.

Providers are looked up by name using ServiceLoader. Given the provider is in the classpath, normal lookups should work.

// Given the discoverydns jar is in the classpath
DNSApiManager manager = Denominator.create("discoverydns");

Third-party support is also explained in the CLI readme.

Build

To build:

$ git clone [email protected]:Netflix/denominator.git
$ cd denominator/
$ ./gradlew clean test install

Intellij Idea IDE

Generate the Idea project files:

$ ./gradlew idea

Import the project:

  1. File > Import Project...
  2. Preferences > Compiler > Annotation Processors > Check "Enable annotation processing"

Run the live tests:

  1. Choose a live test (e.g. CloudDNSCheckConnectionLiveTest)
  2. Right click and select "Create CloudDNSCheckConnectionLiveTest"
  3. VM options: -ea -Dclouddns.username=<username> -Dclouddns.password=<password>
  4. Working directory: /path/to/denominator/clouddns

Feedback and Collaboration

  • For high-level updates, follow denominatorOSS on Twitter.
  • For questions, please tag denominator in StackOverflow.
  • For bugs and enhancements, please use Github Issues.
  • For email discussions, please post to the user forum
  • For discussions on design and internals, please join #denominator on irc freenode or post to the dev forum

LICENSE

Copyright 2013 Netflix, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

More Repositories

1

Hystrix

Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable resilience in complex distributed systems where failure is inevitable.
Java
23,594
star
2

chaosmonkey

Chaos Monkey is a resiliency tool that helps applications tolerate random instance failures.
Go
14,410
star
3

zuul

Zuul is a gateway service that provides dynamic routing, monitoring, resiliency, security, and more.
Java
12,993
star
4

conductor

Conductor is a microservices orchestration engine.
Java
12,920
star
5

eureka

AWS Service registry for resilient mid-tier load balancing and failover.
Java
11,991
star
6

falcor

A JavaScript library for efficient data fetching
JavaScript
10,338
star
7

pollyjs

Record, Replay, and Stub HTTP Interactions.
JavaScript
10,184
star
8

SimianArmy

Tools for keeping your cloud operating in top form. Chaos Monkey is a resiliency tool that helps applications tolerate random instance failures.
Java
7,955
star
9

metaflow

πŸš€ Build and manage real-life ML, AI, and data science projects with ease!
Python
7,498
star
10

fast_jsonapi

No Longer Maintained - A lightning fast JSON:API serializer for Ruby Objects.
Ruby
5,078
star
11

dispatch

All of the ad-hoc things you're doing to manage incidents today, done for you, and much more!
Python
4,548
star
12

ribbon

Ribbon is a Inter Process Communication (remote procedure calls) library with built in software load balancers. The primary usage model involves REST calls with various serialization scheme support.
Java
4,468
star
13

security_monkey

Security Monkey monitors AWS, GCP, OpenStack, and GitHub orgs for assets and their changes over time.
Python
4,349
star
14

vmaf

Perceptual video quality assessment based on multi-method fusion.
Python
4,159
star
15

dynomite

A generic dynamo implementation for different k-v storage engines
C
4,104
star
16

vizceral

WebGL visualization for displaying animated traffic graphs
JavaScript
4,047
star
17

vector

Vector is an on-host performance monitoring framework which exposes hand picked high resolution metrics to every engineer’s browser.
JavaScript
3,588
star
18

atlas

In-memory dimensional time series database.
Scala
3,331
star
19

concurrency-limits

Java
3,117
star
20

consoleme

A Central Control Plane for AWS Permissions and Access
Python
3,065
star
21

flamescope

FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.
Python
2,979
star
22

dgs-framework

GraphQL for Java with Spring Boot made easy.
Kotlin
2,963
star
23

bless

Repository for BLESS, an SSH Certificate Authority that runs as a AWS Lambda function
Python
2,722
star
24

archaius

Library for configuration management API
Java
2,435
star
25

asgard

[Asgard is deprecated at Netflix. We use Spinnaker ( www.spinnaker.io ).] Web interface for application deployments and cloud management in Amazon Web Services (AWS). Binary download: http://github.com/Netflix/asgard/releases
Groovy
2,235
star
26

curator

ZooKeeper client wrapper and rich ZooKeeper framework
Java
2,138
star
27

titus

1,996
star
28

EVCache

A distributed in-memory data store for the cloud
Java
1,900
star
29

lemur

Repository for the Lemur Certificate Manager
Python
1,651
star
30

bpftop

bpftop provides a dynamic real-time view of running eBPF programs. It displays the average runtime, events per second, and estimated total CPU % for each program.
Rust
1,647
star
31

genie

Distributed Big Data Orchestration Service
Java
1,635
star
32

metacat

Java
1,555
star
33

netflix.github.com

HTML
1,419
star
34

servo

Netflix Application Monitoring Library
Java
1,408
star
35

mantis

A platform that makes it easy for developers to build realtime, cost-effective, operations-focused applications
Java
1,385
star
36

vectorflow

D
1,287
star
37

hubcommander

A Slack bot for GitHub organization management -- and other things too
Python
1,262
star
38

rend

A memcached proxy that manages data chunking and L1 / L2 caches
Go
1,174
star
39

hollow

Hollow is a java library and toolset for disseminating in-memory datasets from a single producer to many consumers for high performance read-only access.
Java
1,148
star
40

repokid

AWS Least Privilege for Distributed, High-Velocity Deployment
Python
1,084
star
41

astyanax

Cassandra Java Client
Java
1,034
star
42

Priam

Co-Process for backup/recovery, Token Management, and Centralized Configuration management for Cassandra.
Java
1,024
star
43

aminator

A tool for creating EBS AMIs. This tool currently works for CentOS/RedHat Linux images and is intended to run on an EC2 instance.
Python
938
star
44

Turbine

SSE Stream Aggregator
Java
831
star
45

governator

Governator is a library of extensions and utilities that enhance Google Guice to provide: classpath scanning and automatic binding, lifecycle management, configuration to field mapping, field validation and parallelized object warmup.
Java
821
star
46

Fido

C#
816
star
47

suro

Netflix's distributed Data Pipeline
Java
783
star
48

security-bulletins

Security Bulletins that relate to Netflix Open Source
734
star
49

spectator

Client library for collecting metrics.
Java
720
star
50

Fenzo

Extensible Scheduler for Mesos Frameworks
Java
703
star
51

msl

Message Security Layer
C++
687
star
52

unleash

Professionally publish your JavaScript modules in one keystroke
JavaScript
588
star
53

blitz4j

Logging framework for fast asynchronous logging
Java
559
star
54

edda

AWS API Read Cache
Scala
554
star
55

PigPen

Map-Reduce for Clojure
Clojure
551
star
56

netflix-graph

Compact in-memory representation of directed graph data
Java
548
star
57

go-env

a golang library to manage environment variables
Go
542
star
58

karyon

The nucleus or the base container for Applications and Services built using the NetflixOSS ecosystem
Java
495
star
59

Prana

A sidecar for your NetflixOSS based services.
Java
492
star
60

iceberg

Iceberg is a table format for large, slow-moving tabular data
Java
465
star
61

Lipstick

Pig Visualization framework
JavaScript
464
star
62

Surus

Java
453
star
63

aws-autoscaling

Tools and Documentation about using Auto Scaling
Shell
429
star
64

go-expect

an expect-like golang library to automate control of terminal or console based programs.
Go
422
star
65

nf-data-explorer

The Data Explorer gives you fast, safe access to data stored in Cassandra, Dynomite, and Redis.
TypeScript
420
star
66

Workflowable

Ruby
370
star
67

osstracker

Github organization OSS metrics collector and metrics dashboard
Scala
365
star
68

vizceral-example

Example Vizceral app
JavaScript
363
star
69

ndbench

Netflix Data Store Benchmark
HTML
360
star
70

Raigad

Co-Process for backup/recovery, Auto Deployments and Centralized Configuration management for ElasticSearch
Java
346
star
71

recipes-rss

RSS Reader Recipes that uses several of the Netflix OSS components
Java
339
star
72

aegisthus

A Bulk Data Pipeline out of Cassandra
Java
323
star
73

titus-control-plane

Titus is the Netflix Container Management Platform that manages containers and provides integrations to the infrastructure ecosystem.
Java
316
star
74

weep

The ConsoleMe CLI utility
Go
311
star
75

metaflow-ui

🎨 UI for monitoring your Metaflow executions!
TypeScript
300
star
76

dyno-queues

Dyno Queues is a recipe that provides task queues utilizing Dynomite.
Java
264
star
77

image_compression_comparison

Image Compression Comparison Framework
Python
258
star
78

falcor-express-demo

Demonstration Falcor end point for a Netflix-style Application using express
HTML
246
star
79

gradle-template

Java
244
star
80

ember-nf-graph

Composable graphing component library for EmberJS.
JavaScript
241
star
81

falcor-router-demo

A demonstration of how to build a Router for a Netflix-like application
JavaScript
236
star
82

titus-executor

Titus Executor is the container runtime/executor implementation for Titus
Go
233
star
83

photon

Photon is a Java implementation of the Interoperable Master Format (IMF) standard. IMF is a SMPTE standard whose core constraints are defined in the specification st2067-2:2013
Java
233
star
84

dial-reference

C
228
star
85

s3mper

s3mper - Consistent Listing for S3
Java
218
star
86

ReactiveLab

Experiments and prototypes with reactive application design.
Java
209
star
87

inviso

JavaScript
205
star
88

NfWebCrypto

Web Cryptography API Polyfill
C++
205
star
89

staash

A language-agnostic as well as storage-agnostic web interface for storing data into persistent storage systems, the metadata layer abstracts a lot of storage details and the pattern automation APIs take care of automating common data access patterns.
Java
204
star
90

zeno

Netflix's In-Memory Data Propagation Framework
Java
200
star
91

brutal

A multi-network asynchronous chat bot framework using twisted
Python
200
star
92

vizceral-react

JavaScript
199
star
93

dispatch-docker

Shell
193
star
94

pytheas

Web Resources and UI Framework
JavaScript
187
star
95

dyno

Java client for Dynomite
Java
184
star
96

hal-9001

Hal-9001 is a Go library that offers a number of facilities for creating a bot and its plugins.
Go
178
star
97

metaflow-service

πŸš€ Metadata tracking and UI service for Metaflow!
Python
173
star
98

Nicobar

Java
171
star
99

lemur-docker

Docker files for the Lemur certificate orchestration tool
Python
170
star
100

yetch

Yet-another-fetch polyfill library. Supports AbortController/AbortSignal
JavaScript
168
star