keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… ·...
Transcript of keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… ·...
![Page 1: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/1.jpg)
Keeping Track of Stateful Infrastructure
![Page 3: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/3.jpg)
Serveradmin
DNS
Backup
Virtual MachineProvisioning
Puppet
LoadbalancersRouters
Hypervisors
VirtualMachines
![Page 4: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/4.jpg)
• Virtual Machine Orchestration • Puppet and Serveradmin • Loadbalancing Traffic • PowerDNS and Serveradmin
![Page 5: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/5.jpg)
![Page 6: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/6.jpg)
![Page 7: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/7.jpg)
cpu_modelstring
game_marketstring
![Page 8: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/8.jpg)
hypervisor
vm
cpu_modelstring
game_marketstring
![Page 9: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/9.jpg)
hypervisor
vm
cpu_modelstring
hostnamestring
game_marketstring
![Page 10: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/10.jpg)
hypervisor
vm
cpu_modelstring
hostnamestring
game_marketstring
hypervisorrelation
![Page 11: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/11.jpg)
hypervisor
vm
cpu_modelstring
hostnamestring
game_marketstring
hypervisorrelation
vmsreverse of hypervisor
![Page 12: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/12.jpg)
Attribute Value
servertype hypervisor
hostname hv1.example.com
vmsvm1.example.comvm2.example.comvm3.example.com
cpu_model L5640
Hypervisor Object VM Object
Attribute Value
servertype vm
hostname vm1.example.com
hypervisor hv1.example.com
game_market de
![Page 13: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/13.jpg)
E A V / C R
Attribute Value Relation
ServerObject
ServertypeObjecttype
![Page 14: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/14.jpg)
AdminapiThe Python Library
![Page 15: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/15.jpg)
from adminapi.dataset import Queryobj = Query().new_object(servertype='project')obj.update({ 'hostname': 'fosdem-example', 'responsible_admin': ['patrick.meyer'],})obj.commit()
![Page 16: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/16.jpg)
from adminapi.dataset import Queryfrom adminapi.filters import Anylist(Query( { 'project': 'tempolis', 'game_market': Any('xx', 'xy', 'xz') }, [ 'hostname', 'hypervisor' ]))
[DatasetObject({ 'hypervisor': 'aw-hv-009.ndco.ig.local', 'hostname': 'xx1db.tmp.ig.local', 'object_id': 55875,}, 55875)]
![Page 17: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/17.jpg)
from adminapi.dataset import Queryfrom adminapi.filters import Anylist(Query( { 'project': 'tempolis', 'game_market': Any('xx', 'xy', 'xz') }, [ ‘hostname', {'hypervisor': ['hostname', 'project']} ]))
[DatasetObject({ 'hypervisor': DatasetObject({ 'project': 'ndco', 'object_id': 10781, 'hostname': 'aw-hv-009.ndco.ig.local' }, 10781), 'object_id': 55875, 'hostname': 'xx1db.tmp.ig.local'}, 55875)]
![Page 18: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/18.jpg)
from adminapi.dataset import Queryfrom adminapi.filters import Regexpq = Query( { 'hostname': Regexp('fosdem[0-9]+.*') }, [ 'state' ])
for server in q: server['state'] = 'maintenance'
q.commit()
![Page 19: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/19.jpg)
from adminapi.dataset import Queryfrom adminapi.filters import Regexpserver = Query( { 'hostname': Regexp('fosdem1.*') }).get()
server.delete()server.commit()
![Page 20: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/20.jpg)
AdminapiThe Executable
![Page 21: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/21.jpg)
$ adminapi xx1db.tmp.ig.local -a hypervisoraw-hv-009.ndco.ig.local
$ ssh $(adminapi xx1db.tmp.ig.local -a hypervisor)aw-hv-009:~$
![Page 22: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/22.jpg)
$ adminapi hypervisor=aw-hv-009.ndco.ig.localserver1.project.ig.localserver23.project.ig.local server42.project.ig.local
$ polysh $(adminapi hypervisor=aw-hv-009.ndco.ig.local)ready (3)> cat /etc/debian_versionserver1.project.ig.local : 8.11server23.project.ig.local : 9.6 server42.project.ig.local : 9.6
![Page 23: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/23.jpg)
$ adminapi 'hostname=regexp(fosdem.*) responsible_admin=patrick.meyer'-a hostname -a hypervisorfosdem3.admin.ig.local aw-hv-009.ndco.ig.localfosdem4.admin.ig.local aw-hv-009.ndco.ig.local
![Page 24: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/24.jpg)
$ adminapi 'hostname=regexp(fosdem.*)'-a hostname -a state -o object_id-u 'state=maintenance'fosdem3.admin.ig.local maintenancefosdem4.admin.ig.local maintenance
![Page 25: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/25.jpg)
ServershellThe Webinterface
attr, delattr, setattr, inspect, edit, delete, history,
![Page 26: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/26.jpg)
![Page 27: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/27.jpg)
![Page 28: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/28.jpg)
![Page 29: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/29.jpg)
![Page 30: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/30.jpg)
![Page 31: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/31.jpg)
![Page 32: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/32.jpg)
![Page 33: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/33.jpg)
![Page 34: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/34.jpg)
![Page 35: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/35.jpg)
![Page 36: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/36.jpg)
![Page 37: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/37.jpg)
![Page 38: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/38.jpg)
![Page 39: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/39.jpg)
![Page 40: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/40.jpg)
![Page 41: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/41.jpg)
![Page 42: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/42.jpg)
![Page 43: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/43.jpg)
IGVMigvm build/delete vm_hostnameigvm migrate vm_hostname [hypervisor_hostname]igvm start/stop/restart vm_hostnameigvm disk-set vm_hostname sizeigvm mem-set vm_hostname sizeigvm vcpu-set vm_hostname countigvm evacuate hv_hostname
![Page 44: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/44.jpg)
IGVMigvm build/delete vm_hostnameigvm migrate vm_hostname [hypervisor_hostname]igvm start/stop/restart vm_hostnameigvm disk-set vm_hostname sizeigvm mem-set vm_hostname sizeigvm vcpu-set vm_hostname countigvm evacuate hv_hostname
from igvm.commands import vm_build, vcpu_setvm_build('fosdem4.admin.ig.local')vcpu_set('fosdem4.admin.ig.local', 8)
![Page 45: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/45.jpg)
• Virtual Machine Orchestration • Puppet and Serveradmin • Loadbalancing Traffic • PowerDNS and Serveradmin
![Page 46: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/46.jpg)
$db_addr = ig::server::query_one({ 'project' => 'west', 'game_market' => 'de', 'game_world' => 1, 'function' => 'db',}, 'intern_ip')
$project_networks = ig::server::query({ 'servertype' => 'project_network', 'project' => 'west',}, ['intern_ip', 'primary_ip6']).reduce([]) |$memo, $net| { $memo + [$net['intern_ip'], $net['primary_ip6']]}
![Page 47: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/47.jpg)
version: 5hierarchy: - name: ig::server data_hash: ig::server::hiera_backend options: restrict: [...] - hostname - intern_ip - loadbalancer: - hostname - object_id - intern_ip - primary_ip6 - protocol_port - route_network: - object_id - network_type [...]
![Page 48: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/48.jpg)
class ig::server ( [...] Ig::Server::Hostname $hostname, Ig::Inet $intern_ip, Array[Struct[{ ‘hostname' => Ig::Server::Hostname, ‘object_id' => Integer, ‘intern_ip' => Ig::Inet, ‘primary_ip6' => Optional[Ig::Inet6], ‘protocol_port' => Array[Pattern[/\A[a-z][a-z0-9]*\Z/]], ‘route_network' => Struct[{ 'object_id' => Integer, 'network_type' => String, }], }]] $loadbalancer = [], [...]
![Page 49: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/49.jpg)
define ig::helper::nrpe_command ( String[1] $command, Ig::Monitoring_check $check = $title,) { concat::fragment { "nrpe_command_${check}": target => $ig::software::nrpe::commands_conf, order => "${check}_0", content => "\ncommand[${check}] = ${command}", } if !($check in $ig::server::monitoring_checks) { ig::server::change_multi_attribute( $ig::server::object_id, 'monitoring_checks', [$check], # <- These will be added [] # <- These will be removed ) }}
![Page 50: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/50.jpg)
ig::helper::nrpe_command { 'cpu_steal_time': command => "${ig::software::igmonplugins::path}/check_cpu_steal_time.py",}
$ adminapi fosdem1.admin.ig.local -a monitoring_checks | \sed 's/\s\+/\n/g' | grep cpu_steal_timecpu_steal_time
![Page 51: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/51.jpg)
• Virtual Machine Orchestration • Puppet and Serveradmin • Loadbalancing Traffic • PowerDNS and Serveradmin
![Page 52: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/52.jpg)
App Servers
Requests
Replies
Req
uests
Rep
lies
HardwareLoadbalancers
Requests
Replies
![Page 53: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/53.jpg)
App Servers
Requests
Replies Req
uests
Rep
lies
HardwareLoadbalancers
Requests
![Page 54: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/54.jpg)
loadbalancer
vm loadbalancerrelation
health_check health_checkrelation
protocol_portstring, multi
intern_ipipv4 address
![Page 55: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/55.jpg)
Attribute Value
servertype loadbalancer
intern_ip 212.72.191.57
protocol_port tcp443tcp80
health_check https.west.hc
Web loadbalancer
Attribute Value
hc_type https
hc_port 443
hc_query HEAD /api/health_check
hc_ok_codes 242
HTTPS Health
![Page 56: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/56.jpg)
Repmgr Master
Attribute Value
hc_type postgres
hc_port 5432
hc_query SELECT lb_check_write()
hc_user loadbalancer
DB Loadbalancer
Attribute Value
servertype loadbalancer
intern_ip 10.43.8.1
protocol_port tcp5432
health_check postgres.west.hc
![Page 57: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/57.jpg)
• Virtual Machine Orchestration • Puppet and Serveradmin • Loadbalancing Traffic • PowerDNS and Serveradmin
![Page 58: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/58.jpg)
CREATE TABLE records ( id BIGSERIAL PRIMARY KEY, domain_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, type VARCHAR(10) DEFAULT NULL, content VARCHAR(65535) DEFAULT NULL, ttl INT DEFAULT NULL, [...]);
![Page 59: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/59.jpg)
create or replace view dns_internal.records as select server.hostname::text as name, case family(server.intern_ip) when 4 then 'A'::text else 'AAAA'::text end as type, host(server.intern_ip) as content from public.server where server.intern_ip is not null[...]
CREATE TABLE records ( id BIGSERIAL PRIMARY KEY, domain_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, type VARCHAR(10) DEFAULT NULL, content VARCHAR(65535) DEFAULT NULL, ttl INT DEFAULT NULL, [...]);
![Page 60: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/60.jpg)
create or replace view dns_internal.records as[...]union all select server.hostname::text as name, 'SSHFP'::text as type, attribute.value::text as content from public.server join public.server_string_attribute as attribute using (server_id) where server.intern_ip is not null and attribute.attribute_id = ‘sshfp'union all[...]
![Page 61: keeping track of stateful infrastructure › 2019 › schedule › event › keeping_track_s… · Puppet Loadbalancers Routers Hypervisors Virtual Machines • Virtual Machine Orchestration](https://reader033.fdocuments.in/reader033/viewer/2022060407/5f0f9a3f7e708231d444fa6d/html5/thumbnails/61.jpg)
#serveradmin on Freenode github.com/innogames/serveradmin github.com/innogames/igvm github.com/innogames/testtool github.com/innogames/polysh