codenize-tools / roadworker Goto Github PK
View Code? Open in Web Editor NEWRoadworker is a tool to manage Route53. It defines the state of Route53 using DSL, and updates Route53 according to DSL.
License: MIT License
Roadworker is a tool to manage Route53. It defines the state of Route53 using DSL, and updates Route53 according to DSL.
License: MIT License
This update is a big improvement to stability, if you have time to try it out and report any issues that would be great.
We are using your tool since years and it never failed for us.
There were times we were managing over 700 dns entries over this tool and it just worked!
Still using it for about 200 dns entries :)
Last year we tried to migrate to terraform because we thought one tool less. This tool is still THE TOOL to manage aws dns records in code and i do not want to miss it. It is so fast and it is easy to remove / add some parts of DNS which is for us very important.
THANK YOU so much! - Really enjoying it.
Greetings, Thomas
使い方に関して教えてください
複数管理しているドメインのうち、一つだけをapplyするときに--target-zone をREGEXP記述すると
No change
となって、更新にならないのですが--target-zoneのドメインをREGEXP記述ではなく""で囲って書けば実行できました。
※exportの際はREGEXPでも""でもOKでした
今後は""の記述に統一したほうが良いでしょうか?
I just have a quick question.
Domain Name | Type |
---|---|
example.com | Public |
example.com | Private |
$ roadwork -e -o Routefile --split
The command above exported Routefile
and one example.com.route
file.
# -*- mode: ruby -*-
# vi: set ft=ruby :
require 'example.com.route'
require 'example.com.route'
# -*- mode: ruby -*-
# vi: set ft=ruby :
hosted_zone "example.com." do
vpc "region", "vpc-id"
some private hosted zone's records...
end
I guess the example.com.route
file for private hosted zone's overwrote the public one.
Are there any workaround?
Routefile is a Ruby DSL.
I want to vim Syntax Highlighting Support like a Vagrantfile.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Hi,
I would like to kindly propose a feature request for Roadworker.
I would like to use Roadworker to do backup of Route53 from an AWS Lambda function, and I have gotten Roadworker to load (using Traveling Ruby and by following these instructions). So far, so good.
However, I wasn't aware that it's not possible to use UDP from within the Lambda environment, and that Roadworker seems to do that. Which leaves me with a stacktrace that looks like below:
/var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/lib/roadworker/dsl-tester.rb:12:in``initialize': Operation not permitted - socket(2) - udp (Errno::EPERM) from /var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/lib/roadworker/dsl-tester.rb:12:in``new' from /var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/lib/roadworker/dsl-tester.rb:12:in``block in <top (required)>' from /var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/lib/roadworker/dsl-tester.rb:20:in``call' from /var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/lib/roadworker/dsl-tester.rb:20:in``<top (required)>' from /var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/lib/roadworker.rb:24:in
require'
from /var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/lib/roadworker.rb:24:in <top (required)>' from /var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/bin/roadwork:4:in
require'
from /var/task/lib/vendor/ruby/2.2.0/gems/roadworker-0.5.6/bin/roadwork:4:in <top (required)>' from /var/task/lib/vendor/ruby/2.2.0/bin/roadwork:23:in
load'
from /var/task/lib/vendor/ruby/2.2.0/bin/roadwork:23:in <main>'
I believe that having a flag that disables testing (or don't open a UDP socket in dsl-tester.rb when testing isn't specified) might enable Roadworker to be used from within Lambda -- which is a pretty sweet use case nowadays.
It's probably not too complicated to implement, but with regards to Ruby, I'm very much a simpleton. It's not likely that I can do a PR in a clean, idiomatic way.
Thanks in advance.
/ Henning
(Original author: takus)
Hi,
I set a NS record with 172800 TTL like the attached image, but generated Routefile became like this:
![route_53_management_console](https://cloud.githubusercontent.com/assets/117768/3710026/92137cd0-146d-11e4-8335-5e46727076d1.png)
rrset "example.com.", "NS" do
ttl 3600
resource_records(
"ns-1.awsdns-1.net.",
"ns-2.awsdns-2.co.uk.",
"ns-3.awsdns-3.org.",
"ns-4.awsdns-4.com."
)
end
According to the following result, Route53 API returns TTL correctly.
$ aws route53 list-resource-record-sets --hosted-zone-id xxxxxxxx
{
...
"IsTruncated": false,
"ResourceRecordSets": [
{
"ResourceRecords": [
{
"Value": "ns-1.awsdns-1.net."
},
{
"Value": "ns-2.awsdns-2.co.uk."
},
{
"Value": "ns-3.awsdns-3.org."
},
{
"Value": "ns-4.awsdns-4.com."
}
],
"Type": "NS",
"Name": "example.com.",
"TTL": 172800
},
...
}
We have a zone apex record that needs to point to an ELB on another account (that we do not control or have credentials for).
The way route53-ext
resolves ELBs does not handle this case, and we end up receiving the "Cannot find ELB" error due to this (which breaks the DNS update).
I can see two obvious solutions
a) fix the root cause (I tried monkeypatching around it, but was unsuccessful)
b) provide a way to tell roadworker to ignore a given record - in this case I would just leave the ALIAS record in Route 53, and roadworker would be told to just ignore it when generating the change list / applying change list.
Hi,
It seems that v0.5.7 is still in beta release. Do you have any concerns about v0.5.7.beta3? I'd like to manage ALB records by Roadworker, but it is not supported in v0.5.6.
$ bundle exec roadwork -a
[ERROR] RuntimeError: Cannot find ELB: dualstack.xxx.ap-northeast-1.elb.amazonaws.com
Starting with Ruby 3.2 the gem does not work anymore due to parsing errors of the AWS API responses.
I tracked down the problem to the patching of the String
class.
This PR fixes the problem by introducing the colorize
gem in favor of the monkey-patching.
Hi
In my environment, though there is actually no diffs, the routefile is determined as has difference from actual record.
And creates new health-check every time.
0.5.6.beta6
Definition in the Routefile:
rrset "XXX.YYY.com", "A" do
set_identifier "foo-bar"
failover "PRIMARY"
health_check "https://XXXXX/yyy",
request_interval: 10,
failure_threshold: 3,
enable_sni: true
dns_name "XXXXXXX"
output:
Apply `Routefile` to Route53
Update ResourceRecordSet: XXX.YYY.com. A (foo-bar)
health_check:
:failure_threshold=>3,
:measure_latency=>false,
:inverted=>false,
+ :child_health_checks=>[],
:enable_sni=>true}
At first I thought this is a issue of child_health_checks
parameter, but was not so.
I investigated and modified the code as below.
--- a/lib/roadworker/dsl.rb
+++ b/lib/roadworker/dsl.rb
@@ -181,10 +181,13 @@ def health_check(url, options = {})
:measure_latency => :measure_latency,
:inverted => :inverted,
:enable_sni => :enable_sni,
+ :regions => :regions,
}.each do |option_key, config_key|
config[config_key] = options[option_key] unless options[option_key].nil?
end
+ config[:regions] ||= []
+
if config.search_string
config.type += '_STR_MATCH'
end
Then it seems worked well.
ref: http://docs.aws.amazon.com/sdkforruby/api/Aws/Route53/Types/HealthCheckConfig.html
Hi,
Could you release the latest version (v0.5.8) gem? I'd like to use ignore_under
method without the definition of github url
in my Gemfile.
Hey there,
using your tool since some years and really in love with it. It is fast and save and never caused any problems. Due to our high amount of DNS records we are not able to use terraform as it is slow and we would not see if any new records were created through API. It fits our need perfectly.
Every release makes me happy.
Could you add a CHANGELOG file, so i can quickly see the new features without going through PRs and commits?
Thanks a lot for all of your work and Greetings, Thomas
Hi, Roadworker developers.
I'm Oguma.
Thank you for your gem of this.
I'm the following proposal for ruby 2.4 support.
Would you stop using net-dns on which roadworker depends?
https://github.com/codenize-tools/roadworker/blob/master/roadworker.gemspec#L24
I discover problems at dependency gem the by including it.
ex)
/Users/k-oguma/work/repos/mercari-dns/vendor/bundle/ruby/2.4.0/gems/net-dns2-0.8.7/lib/net/dns/rr/classes.rb:35: warning : constant :: Fixnum is deprecated
This gem is following Authors, the administrator of this gem in the Rubygem cannot find out no matter how much it searches.
https://github.com/kouzoh/net-dns3#authors-original-net-dns2
Also, I think this author can not resurrect net-dns to Rubygem.
The following two authors's Github users etc were found.
Mr. @weppos
https://github.com/weppos
https://twitter.com/weppos
^ But it seems not to be involved in net-dns anymore
Mr. @bluemonk
https://github.com/bluemonk
^ He is out of communication.
Recent activity on Github also could not be seen.
Thank you.
it would be super useful to have a domain name as an argument to limit the operations on that domain only.
Sorry, for not providing a pr.
aws/aws-cli generated config file can switch profile specifying as follows:
$ aws --profile foo ec2 describe-instances
I would like to use this file ~/.aws/config
and profile option like this:
$ roadwork --profile foo -a -f Routefile
Commonly you'll have stuff like:
hosted_zone 'example.com.' do
rrset 'asdf.test.example.com.', 'CNAME' do
resource_records('example.net')
end
rrset 'qwerty.test.example.com.', 'CNAME' do
resource_records('example.net')
end
rrset 'foo.test.example.com.', 'CNAME' do
resource_records('example.net')
end
rrset 'bar.test.example.com.', 'CNAME' do
resource_records('example.net')
end
end
What do you think to something like this:
hosted_zone 'example.com.' do
subdomain 'test.example.com.' do
rrset 'asdf.', 'CNAME' do
resource_records('example.net')
end
rrset 'qwerty.', 'CNAME' do
resource_records('example.net')
end
rrset 'foo.', 'CNAME' do
resource_records('example.net')
end
rrset 'bar.', 'CNAME' do
resource_records('example.net')
end
end
end
And you could nest them too:
hosted_zone 'example.com.' do
subdomain 'example.com.' do
subdomain 'test.' do
rrset 'asdf.', 'CNAME' do
resource_records('example.net')
end
end
rrset '.', 'A' do
resource_records('example.net')
end
end
end
The require
function exposed always works from the location of the Routefile
, whereas a normal Ruby require runs from the location of the file it is called from.
For example:
Routefile
require './src/example.com'
src/_shared.rb
def whatever
end
src/example.com.rb
require './_shared' # fails
require './src/_shared' # works
This behavior is not correct to the usual Ruby behavior. Is there any particular reason that the Routefile 'fakes' require
, rather than just allowing it to be run by the usual Ruby method?
Currently, Route 53 test is not working well, so fix it...
Seems like a fairly common use-case that you almost always use the same TTL:
default_ttl 3600
hosted_zone 'example.com.' do
# blah blah blah
end
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.