Private DNS
- 2. 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
- 3. 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
- 4. 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
- 5. 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.1
www IN A 11.240.68.82
dev IN A 127.0.0.1
hlg IN A 11.243.4.72
prd 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.1
www IN A 11.240.68.82
dev IN A 127.0.0.1
hlg IN A 11.243.4.72
prd IN A 11.240.68.82
- 7. 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…
- 8. 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
- 12. Hoster usage
➜ brew install hoster
Install Hoster …
➜ hoster git:(master) ✗ hoster
usage: 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.br
127.0.0.1 local.pensecarros.com.br
127.0.0.1 local.m.pensecarros.com.br
127.0.0.1 local.m.penseimoveis.com.br
################### dev ###################
################### hlg ###################
10.243.4.72 hlg.penseimoveis.com.br
10.240.68.82 hlg.pensecarros.com.br
################### prod ###################
10.240.68.82 prd.pensecarros.com.br
10.240.68.82 prd.penseimoveis.com.br
➜ produto hoster apply --dev