SlideShare a Scribd company logo
1 of 9
Download to read offline
I n t e r m a x G r o u p
Automatisch deployen van VMs
• Standaardisatie
• Tijdwinst
• Volledig operationele opleverbare VM
I n t e r m a x G r o u p
Startpunt: handmatig & foutgevoelig!
I n t e r m a x G r o u p
De oplossing
I n t e r m a x G r o u p
• PXE technologie
• Simpel te configureren
• Voorspelbaar
• Beheersbaar
• Veel updates
• 153 developers op
GitHub
• Marktleider
• Goede leesbaarheid van code
• Python
• RedHat
• Open Source
• Veelgebruikt (volwassen)
• Snel op te zetten
• Gratis tool
Bizway criteria
Eindresultaat; technisch
I n t e r m a x G r o u p
Eindresultaat; organisatorisch
• Tijdwinst 80%
• Verplichte standaardisatie
• Minder foutgevoelig
• Begin vandaag, over een jaar is het volledig opgebouwd
I n t e r m a x G r o u p
Cobbler hoe dan?
I n t e r m a x G r o u p
VM aanmaken in Proxmox – Mac adres uitlezen vanuit aangemaakte VM.
Daarna cobbler aanroepen via SSH
$pxe_ip, '22', '/root/create.sh ' . $_POST['server_hostname'] . ' ' . $_POST['server_ip'] . ' ' . $info_wan[1] . ' '
. $info_wan[0] . ' ' . $_POST['server_intern_ip'] . ' ' . $mac_output[1] . ' ' . $subnet_lan
cobbler system remove --name=$1 > /dev/null 2>&1
cobbler system add --name=$1 --profile=CentOS-7-x86_64 --hostname=$1 --interface=eth0 --ip-address=$2
--static=1 --gateway=$3 --subnet=$4 --name-servers="8.8.8.8 8.8.4.4" > /dev/null 2>&1
cobbler system edit --name=$1 --interface=eth1 --ip-address=$5 --name-servers="8.8.8.8 8.8.4.4" --mac-
address=$6 --static=1 --subnet=$7 > /dev/null 2>&1
/etc/init.d/cobblerd restart > /dev/null 2>&1
cobbler sync > /dev/null 2>&1
Ansible hoe dan?
I n t e r m a x G r o u p
….
#Hij wacht 720 seconden tot de host, anders faalt de taak en ook de playbook
- name: wachten op pxe deployment
wait_for: "host={{ new_ip }} port=22 delay=15 state=started timeout=720"
#pingt intern IP van de host vanuit Ansible
- name: check_ping_eth0
shell: >
ping -c 2 {{ new_ip }}
tags: pingtest
ignore_errors: yes
register: check_ping_eth0
#pingt extern IP van de host vanuit Ansible
- name: check_ping_eth1
shell: >
ping -c 2 {{ server_ip }}
tags: pingtest
ignore_errors: yes
register: check_ping_eth1
#stuurt positieve melding naar API als ping geslaagd is
#zegt tegen api dat addhost role klaar is (ook als een taak fout ging)
- name: variables toevoegen aan host_variablefile
lineinfile:
dest:
"/deployment/environments/host_vars/{{ new_ip
}}"
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
with_items:
- { regexp: "^---", line: "---" }
- { regexp: "^dauser:", line: "dauser:……. ;)" }
- { regexp: "^dalicense:", line: "dalicense: {{
dalicense }}" }
- { regexp: "^server_id:", line: "server_id: {{
server_id }}" }
- { regexp: "^server_hostname:", line:
"server_hostname: {{ server_hostname }}" }
Vragen?
https://nl.linkedin.com/in/bartlageweg
bart@bizway.nl
I n t e r m a x G r o u p

More Related Content

Similar to Bart Lageweg - Ansible/Cobbler

Workshop: Introductie tot Python
Workshop: Introductie tot PythonWorkshop: Introductie tot Python
Workshop: Introductie tot PythonVincent Claes
 
