route53_aliaser 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4a21547d3908c6cbfd826ee93a4106990a1981f
4
- data.tar.gz: a04a1405caa9e0360bc58636ce59ae498d748129
3
+ metadata.gz: 7ab9ef8a372dec5ffad110b0cf3a2a629e52a282
4
+ data.tar.gz: 81bceee8f1616015be7bb1293c6878ef7d4b31e9
5
5
  SHA512:
6
- metadata.gz: 2be90ca647c63d0947cb0792288a6431b0abf1d5b4cc11b4b04067663bc634687b676444c36e88ffe597f162067b5a94490cd08e1c2d94c25200155e5bc4bcd1
7
- data.tar.gz: c777416c75e594a442eeb918460b6648df5d61a7a52b18f812970e264f14f99fb6063209e4187c1e23d2b552fabf2ecdddef4270c81079fc3fa32f9595447162
6
+ metadata.gz: ffcbbd229e0f23783945ab7a0b731dedc3482f2493df79442392a8f7207c55633c685a4ef0203dc972b490cd3dbc41489be6cc07243ca3ab4d7383331a585fc4
7
+ data.tar.gz: fb6d97fae28e055d8514682ec9c466678f107672d5eaa1466b541394fcf26304a641c113cee872084635e9f45bb0c67d26b59baddbe0c3f696ef5580a0b90de7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # Route53Aliaser 0.0.3
2
+ - increase log verbosity on NOOP and Matches (helps to provide assurance that
3
+ we're doing *something*)
4
+ - improve documentation
5
+
1
6
  # Route53Aliaser 0.0.2
2
7
  - add Rails Engine support
3
8
  - use Rails.cache when Rails is defined
data/README.md CHANGED
@@ -1,15 +1,22 @@
1
1
  # Route53Aliaser
2
2
 
3
- Simulate DNS ALIAS-record support for [apex
4
- zones](https://devcenter.heroku.com/articles/apex-domains) (a.k.a. bare / naked / root
5
- domains) via Amazon [Route 53](https://aws.amazon.com/route53/).
6
-
7
- This is useful because Heroku doesn't support these so-called naked domains
8
- and there are a limited number of DNS providers who support the [ALIAS
9
- record](http://support.dnsimple.com/articles/alias-record/) type (which is
10
- essentially a CNAME record set on the root domain, that typically must be an
11
- A-Record). Amazon Route 53 only supports ALIASes to a few specific types of
12
- records, which doesn't solve the problem for Heroku users who require SSL.
3
+ Simulate DNS ALIAS-Record support for [apex
4
+ zones](https://devcenter.heroku.com/articles/apex-domains) (a.k.a. bare /
5
+ naked / root domains) via Amazon [Route 53](https://aws.amazon.com/route53/)
6
+ by looking for changes to the CNAME you'd like to point to and updating your
7
+ A-Record via the Route 53 APIs.
8
+
9
+ Just point your ping monitor at the engine URL and you're good to go! Your
10
+ A-Record will remain in sync with whatever CNAME you point it at.
11
+
12
+ This is useful because some providers (like Heroku) don't support these
13
+ so-called naked domains and there are a limited number of DNS providers who
14
+ support the [ALIAS record](http://support.dnsimple.com/articles/alias-record/)
15
+ type (which is essentially a fake CNAME record set on the root domain; fake
16
+ because you [cannot have a CNAME at the
17
+ apex](http://serverfault.com/questions/613829/why-cant-a-cname-record-be-used-at-the-apex-of-a-domain)).
18
+ Amazon Route 53 only supports ALIASes to a few specific types of records,
19
+ which doesn't solve the problem for Heroku users who require SSL.
13
20
 
14
21
  This code will:
15
22
 
@@ -21,8 +28,6 @@ This code will:
21
28
  domain)
22
29
  - If the Target and Source addresses differ, update the `target_record`
23
30
 
24
- The updates are easily triggered by polling a URL in your application that is
25
- mounted via a Rails Engine.
26
31
 
27
32
  ## Installation
28
33
 
@@ -38,6 +43,7 @@ Or install it yourself as:
38
43
 
39
44
  $ gem install route53_aliaser
40
45
 
46
+
41
47
  ## Usage
42
48
 
43
49
  #### With Rails
@@ -67,15 +73,20 @@ Finally, set up something to ping this URL occasionally:
67
73
 
68
74
  $ curl https://example.com/route53-update
69
75
 
70
- Heroku's [free scheduler](https://devcenter.heroku.com/articles/scheduler) has
71
- an "every 10 minutes" option that'd be great for this. Just put the curl
72
- command in there. Note that Heroku charges dyno hours for scheduled jobs; if
73
- you're worried about this then you may prefer to use the "once an hour" option
74
- instead.
75
-
76
- You could also ping that URL via a free service like
76
+ The easiest way to do this is to ping that URL via a free service like
77
77
  [Pingdom](http://www.pingdom.com/free). Since the DNS lookups are cached, most
78
- of the time requests to this URL will return nearly instantly.
78
+ of the time requests to this URL will return nearly instantly. Pingdom
79
+ defaults to checking once per minute, which should be within even the shortest
80
+ TTLs.
81
+
82
+ Heroku's [free scheduler](https://devcenter.heroku.com/articles/scheduler) has
83
+ an "every 10 minutes" option that could also be used for this. Just put the
84
+ curl command in there. Note that Heroku
85
+ [charges](https://devcenter.heroku.com/articles/usage-and-billing) dyno hours
86
+ for scheduled jobs; if you're worried about this then you may prefer to use
87
+ the "once an hour" option instead. The downside to this approach is that the
88
+ further you stretch out the update interval the more likely you are to end up
89
+ with an out of date A-Record.
79
90
 
80
91
  #### Without Rails
81
92
 
@@ -99,6 +110,7 @@ have a better idea. Here are a couple alternatives:
99
110
  not in a separate thread) in a controller action is not recommended since
100
111
  DNS lookups / AWS calls might be slow & will block the request to your page.
101
112
 
113
+
102
114
  ## Contributing
103
115
 
104
116
  So far, this is being used against a limited number of configurations so
@@ -13,7 +13,7 @@ module Route53Aliaser
13
13
  def call
14
14
  unless stale?
15
15
  # NOOP if we haven't expired
16
- config.logger.debug "Route53Aliaser: NOOP because cache is fresh"
16
+ config.logger.info "Route53Aliaser: NOOP because cache is fresh"
17
17
  return
18
18
  end
19
19
 
@@ -21,7 +21,7 @@ module Route53Aliaser
21
21
  source_ips = get_ips(config.source_record, config.source_key)
22
22
 
23
23
  if target_ips == source_ips
24
- config.logger.debug "Route53Aliaser: No Route 53 Update required (Target IPs match the Source IPs)"
24
+ config.logger.info "Route53Aliaser: No Route 53 Update required (Target IPs match the Source IPs)"
25
25
  else
26
26
  config.logger.info "Route53Aliaser: IPs for #{config.target_record} #{target_ips} differ from #{config.source_record} #{source_ips}; will attempt to update"
27
27
  rt53 = Route53Updater.new(config)
@@ -1,3 +1,5 @@
1
+ # AWS::Route53 API docs:
2
+ # http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/Route53.html
1
3
  module Route53Aliaser
2
4
  class Route53Updater
3
5
  attr_reader :config
@@ -1,3 +1,3 @@
1
1
  module Route53Aliaser
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: route53_aliaser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Dlugosz