Scalr-DNS options

160 views
Skip to first unread message

Aatxe Urrutia

unread,
May 9, 2014, 3:44:48 PM5/9/14
to scalr-...@googlegroups.com
OK, so I have my setup working , scale up, scale down, graphing, etc however now I have been tasked to look and see if I can look at the custom DNS options in scalr.

Looking at the docs from the UI standpoint it seems the actual mechanism in which DNS is made to work is missing.

I.e.

I think this may be what is needed but am asking if this is correct.

 install Bind on local scalr system and allow it to receive transfers from localhost? ( I would assume that scalr will make an API call to it)
  •      The local DNS server will then notify its slaves

The parent DNS I can forward a zone to the scalr system so any name scalr creates will still work in my  internally dc & office DNS.



Am I missing anything?


Thanks in advance,

-B

Jeremy Koerber

unread,
May 20, 2014, 7:28:56 PM5/20/14
to scalr-...@googlegroups.com
Aatxe,
It sounds like you've got this covered but I just wanted to chime and mention that you may need to add some configuration parameters on your scalr server to get this working. Please have a look here:

https://scalr-wiki.atlassian.net/wiki/display/docs/Scalr+Configuration+Parameters

And take note of all the config parameters that start with scalr.dns.

Let us know if you need anything else.

thanks,
Jeremy

Aatxe Urrutia

unread,
Jun 10, 2014, 6:01:02 PM6/10/14
to scalr-...@googlegroups.com
Thanks,

I was away on vacation, got back and installed bind & traced logs for errors and saw where it was expecting files, changed that and reloaded and the dns zone was marked as active in scalr and the logs show it communicating , additionally writing zone files and reloaded bind.

thanks


On Friday, May 9, 2014 12:44:48 PM UTC-7, Aatxe Urrutia wrote:

Aatxe Urrutia

unread,
Jun 12, 2014, 5:39:57 PM6/12/14
to scalr-...@googlegroups.com
I got scalr to write to both zone files and the /var/named/client_zones/zones.include

however when I set it up via the UI to associate with a farm if I terminate the farm it complains that a domains table is missing. I checked the db and there is no domains table and the php class that calls it , is in fact looking for a scalr.domains table. i.e.

Aatxe Urrutia