Projectpaas drupaljam 2013 rotterdam
Projectpaas drupaljam 2013 rotterdamProjectpaas drupaljam 2013 rotterdam
Projectpaas drupaljam 2013 rotterdamBert Boerland
 
Linux command-line-magic-jdnl15
Linux command-line-magic-jdnl15Linux command-line-magic-jdnl15
Linux command-line-magic-jdnl15Peter Martin
 
Nagios Open Source Monitoring
Nagios Open Source MonitoringNagios Open Source Monitoring
Nagios Open Source Monitoring247 Invest
 
PFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsPFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsRichard Tuin
 
Robot framework en Browser Library
Robot framework en Browser LibraryRobot framework en Browser Library
Robot framework en Browser Librarychristiantester
 
De 10 geboden van WordPress Development
De 10 geboden van WordPress DevelopmentDe 10 geboden van WordPress Development
De 10 geboden van WordPress DevelopmentFloris Lof
 
Oracle Database Appliances, how to install, patch and manage them
Oracle Database Appliances, how to install, patch and manage themOracle Database Appliances, how to install, patch and manage them
Oracle Database Appliances, how to install, patch and manage themMark Koreman
 
Rf meetup 20210412 robo_con
Rf meetup 20210412 robo_conRf meetup 20210412 robo_con
Rf meetup 20210412 robo_conchristiantester
 
V-ICT-OR Shopt-IT 2015
V-ICT-OR Shopt-IT 2015V-ICT-OR Shopt-IT 2015
V-ICT-OR Shopt-IT 2015V-ICT-OR
 
