privateDNS how to find things in the caos 1 @iuriandre azza / iuri.andr eazza
Base Structure• DNS Server
• Bind9 (*nix servers)
• Enviroment Separation
• dev.pense(imoveis|carros).com.br
• hlg.pense(imoveis|carros).com.br
• prd.pense(imoveis|carros).com.br
• It’s needed someone to maintain the resolution tables from the DNS Server
Applying• VM DNS Server
• Networking layout
• Need to change DNS Server with dev,testers and analysts machines
• Can test resolution names inside the network
• Fixed inside a network specific
• The project cannot be moved easily
DNS Server• It’s a dificult job to start and maintain
• Bind9 it’s great to work
• A little bit difficult to configure inside a network
• it’s needed to apply at root Domain Controllers
• Dificult inside an already deployed structure
• Need to configure root master and work as slave
DNS Server➜ bind tail -f named.conf zone "penseimoveis.com" { type master; file "/etc/bind/db.penseimoveis.com";
allow-transfers {slaves};};
zone "penseicarros.com" { type master; file “/etc/bind/db.pensecarros.com";
allow-transfers {slaves};};
➜ bind9 start
; penseimoveis.com.br$TTL 604800@ IN SOA ns1.penseimoveis.com.br. root.penseimoveis.com.br. ( 2006020201 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800); Negative Cache TTL;@ IN A 10.0.0.1www IN A 11.240.68.82dev IN A 127.0.0.1hlg IN A 11.243.4.72prd IN A 11.240.68.82
; pensecarros.com.br$TTL 604800@ IN SOA ns1.pensecarros.com.br. root.pensecarros.com.br. ( 2006020201 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800); Negative Cache TTL;@ IN A 11.0.0.1www IN A 11.240.68.82dev IN A 127.0.0.1hlg IN A 11.243.4.72prd IN A 11.240.68.82
Dev-ops in operation!• There’s need to work with DNS Server?
• Deploy Cycle, all the server need to know the DNS Servers
• The project configuration can be re-deployable?
• It has structure dependency!
• If you need to change project from network you loose all the routes
• We need a change to allow the redistribution of the projects.
• Need to think more distributed…
Our Needs• Need to redistribute the server structure easily
• Context aware deployment project
• Git inspired
• Project
• https://github.com/iuriandreazza/hoster
• OpenSource
• Creator: @heliomedeiros
• Currently has: 3 forks, made with shell scripts and going to ruby to perform better
Hoster usage➜ brew install hosterInstall Hoster …➜ hoster git:(master) ✗ hosterusage: hoster [--help] [--version] <command> [<args>]
The most commonly used hoster commands are add Add a new HOST to current repository into a specific environment. edit Open the host file defined to be used. init Create an empty host repository in the current folder. list List all hosts for a specific project.
➜ hoster git:(master) ✗ hoster add 127.0.0.1 local.penseimoveis.com.br --local➜ hoster git:(master) ✗ hoster add 127.0.0.1 local.pensecarros.com.br --local➜ hoster git:(master) ✗ hoster add 127.0.0.1 local.m.pensecarros.com.br --local➜ hoster git:(master) ✗ hoster add 127.0.0.1 local.m.penseimoveis.com.br --local➜ hoster git:(master) ✗ hoster add 10.243.4.72 hlg.penseimoveis.com.br --hlg➜ hoster git:(master) ✗ hoster add 10.243.4.72 hlg.pensecarros.com.br --hlg➜ hoster git:(master) ✗ hoster add 10.240.68.82 prd.pensecarros.com.br --prd➜ hoster git:(master) ✗ hoster add 10.240.68.82 prd.penseimoveis.com.br --prd
➜ produto hoster list ################### lcl ################### 127.0.0.1 local.penseimoveis.com.br127.0.0.1 local.pensecarros.com.br127.0.0.1 local.m.pensecarros.com.br127.0.0.1 local.m.penseimoveis.com.br################### dev ###################
################### hlg ################### 10.243.4.72 hlg.penseimoveis.com.br10.240.68.82 hlg.pensecarros.com.br################### prod ################### 10.240.68.82 prd.pensecarros.com.br10.240.68.82 prd.penseimoveis.com.br➜ produto hoster apply --dev