Project

General

Profile

Actions

Feature #1224

open

DNSMadeEasy/Foreman/SmartProxy integration

Added by Brian Gupta about 13 years ago. Updated over 9 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
DNS
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Now that DNSmadeeasy has REST API, we should support it http://www.dnsmadeeasy.com/enterprise-dns/rest-api/


Related issues 1 (1 open0 closed)

Related to Foreman - Tracker #5409: DNS Proxy ImprovementsNew

Actions
Actions #1

Updated by Brian Gupta about 13 years ago

Here is some sample code https://github.com/bgupta/dnsmadeeasy

Actions #2

Updated by Jeremy Kitchen over 11 years ago

This seems like it's actually pretty easy, however I have a quick implementation question:

There exists a rubygem called 'dnsmadeeasy/api' which we could use. However, this is not packaged for debian, and most likely not packaged for other things as well, so would probably not be a good dependency to add.
The license for the rubygem is unknown, the gemspec file has no license information and there doesn't seem to be a github or anything for it, so I don't think we can just include it in vendor/ or something.
Since it's only 2 calls we really need to implement with dnsmadeeasy, should we just use net-http or rest-client or such to do the calls directly?

Once I get an answer on this I can have this implemented pretty quickly.

I'm also contacting the creator of the rubygem and asking about licensing information.

Thanks!

Actions #3

Updated by Brian Gupta over 11 years ago

Jeremy Kitchen wrote:

This seems like it's actually pretty easy, however I have a quick implementation question:

There exists a rubygem called 'dnsmadeeasy/api' which we could use. However, this is not packaged for debian, and most likely not packaged for other things as well, so would probably not be a good dependency to add.
The license for the rubygem is unknown, the gemspec file has no license information and there doesn't seem to be a github or anything for it, so I don't think we can just include it in vendor/ or something.
Since it's only 2 calls we really need to implement with dnsmadeeasy, should we just use net-http or rest-client or such to do the calls directly?

Once I get an answer on this I can have this implemented pretty quickly.

I'm also contacting the creator of the rubygem and asking about licensing information.

Thanks!

I'd suggest NOT using a full gem for this as the API is dirt simple. That said, feel free to steal any of the code/examples I wrote (all GPLv2+): https://github.com/bgupta/dnsmadeeasy

This is likely the script that would be most useful example: https://github.com/bgupta/dnsmadeeasy/blob/master/ec2-set-dme-dns.rb

-Brian

Actions #4

Updated by Jeremy Kitchen over 11 years ago

ok, that's what I was figuring, just hack the http requests together and it should Just Work. I'll try to bang this out by the end of the week, I have a bunch of meetings tomorrow and jury duty thursday (and hopefully ONLY thursday)

thanks!

Actions #5

Updated by Jeremy Kitchen over 11 years ago

another design question now: with dnsmadeeasy you apparently need to RESTfully write directly to a domain's endpoint, based on ID:

POST /V2.0/dns/managed/<id>/records, for example

I could look this up every time, but in our case, we have several thousand domains managed by dnsmadeeasy and having to parse them out and figure out which domain is which every time ... oof. Also, since our foreman domain is actually a subdomain of the domain we have hosted with dnsmadeeasy, there's no 1:1 relationship so we'd have to go through each domain in the list and try to find the best match, which just doesn't sound fun.

So, I was thinking of having the proxy setup similar to dhcp where you specify a list of domains and their IDs in the proxy's settings.yml file and it'll use that to look up the domain's ID.

If Foreman gave the domain's parameters to the smart-proxy during the API call then I could just make this a parameter of the domain, so that's another route which could be taken.

Thoughts?

Actions #6

Updated by Brian Gupta over 11 years ago

Jeremy Kitchen wrote:

another design question now: with dnsmadeeasy you apparently need to RESTfully write directly to a domain's endpoint, based on ID:

POST /V2.0/dns/managed/<id>/records, for example

I could look this up every time, but in our case, we have several thousand domains managed by dnsmadeeasy and having to parse them out and figure out which domain is which every time ... oof. Also, since our foreman domain is actually a subdomain of the domain we have hosted with dnsmadeeasy, there's no 1:1 relationship so we'd have to go through each domain in the list and try to find the best match, which just doesn't sound fun.

So, I was thinking of having the proxy setup similar to dhcp where you specify a list of domains and their IDs in the proxy's settings.yml file and it'll use that to look up the domain's ID.

If Foreman gave the domain's parameters to the smart-proxy during the API call then I could just make this a parameter of the domain, so that's another route which could be taken.

Thoughts?

Yuck, hadn't really thought about that, but not loving the idea of configuring this in a text file. I'm starting to wonder if the proxy is the right place to do this. (IE: We are doing a lot more in Foreman directly than we did in the past, perhaps your idea to make this a parameter to the proxy call might be one way.)

I think taking this to the foreman-dev mailing list is the right path at this point.

-Brian

Actions #7

Updated by Jeremy Kitchen over 11 years ago

ok, will do that in a bit, thanks!

Actions #8

Updated by Stephen Benjamin over 10 years ago

Actions #9

Updated by Dominic Cleal over 9 years ago

  • Category set to DNS

The Smart Proxy's DNS module can now be extended by plugins, thanks to #7008. This would be a great way to start developing this feature if anybody's interested.

Here are some useful links:

Actions

Also available in: Atom PDF