DigiPinguïns: pakketbeheer, softwarebronnen, source code compileren (Bernard...
DigiPinguïns: pakketbeheer, softwarebronnen, source code compileren (Bernard...DigiPinguïns: pakketbeheer, softwarebronnen, source code compileren (Bernard...
DigiPinguïns: pakketbeheer, softwarebronnen, source code compileren (Bernard...Avansa Mid- en Zuidwest
 
MediaMosa Installatie & Configuratie
MediaMosa Installatie & ConfiguratieMediaMosa Installatie & Configuratie
MediaMosa Installatie & ConfiguratieMediaMosa
 
Html5 jeugdwerknet
Html5 jeugdwerknetHtml5 jeugdwerknet
Html5 jeugdwerknetHans Rossel
 
OpenESB -- Hello World Intor
OpenESB -- Hello World IntorOpenESB -- Hello World Intor
OpenESB -- Hello World Intorpappavis
 
Website-tool: CMS of Framework
Website-tool: CMS of FrameworkWebsite-tool: CMS of Framework
Website-tool: CMS of FrameworkNils Breunese
 
Van glazen bol naar raam - Monitor je product
Van glazen bol naar raam - Monitor je product Van glazen bol naar raam - Monitor je product
Van glazen bol naar raam - Monitor je product Eddy Bruin
 

Similar to Bart Lageweg - Ansible/Cobbler (20)

Workshop: Introductie tot Python
Workshop: Introductie tot PythonWorkshop: Introductie tot Python
Workshop: Introductie tot Python
 
Projectpaas drupaljam 2013 rotterdam
Projectpaas drupaljam 2013 rotterdamProjectpaas drupaljam 2013 rotterdam
Projectpaas drupaljam 2013 rotterdam
 
Linux command-line-magic-jdnl15
Linux command-line-magic-jdnl15Linux command-line-magic-jdnl15
Linux command-line-magic-jdnl15
 
Nagios Open Source Monitoring
Nagios Open Source MonitoringNagios Open Source Monitoring
Nagios Open Source Monitoring
 
PFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele testsPFZ Workshop - Automatiseren van functionele tests
PFZ Workshop - Automatiseren van functionele tests
 
Robot framework en Browser Library
Robot framework en Browser LibraryRobot framework en Browser Library
Robot framework en Browser Library
 
De 10 geboden van WordPress Development
De 10 geboden van WordPress DevelopmentDe 10 geboden van WordPress Development
De 10 geboden van WordPress Development
 
Oracle Database Appliances, how to install, patch and manage them
Oracle Database Appliances, how to install, patch and manage themOracle Database Appliances, how to install, patch and manage them
Oracle Database Appliances, how to install, patch and manage them
 
Rf meetup 20210412 robo_con
Rf meetup 20210412 robo_conRf meetup 20210412 robo_con
Rf meetup 20210412 robo_con
 
V-ICT-OR Shopt-IT 2015
V-ICT-OR Shopt-IT 2015V-ICT-OR Shopt-IT 2015
V-ICT-OR Shopt-IT 2015
 
Robocon @ Immune-it
Robocon @ Immune-itRobocon @ Immune-it
Robocon @ Immune-it
 
DigiPinguïns: pakketbeheer, softwarebronnen, source code compileren (Bernard...
DigiPinguïns: pakketbeheer, softwarebronnen, source code compileren (Bernard...DigiPinguïns: pakketbeheer, softwarebronnen, source code compileren (Bernard...
DigiPinguïns: pakketbeheer, softwarebronnen, source code compileren (Bernard...
 
Beginnen met PHP
Beginnen met PHPBeginnen met PHP
Beginnen met PHP
 
MediaMosa Installatie & Configuratie
MediaMosa Installatie & ConfiguratieMediaMosa Installatie & Configuratie
MediaMosa Installatie & Configuratie
 
Html5 jeugdwerknet
Html5 jeugdwerknetHtml5 jeugdwerknet
Html5 jeugdwerknet
 
Een goede DEV omgeving opzetten
Een goede DEV omgeving opzettenEen goede DEV omgeving opzetten
Een goede DEV omgeving opzetten
 
OpenESB -- Hello World Intor
OpenESB -- Hello World IntorOpenESB -- Hello World Intor
OpenESB -- Hello World Intor
 
Hands on presentatie
Hands on presentatieHands on presentatie
Hands on presentatie
 
Website-tool: CMS of Framework
Website-tool: CMS of FrameworkWebsite-tool: CMS of Framework
Website-tool: CMS of Framework
 
Van glazen bol naar raam - Monitor je product
Van glazen bol naar raam - Monitor je product Van glazen bol naar raam - Monitor je product
Van glazen bol naar raam - Monitor je product
 

More from Splend

Fiber Vakdag 2019 - Gerben Roseboom - MapXact
Fiber Vakdag 2019 - Gerben Roseboom - MapXactFiber Vakdag 2019 - Gerben Roseboom - MapXact
Fiber Vakdag 2019 - Gerben Roseboom - MapXactSplend
 
Fiber Vakdag 2019 - Lex Wils - FCA
Fiber Vakdag 2019 - Lex Wils - FCAFiber Vakdag 2019 - Lex Wils - FCA
Fiber Vakdag 2019 - Lex Wils - FCASplend
 
Martin Pels - NLNog ring
Martin Pels - NLNog ringMartin Pels - NLNog ring
Martin Pels - NLNog ringSplend
 
Wido den Hollander - IPv6
Wido den Hollander - IPv6Wido den Hollander - IPv6
Wido den Hollander - IPv6Splend
 
Pim van Stam - BGP
Pim van Stam - BGPPim van Stam - BGP
Pim van Stam - BGPSplend
 
6projects - Eyle Brinkhuis - SURFnet - Virtuele Netwerkfuncties
6projects - Eyle Brinkhuis - SURFnet - Virtuele Netwerkfuncties6projects - Eyle Brinkhuis - SURFnet - Virtuele Netwerkfuncties
6projects - Eyle Brinkhuis - SURFnet - Virtuele NetwerkfunctiesSplend
 
HSB15 - Dr. Michel van Eeten - TU Delft
HSB15 - Dr. Michel van Eeten - TU DelftHSB15 - Dr. Michel van Eeten - TU Delft
HSB15 - Dr. Michel van Eeten - TU DelftSplend
 
HSB15 - Xander Jansen - SURFnet
HSB15 - Xander Jansen - SURFnetHSB15 - Xander Jansen - SURFnet
HSB15 - Xander Jansen - SURFnetSplend
 
HSB15 - 0xDUDE
HSB15 - 0xDUDEHSB15 - 0xDUDE
HSB15 - 0xDUDESplend
 
HSB15 - Pavel Minarik - INVEATECH
HSB15 - Pavel Minarik - INVEATECHHSB15 - Pavel Minarik - INVEATECH
HSB15 - Pavel Minarik - INVEATECHSplend
 
HSB15 - Aiko Pras - TU Twente
HSB15 - Aiko Pras - TU TwenteHSB15 - Aiko Pras - TU Twente
HSB15 - Aiko Pras - TU TwenteSplend
 
HSB15 - Lennert den Teuling - ISPConnect
HSB15 - Lennert den Teuling - ISPConnectHSB15 - Lennert den Teuling - ISPConnect
HSB15 - Lennert den Teuling - ISPConnectSplend
 
HSB15 - Thijs Bosschert - Radically Open Security
HSB15 - Thijs Bosschert - Radically Open SecurityHSB15 - Thijs Bosschert - Radically Open Security
HSB15 - Thijs Bosschert - Radically Open SecuritySplend
 
HSB15 - Richard Bosboom - HackerOne
HSB15 - Richard Bosboom - HackerOneHSB15 - Richard Bosboom - HackerOne
HSB15 - Richard Bosboom - HackerOneSplend
 
DHPA Techday 2015 - Patrick Savalle - Are you out of your mind?
DHPA Techday 2015 - Patrick Savalle - Are you out of your mind?DHPA Techday 2015 - Patrick Savalle - Are you out of your mind?
DHPA Techday 2015 - Patrick Savalle - Are you out of your mind?Splend
 
DHPA Techday 2015 - Patrick Savalle - Disruptive Technology
DHPA Techday 2015 - Patrick Savalle - Disruptive TechnologyDHPA Techday 2015 - Patrick Savalle - Disruptive Technology
DHPA Techday 2015 - Patrick Savalle - Disruptive TechnologySplend
 
DHPA Techday 2015 - Ger Apeldoorn - Deep dive into Puppet
DHPA Techday 2015 - Ger Apeldoorn - Deep dive into PuppetDHPA Techday 2015 - Ger Apeldoorn - Deep dive into Puppet
DHPA Techday 2015 - Ger Apeldoorn - Deep dive into PuppetSplend
 
DHPA Techday 2015 - Maciej Korczyński - Reputation Metrics Design to Improve ...
DHPA Techday 2015 - Maciej Korczyński - Reputation Metrics Design to Improve ...DHPA Techday 2015 - Maciej Korczyński - Reputation Metrics Design to Improve ...
DHPA Techday 2015 - Maciej Korczyński - Reputation Metrics Design to Improve ...Splend
 
DHPA Techday 2015 - Johan Benning - HP Mobility
DHPA Techday 2015 - Johan Benning - HP MobilityDHPA Techday 2015 - Johan Benning - HP Mobility
DHPA Techday 2015 - Johan Benning - HP MobilitySplend
 
DHPA Techday 2015 - Arjen Zonneveld - Jelte Jansen - DNSSEC College
DHPA Techday 2015 - Arjen Zonneveld - Jelte Jansen - DNSSEC CollegeDHPA Techday 2015 - Arjen Zonneveld - Jelte Jansen - DNSSEC College
DHPA Techday 2015 - Arjen Zonneveld - Jelte Jansen - DNSSEC CollegeSplend
 

More from Splend (20)

Fiber Vakdag 2019 - Gerben Roseboom - MapXact
Fiber Vakdag 2019 - Gerben Roseboom - MapXactFiber Vakdag 2019 - Gerben Roseboom - MapXact
Fiber Vakdag 2019 - Gerben Roseboom - MapXact
 
Fiber Vakdag 2019 - Lex Wils - FCA
Fiber Vakdag 2019 - Lex Wils - FCAFiber Vakdag 2019 - Lex Wils - FCA
Fiber Vakdag 2019 - Lex Wils - FCA
 
Martin Pels - NLNog ring
Martin Pels - NLNog ringMartin Pels - NLNog ring
Martin Pels - NLNog ring
 
Wido den Hollander - IPv6
Wido den Hollander - IPv6Wido den Hollander - IPv6
Wido den Hollander - IPv6
 
Pim van Stam - BGP
Pim van Stam - BGPPim van Stam - BGP
Pim van Stam - BGP
 
6projects - Eyle Brinkhuis - SURFnet - Virtuele Netwerkfuncties
6projects - Eyle Brinkhuis - SURFnet - Virtuele Netwerkfuncties6projects - Eyle Brinkhuis - SURFnet - Virtuele Netwerkfuncties
6projects - Eyle Brinkhuis - SURFnet - Virtuele Netwerkfuncties
 
HSB15 - Dr. Michel van Eeten - TU Delft
HSB15 - Dr. Michel van Eeten - TU DelftHSB15 - Dr. Michel van Eeten - TU Delft
HSB15 - Dr. Michel van Eeten - TU Delft
 
HSB15 - Xander Jansen - SURFnet
HSB15 - Xander Jansen - SURFnetHSB15 - Xander Jansen - SURFnet
HSB15 - Xander Jansen - SURFnet
 
HSB15 - 0xDUDE
HSB15 - 0xDUDEHSB15 - 0xDUDE
HSB15 - 0xDUDE
 
HSB15 - Pavel Minarik - INVEATECH
HSB15 - Pavel Minarik - INVEATECHHSB15 - Pavel Minarik - INVEATECH
HSB15 - Pavel Minarik - INVEATECH
 
HSB15 - Aiko Pras - TU Twente
HSB15 - Aiko Pras - TU TwenteHSB15 - Aiko Pras - TU Twente
HSB15 - Aiko Pras - TU Twente
 
HSB15 - Lennert den Teuling - ISPConnect
HSB15 - Lennert den Teuling - ISPConnectHSB15 - Lennert den Teuling - ISPConnect
HSB15 - Lennert den Teuling - ISPConnect
 
HSB15 - Thijs Bosschert - Radically Open Security
HSB15 - Thijs Bosschert - Radically Open SecurityHSB15 - Thijs Bosschert - Radically Open Security
HSB15 - Thijs Bosschert - Radically Open Security
 
HSB15 - Richard Bosboom - HackerOne
HSB15 - Richard Bosboom - HackerOneHSB15 - Richard Bosboom - HackerOne
HSB15 - Richard Bosboom - HackerOne
 
DHPA Techday 2015 - Patrick Savalle - Are you out of your mind?
DHPA Techday 2015 - Patrick Savalle - Are you out of your mind?DHPA Techday 2015 - Patrick Savalle - Are you out of your mind?
DHPA Techday 2015 - Patrick Savalle - Are you out of your mind?
 
DHPA Techday 2015 - Patrick Savalle - Disruptive Technology
DHPA Techday 2015 - Patrick Savalle - Disruptive TechnologyDHPA Techday 2015 - Patrick Savalle - Disruptive Technology
DHPA Techday 2015 - Patrick Savalle - Disruptive Technology
 
DHPA Techday 2015 - Ger Apeldoorn - Deep dive into Puppet
DHPA Techday 2015 - Ger Apeldoorn - Deep dive into PuppetDHPA Techday 2015 - Ger Apeldoorn - Deep dive into Puppet
DHPA Techday 2015 - Ger Apeldoorn - Deep dive into Puppet
 
DHPA Techday 2015 - Maciej Korczyński - Reputation Metrics Design to Improve ...
DHPA Techday 2015 - Maciej Korczyński - Reputation Metrics Design to Improve ...DHPA Techday 2015 - Maciej Korczyński - Reputation Metrics Design to Improve ...
DHPA Techday 2015 - Maciej Korczyński - Reputation Metrics Design to Improve ...
 
DHPA Techday 2015 - Johan Benning - HP Mobility
DHPA Techday 2015 - Johan Benning - HP MobilityDHPA Techday 2015 - Johan Benning - HP Mobility
DHPA Techday 2015 - Johan Benning - HP Mobility
 
DHPA Techday 2015 - Arjen Zonneveld - Jelte Jansen - DNSSEC College
DHPA Techday 2015 - Arjen Zonneveld - Jelte Jansen - DNSSEC CollegeDHPA Techday 2015 - Arjen Zonneveld - Jelte Jansen - DNSSEC College
DHPA Techday 2015 - Arjen Zonneveld - Jelte Jansen - DNSSEC College
 

Bart Lageweg - Ansible/Cobbler

  • 1. I n t e r m a x G r o u p
  • 2. Automatisch deployen van VMs • Standaardisatie • Tijdwinst • Volledig operationele opleverbare VM I n t e r m a x G r o u p
  • 3. Startpunt: handmatig & foutgevoelig! I n t e r m a x G r o u p
  • 4. De oplossing I n t e r m a x G r o u p • PXE technologie • Simpel te configureren • Voorspelbaar • Beheersbaar • Veel updates • 153 developers op GitHub • Marktleider • Goede leesbaarheid van code • Python • RedHat • Open Source • Veelgebruikt (volwassen) • Snel op te zetten • Gratis tool Bizway criteria
  • 5. Eindresultaat; technisch I n t e r m a x G r o u p
  • 6. Eindresultaat; organisatorisch • Tijdwinst 80% • Verplichte standaardisatie • Minder foutgevoelig • Begin vandaag, over een jaar is het volledig opgebouwd I n t e r m a x G r o u p
  • 7. Cobbler hoe dan? I n t e r m a x G r o u p VM aanmaken in Proxmox – Mac adres uitlezen vanuit aangemaakte VM. Daarna cobbler aanroepen via SSH $pxe_ip, '22', '/root/create.sh ' . $_POST['server_hostname'] . ' ' . $_POST['server_ip'] . ' ' . $info_wan[1] . ' ' . $info_wan[0] . ' ' . $_POST['server_intern_ip'] . ' ' . $mac_output[1] . ' ' . $subnet_lan cobbler system remove --name=$1 > /dev/null 2>&1 cobbler system add --name=$1 --profile=CentOS-7-x86_64 --hostname=$1 --interface=eth0 --ip-address=$2 --static=1 --gateway=$3 --subnet=$4 --name-servers="8.8.8.8 8.8.4.4" > /dev/null 2>&1 cobbler system edit --name=$1 --interface=eth1 --ip-address=$5 --name-servers="8.8.8.8 8.8.4.4" --mac- address=$6 --static=1 --subnet=$7 > /dev/null 2>&1 /etc/init.d/cobblerd restart > /dev/null 2>&1 cobbler sync > /dev/null 2>&1
  • 8. Ansible hoe dan? I n t e r m a x G r o u p …. #Hij wacht 720 seconden tot de host, anders faalt de taak en ook de playbook - name: wachten op pxe deployment wait_for: "host={{ new_ip }} port=22 delay=15 state=started timeout=720" #pingt intern IP van de host vanuit Ansible - name: check_ping_eth0 shell: > ping -c 2 {{ new_ip }} tags: pingtest ignore_errors: yes register: check_ping_eth0 #pingt extern IP van de host vanuit Ansible - name: check_ping_eth1 shell: > ping -c 2 {{ server_ip }} tags: pingtest ignore_errors: yes register: check_ping_eth1 #stuurt positieve melding naar API als ping geslaagd is #zegt tegen api dat addhost role klaar is (ook als een taak fout ging) - name: variables toevoegen aan host_variablefile lineinfile: dest: "/deployment/environments/host_vars/{{ new_ip }}" regexp: "{{ item.regexp }}" line: "{{ item.line }}" with_items: - { regexp: "^---", line: "---" } - { regexp: "^dauser:", line: "dauser:……. ;)" } - { regexp: "^dalicense:", line: "dalicense: {{ dalicense }}" } - { regexp: "^server_id:", line: "server_id: {{ server_id }}" } - { regexp: "^server_hostname:", line: "server_hostname: {{ server_hostname }}" }