unread,
Jun 12, 2014, 5:40:33 PM6/12/14
to scalr-...@googlegroups.com
mysqli error: [1146: Table 'scalr.domains' doesn't exist] in EXECUTE("DELETE FROM `domains` WHERE scalr_farm_id =

that is the error message I get

Aatxe Urrutia

unread,
Jun 12, 2014, 7:31:32 PM6/12/14
to scalr-...@googlegroups.com
mysql> select * from domains;
+----+------------------------------+---------------+--------+-------+---------+
| id | name                         | scalr_farm_id | type   | index | os_type |
+----+------------------------------+---------------+--------+-------+---------+
|  1 | f83290c12eac42.scalr-dns.net |             3 | NATIVE |  NULL | linux   |
+----+------------------------------+---------------+--------+-------+---------+
1 row in set (0.00 sec)

mysql> CREATE TABLE `domains` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(36) DEFAULT NULL, `scalr_farm_id` int(11) DEFAULT NULL, `type` varchar(36) DEFAULT NULL, `index` int(11) DEFAULT NULL, `os_type` enum('windows','linux') DEFAULT 'linux', PRIMARY KEY (`id`), KEY `name` (`name`), KEY `scalr_farm_id` (`scalr_farm_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

I created the above table from what I saw the php doing at it populated it as also shown above, I also looked through the source sql and dont see a domains table in it so I am wondering is there some other part or module I am missing?

Jeremy Koerber

unread,
Jun 13, 2014, 5:13:10 PM6/13/14
to scalr-...@googlegroups.com
I'm working on reproducing this and will let you know what I find. Expect to hear back from me early next week if I don't get it figured out today.

Thanks,
Jeremy



--
You received this message because you are subscribed to a topic in the Google Groups "scalr-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scalr-discuss/sIGTjrrM67o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scalr-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Jeremy Koerber
Product Specialist


Follow us: TwitterFacebook - Blog

Aatxe Urrutia

unread,
Jul 28, 2014, 9:28:52 PM7/28/14
to scalr-...@googlegroups.com
Note sure if there is a way to override this as I just re-downloaded the source code from github and grepped through the source code and these appear to be hardcoded


grep -r  -i 'scalr-dns.net' app/*
app/observers/class.DNSEventObserver.php:                $pdnsDb->Execute("INSERT INTO `domains` SET `name`=?, `type`=?, `scalr_farm_id`=?", array("{$hash}.scalr-dns.net",'NATIVE', $event->GetFarmID()));
app/src/Scalr/UI/Controller/Db/Manager.php:                    'private'        => "int.master.{$behavior}.{$dbFarmRole->GetFarmObject()->Hash}.scalr-dns.net",
app/src/Scalr/UI/Controller/Db/Manager.php:                    'public' => "ext.master.{$behavior}.{$dbFarmRole->GetFarmObject()->Hash}.scalr-dns.net"
app/src/Scalr/UI/Controller/Db/Manager.php:                    'private'        => "int.slave.{$behavior}.{$dbFarmRole->GetFarmObject()->Hash}.scalr-dns.net",
app/src/Scalr/UI/Controller/Db/Manager.php:                    'public' => "ext.slave.{$behavior}.{$dbFarmRole->GetFarmObject()->Hash}.scalr-dns.net"
app/src/Scalr/UI/Controller/Farms.php:                    'value' => "ext.master.{$dbMsr}.{$dbFarm->Hash}.scalr-dns.net"
app/src/Scalr/UI/Controller/Farms.php:                    'value' => "ext.slave.{$dbMsr}.{$dbFarm->Hash}.scalr-dns.net"
app/src/Scalr/UI/Controller/Farms.php:                    'value' => "int.master.{$dbMsr}.{$dbFarm->Hash}.scalr-dns.net"
app/src/Scalr/UI/Controller/Farms.php:                    'value' => "int.slave.{$dbMsr}.{$dbFarm->Hash}.scalr-dns.net"
app/src/Scalr/UI/Controller/Farms.php:                    'value' => "api.ext.cloudfoundry.{$dbFarm->Hash}.scalr-dns.net"
app/src/Scalr/UI/Controller/Dnszones.php:                        if (in_array($chkDmn, array('scalr.net', 'scalr.com', 'scalr-dns.net', 'scalr-dns.com')))
app/src/api/class.ScalrAPI_2_3_0.php:            $response->mysql->master->private = "int.master.mysql.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->mysql->master->public = "ext.master.mysql.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->mysql->slave->private = "int.slave.mysql.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->mysql->slave->public = "ext.slave.mysql.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->postgresql->master->private = "int.master.postgresql.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->postgresql->master->public = "ext.master.postgresql.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->postgresql->slave->private = "int.slave.postgresql.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->postgresql->slave->public = "ext.slave.postgresql.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->redis->master->private = "int.master.redis.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->redis->master->public = "ext.master.redis.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->redis->slave->private = "int.slave.redis.{$DBFarm->Hash}.scalr-dns.net";
app/src/api/class.ScalrAPI_2_3_0.php:            $response->redis->slave->public = "ext.slave.redis.{$DBFarm->Hash}.scalr-dns.net";
app/www/ui2/js/ui/services/mongodb/status.js:                           value: 'ext.mongo.' + moduleParams['farmHash'] + '.scalr-dns.net'
app/www/ui2/js/ui/services/mongodb/status.js:                           value: 'int.mongo.' + moduleParams['farmHash'] + '.scalr-dns.net'
app/www/ui2/js/ui/dbmsr/status.js:                              value: 'ext.master.' + moduleParams['dbType'] + '.' + moduleParams['farmHash'] + '.scalr-dns.net'
app/www/ui2/js/ui/dbmsr/status.js:                              value: 'ext.slave.' + moduleParams['dbType'] + '.' + moduleParams['farmHash'] + '.scalr-dns.net'
app/www/ui2/js/ui/dbmsr/status.js:                              value: 'int.master.' + moduleParams['dbType'] + '.' + moduleParams['farmHash'] + '.scalr-dns.net'
app/www/ui2/js/ui/dbmsr/status.js:                              value: 'int.slave.' + moduleParams['dbType'] + '.' + moduleParams['farmHash'] + '.scalr-dns.net'

Aatxe Urrutia

unread,
Jul 28, 2014, 9:33:38 PM7/28/14
to scalr-...@googlegroups.com
Noticed i forgot to update that my config I have the name server for my config.yml set to the vm nameserver managed by cloudstack, but i've realized as well that I should tripple check that config will do so and post back as I assume this reference to the code for scalr dns might be triggered by some key i am not aware of or perhaps as a fallback if it cannot post to the nameserver I have defined in my config.

Jeremy Koerber

unread,
Jul 30, 2014, 6:07:40 PM7/30/14
to scalr-...@googlegroups.com
Sorry, I haven't been able to work on this much lately, but I'm trying to get back to setting it all up in my lab. I see you found the hardcoded references to scalr-dns.net in the code. If you have everything set up correctly in config.yml for static DNS endpoints for DB servers, those should get used instead, but that is what I'm working on testing in the lab. But note that those static endpoints are only for DB servers if you have scalr.dns.static.enabled set to true. More info on that here:
https://scalr-wiki.atlassian.net/wiki/display/docs/Database+Servers#DatabaseServers-DatabaseEndpoints:ConnecttoYourDatabase
This is not required for just having scalr manage dynamic DNS endpoints via bind, which I believe you said you already have working. As soon as I can back to it, I'll be coming up with complete documentation on setting up BIND, and PowerDNS for static DB endpoints. I'll post it here when complete. This feature was written specifically for Hosted Scalr customers (thus the hardcoding), but I'm working on making it available to on-premise installs.

thanks,
Jeremy

Jeremy Koerber

unread,
Jan 5, 2015, 1:49:50 PM1/5/15
to scalr-...@googlegroups.com
Brian,
I know it's been a while since we discussed your BIND integration, but I wanted to check back in on this as I've recently put together a little walkthrough on configuring a typical BIND configuration. We've also made some fixes that should make BIND integration easier to manage. And on a related note, we're also working on expanding our AWS route 53 integration. Just let me know if you're interested in any further details around this.

Thanks,
Jeremy

Victor Canô

unread,
Jan 7, 2015, 1:27:17 PM1/7/15
to scalr-...@googlegroups.com
Hi Jeremy!

Do you have a link to this walkthrough on configuring Bind in Scalr?

Thanks!!

Jeremy Koerber

unread,
Jan 16, 2015, 8:09:02 PM1/16/15
to scalr-...@googlegroups.com
Hi Victor,
Sorry for the delay. I was just cleaning up the doc a bit and making sure some fixes had been applied. Here's the document. You're the first to get it, so please let me know how it goes.

Thanks,
Jeremy

ScalrDynamicDNSSetupInstructions.pdf
Reply all
Reply to author
Forward
0 new messages