SlideShare une entreprise Scribd logo
1  sur  40
Télécharger pour lire hors ligne
Cobbler for
Developers


Matthew Mosesohn
    Mirantis IT
Developers? Uniformity?
Why Cobbler?
Simple system to automate installation and
preparation of systems.
Reduces the amount of time needed to begin
an installation.
Provides a flexible, intuitive means to manage
a large number of systems to meet your needs.
Why Cobbler?
●   Simple web UI and command line
●   Robust template interface via Cheetah
●   Built to save time
●   Open source
●   Mature
Cobbler history
Developed by DevOps engineer Michael
DeHaan (former Red Hat employee)
Primary goal to simplify installation
Software environments require frequent
reinstallations
Manual network kickstart method
● Set up DHCP server to point to TFTP server
● Configure TFTP with pxelinux.0 and
  installation tree
● Either handwrite MAC addresses for each
  host or present a menu and manually
  choose
● No scaleability
● No templating
● No reporting
When do you need Cobbler?
Scenarios:
● Complex software with many components
● Testing clustering software
● Testing software suites with no reset option
  available
● Continuous integration (CI) testing
● Isolated network environment
● Rapidly changing hardware
When Cobbler is not appropriate
Scenarios:
● Simple application development
● Legacy system development
● Where automation is not possible
● Windows
Continuous Integration
Overview:
● High pace development style
● Automated deployment
● Integrate and test software
● Test every commit
● Similar to production environment
Continuous Integration
Advantages:
● Saves time and money
● Enables sophisticated QA
● Early warning of bugs
● Communication
● Develops metrics for analysis
Continuous Integration
Disadvantages:
● Setup time investment
● Full automation development
CI example: Jenkins
Jenkins is a fork from Hudson
Java based
Supports many SCM formats, including:
● git
● subversion
● mercurial
● cvs
Automate testing based on SCM changes or
regular schedule
Typical Uses
● DNS/DHCP management of a company
  infrastructure
● Automation of installation of servers via PXE
● Power cycling of systems via ipmitool
● Local package repository mirror
● Simplified, standard installation process
What you should know already
● How to build virtual machines
● How to configure a DHCP server
  ○ hostnames
  ○ MAC addresses
  ○ gateway
● Where to find installation media for your
  system (DVD and/or package repositories)
Considerations
Scale:
● How many sites
● Concurrent installations
● Number of systems
Complexity:
● Linux distros
● System builds
● Localization
● Post-installation scripts
Simple case: single node with virt
                         Internet:
● Create a private       OS files
                         package
  virtual network      repositories

● Two VMs
● VM 1 is CentOS                               VM 1
                       Linux host
● VM 2 is Ubuntu      Cobbler server
                                               VM 2



                                  System
                      OS files
                                 configurati
                     packages
                                    on
Common use case: Development lab
          Internet:
          OS files
          package
        repositories
                                      Development Lab

                                System1             System2




       Cobbler server           System3             System4




                                System5             System6
    OS files      System
   packages     configuration
Unattended install script
Create kickstart file
●   Set up install method
●   Configure disks
●   Configure language/keyboard/time
●   Configure default package set
●   Specify scripts in %post for automation
Example kickstart for installation
install
reboot

lang en_US
network --bootproto=dhcp
keyboard us

clearpart --all
part / --size 500 --grow
part swap --recommended

#set timezone
timezone --utc US/Eastern
Example kickstart for installation
#set root password
rootpw changeme
#rootpw --iscrypted $1$Rig3dbXb$OWcv00J/V2WsBGcgx0bmp1

%packages
@base
openssh-server
openssh-client

%post
#Your script here
Debian/Ubuntu preseed file
#Lang
d-i debian-installer/locale string en_GB.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
#Net
d-i netcfg/enable boolean true
d-i netcfg/get_hostname string system01
d-i netcfg/get_domain string example.com
Debian/Ubuntu preseed file
### Mirror settings
d-i mirror/country string russia
d-i mirror/http/hostname string archive.ubuntu.com
d-i mirror/http/directory string /ubuntu

d-i mirror/suite string precise

d-i clock-setup/utc boolean true

d-i time/zone string US/Eastern
Debian/Ubuntu preseed file
## Account setup
d-i passwd/root-password-crypted password [MD5 hash]
d-i passwd/user-fullname string Ubuntu User
d-i passwd/username string ubuntu
d-i passwd/user-password-crypted password [MD5 hash]


### Apt setup
d-i apt-setup/restricted boolean true
d-i apt-setup/universe boolean true
d-i apt-setup/backports boolean true
tasksel tasksel/first multiselect lamp-server, print-server
Debian/Ubuntu (cont'd)
d-i preseed/early_command string your_pre_installation_script

d-i preseed/late_command string your_post_installation_script
Preinstallation script
● Useful for a disclaimer, warning, or safety
  message.
● Disk configuration manual steps
Postinstallation script
●   Custom downloaded files/settings/scripts
●   Enable configuration management
●   Set up SSH keys
●   Custom authentication if not possible
    through preseed/kickstart
Cobbler kickstart extra features
● You can store snippets and call them in multiple
  kickstarts
● You can use Cheetah template code directly in a
  kickstart (just prepend with '#'). Syntax similar to Python
Examples:
%post
$SNIPPET('ntp_register')

%packages
#set $hostname = $getVar('$hostname', None)
#if test in $hostname or devel in $hostname
@development
#end if
Working with variables
cobbler system dumpvars --name=system

Built-in variables:
● $mac_address
● $ip_address
● $hostname
● $distro
● $profile
● $server
Flexibility with variables
●   Set custom variables in ksmeta section.
●   Profile variables override distro variables.
●   System variables override profile variables.
●   Use getVar('var-name','default-value') in
    cases where an empty string would break
    your installation
    ○ RH: rootpw $getVar('rootpw','changeme')
    ○ Deb: d-i passwd/root-password-crypted password $getVar
       ('rootmd5','$1$Rig3dbXb$OWcv00J/V2WsBGcgx0bmp1')
Adding systems to Cobbler
Add your distro
● Download base OS media
● mount -oloop /mnt/iso /path/to/os.iso
● cobbler import --path /mnt/iso --
  name=distro_name
Adding profiles to Cobbler
● Log into Cobbler
  Web
● Add new profile with
  your distro and
  kickstart
Remote install options
● Manual entry of systems
   ○ Requires MAC address
● PXE menu
   ○ Requires manual interaction on boot
● koan/virt-install
   ○ Create a virtual machine or reinstall existing system
     and specify Cobbler server and profile to use
Koan examples
Reinstall a host:
● koan --server=cobbler.example.org --
  replace-self --profile=name

Create a new virtual machine:
● koan --server=cobbler.example.org --virt --
  system=name
Further automation
 Puppet
 Squid proxy
 Jenkins
 Continuous integration
Known limitations
Ubuntu installation works, but there are some
issues with virt-install for Ubuntu guests
Scaling and redundancy
Summary
●   Cobbler allows you to automate installations
●   Cobbler fits into CI testing
●   Cobbler saves time
●   Cobbler is extendable via Cheetah template
    engine
Thank you!
Questions?
Additional reading
https://www.redhat.
com/about/news/archive/2008/4/provisioning-
our-new-middleware-architecture
https://github.com/cobbler

Contenu connexe

Tendances

Containers are the future of the Cloud
Containers are the future of the CloudContainers are the future of the Cloud
Containers are the future of the Cloud
Pavel Odintsov
 
One click deployment
One click deploymentOne click deployment
One click deployment
Alex Su
 

Tendances (20)

Containers are the future of the Cloud
Containers are the future of the CloudContainers are the future of the Cloud
Containers are the future of the Cloud
 
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan BaljevicUnix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
Unix and Linux Common Boot Disk Disaster Recovery Tools by Dusan Baljevic
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Kernel Recipes 2016 -
Kernel Recipes 2016 - Kernel Recipes 2016 -
Kernel Recipes 2016 -
 
Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...Containerization is more than the new Virtualization: enabling separation of ...
Containerization is more than the new Virtualization: enabling separation of ...
 
The Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast StorageThe Linux Block Layer - Built for Fast Storage
The Linux Block Layer - Built for Fast Storage
 
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...
OpenNebulaConf 2016 - Building a GNU/Linux Distribution by Daniel Dehennin, M...
 
青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes 青云CoreOS虚拟机部署kubernetes
青云CoreOS虚拟机部署kubernetes
 
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
Kernel Recipes 2015: Linux Kernel IO subsystem - How it works and how can I s...
 
Cobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioningCobbler - Fast and reliable multi-OS provisioning
Cobbler - Fast and reliable multi-OS provisioning
 
Kernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyoneKernel Recipes 2015 - Hardened kernels for everyone
Kernel Recipes 2015 - Hardened kernels for everyone
 
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
Emerging Persistent Memory Hardware and ZUFS - PM-based File Systems in User ...
 
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-BaljevicHow to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
How to-mount-3 par-san-virtual-copy-onto-rhel-servers-by-Dusan-Baljevic
 
Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021Let's trace Linux Lernel with KGDB @ COSCUP 2021
Let's trace Linux Lernel with KGDB @ COSCUP 2021
 
One click deployment
One click deploymentOne click deployment
One click deployment
 
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copyLinux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
Linux containers – next gen virtualization for cloud (atl summit) ar4 3 - copy
 
SELF 2010: BSD For Linux Users
SELF 2010: BSD For Linux UsersSELF 2010: BSD For Linux Users
SELF 2010: BSD For Linux Users
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Prague
 
Performance characteristics of traditional v ms vs docker containers (dockerc...
Performance characteristics of traditional v ms vs docker containers (dockerc...Performance characteristics of traditional v ms vs docker containers (dockerc...
Performance characteristics of traditional v ms vs docker containers (dockerc...
 

En vedette

En vedette (11)

Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
 
puppet @techlifecookpad
puppet @techlifecookpadpuppet @techlifecookpad
puppet @techlifecookpad
 
Build Automation 101
Build Automation 101Build Automation 101
Build Automation 101
 
PXE Lot or PXE Lite
PXE Lot or PXE LitePXE Lot or PXE Lite
PXE Lot or PXE Lite
 
Manual pxe
Manual pxeManual pxe
Manual pxe
 
Using Puppet and Cobbler to Automate Your Infrastructure
Using Puppet and Cobbler to Automate Your InfrastructureUsing Puppet and Cobbler to Automate Your Infrastructure
Using Puppet and Cobbler to Automate Your Infrastructure
 
Automated Deployment & Benchmarking with Chef, Cobbler and Rally for OpenStack
Automated Deployment & Benchmarking with Chef, Cobbler and Rally for OpenStackAutomated Deployment & Benchmarking with Chef, Cobbler and Rally for OpenStack
Automated Deployment & Benchmarking with Chef, Cobbler and Rally for OpenStack
 
Cobbler Summit - Automated Xen VM Deployment
Cobbler Summit - Automated Xen VM DeploymentCobbler Summit - Automated Xen VM Deployment
Cobbler Summit - Automated Xen VM Deployment
 
A Puppet Story
A Puppet StoryA Puppet Story
A Puppet Story
 
Cloud computing simple ppt
Cloud computing simple pptCloud computing simple ppt
Cloud computing simple ppt
 
Visual Design with Data
Visual Design with DataVisual Design with Data
Visual Design with Data
 

Similaire à CodeFest 2013. Mosesohn M. — Automating environments with Cobbler

A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment System
a3sec
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
OpenStack Foundation
 
Itb2018 cf apps to dev to production with command box cf-config docker
Itb2018   cf apps to dev to production with command box cf-config dockerItb2018   cf apps to dev to production with command box cf-config docker
Itb2018 cf apps to dev to production with command box cf-config docker
Ortus Solutions, Corp
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Jan Kalcic
 

Similaire à CodeFest 2013. Mosesohn M. — Automating environments with Cobbler (20)

A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment System
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
Provisioning on Libvirt with Foreman
Provisioning on Libvirt with ForemanProvisioning on Libvirt with Foreman
Provisioning on Libvirt with Foreman
 
Malware analysis
Malware analysisMalware analysis
Malware analysis
 
Optimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMUOptimizing VM images for OpenStack with KVM/QEMU
Optimizing VM images for OpenStack with KVM/QEMU
 
Cobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale EnvironmentsCobbler, Func and Puppet: Tools for Large Scale Environments
Cobbler, Func and Puppet: Tools for Large Scale Environments
 
Deploying datacenters with Puppet - PuppetCamp Europe 2010
Deploying datacenters with Puppet - PuppetCamp Europe 2010Deploying datacenters with Puppet - PuppetCamp Europe 2010
Deploying datacenters with Puppet - PuppetCamp Europe 2010
 
Foreman - Advanced use cases - Timo Goebel
Foreman - Advanced use cases - Timo GoebelForeman - Advanced use cases - Timo Goebel
Foreman - Advanced use cases - Timo Goebel
 
Itb2018 cf apps to dev to production with command box cf-config docker
Itb2018   cf apps to dev to production with command box cf-config dockerItb2018   cf apps to dev to production with command box cf-config docker
Itb2018 cf apps to dev to production with command box cf-config docker
 
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
Install .Net Core, SQL Server V-Next on Linux and deploy .Net core applicatio...
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
Workstations-02.pptx
Workstations-02.pptxWorkstations-02.pptx
Workstations-02.pptx
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
ITB2019 Scaling with CommandBox in Production! - Brad Wood
ITB2019 Scaling with CommandBox in Production! - Brad WoodITB2019 Scaling with CommandBox in Production! - Brad Wood
ITB2019 Scaling with CommandBox in Production! - Brad Wood
 
Micro Datacenter & Data Warehouse
Micro Datacenter & Data WarehouseMicro Datacenter & Data Warehouse
Micro Datacenter & Data Warehouse
 
Deploy Linux servers at scale
Deploy Linux servers at scaleDeploy Linux servers at scale
Deploy Linux servers at scale
 
Building
BuildingBuilding
Building
 

Plus de CodeFest

Plus de CodeFest (20)

Alexander Graebe
Alexander GraebeAlexander Graebe
Alexander Graebe
 
Никита Прокопов
Никита ПрокоповНикита Прокопов
Никита Прокопов
 
Денис Баталов
Денис БаталовДенис Баталов
Денис Баталов
 
Елена Гальцина
Елена ГальцинаЕлена Гальцина
Елена Гальцина
 
Александр Калашников
Александр КалашниковАлександр Калашников
Александр Калашников
 
Ирина Иванова
Ирина ИвановаИрина Иванова
Ирина Иванова
 
Marko Berković
Marko BerkovićMarko Berković
Marko Berković
 
Денис Кортунов
Денис КортуновДенис Кортунов
Денис Кортунов
 
Александр Зимин
Александр ЗиминАлександр Зимин
Александр Зимин
 
Сергей Крапивенский
Сергей КрапивенскийСергей Крапивенский
Сергей Крапивенский
 
Сергей Игнатов
Сергей ИгнатовСергей Игнатов
Сергей Игнатов
 
Николай Крапивный
Николай КрапивныйНиколай Крапивный
Николай Крапивный
 
Alexander Graebe
Alexander GraebeAlexander Graebe
Alexander Graebe
 
Вадим Смирнов
Вадим СмирновВадим Смирнов
Вадим Смирнов
 
Константин Осипов
Константин ОсиповКонстантин Осипов
Константин Осипов
 
Raffaele Rialdi
Raffaele RialdiRaffaele Rialdi
Raffaele Rialdi
 
Максим Пугачев
Максим ПугачевМаксим Пугачев
Максим Пугачев
 
Rene Groeschke
Rene GroeschkeRene Groeschke
Rene Groeschke
 
Иван Бондаренко
Иван БондаренкоИван Бондаренко
Иван Бондаренко
 
Mete Atamel
Mete AtamelMete Atamel
Mete Atamel
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

CodeFest 2013. Mosesohn M. — Automating environments with Cobbler

  • 3. Why Cobbler? Simple system to automate installation and preparation of systems. Reduces the amount of time needed to begin an installation. Provides a flexible, intuitive means to manage a large number of systems to meet your needs.
  • 4. Why Cobbler? ● Simple web UI and command line ● Robust template interface via Cheetah ● Built to save time ● Open source ● Mature
  • 5. Cobbler history Developed by DevOps engineer Michael DeHaan (former Red Hat employee) Primary goal to simplify installation Software environments require frequent reinstallations
  • 6. Manual network kickstart method ● Set up DHCP server to point to TFTP server ● Configure TFTP with pxelinux.0 and installation tree ● Either handwrite MAC addresses for each host or present a menu and manually choose ● No scaleability ● No templating ● No reporting
  • 7. When do you need Cobbler? Scenarios: ● Complex software with many components ● Testing clustering software ● Testing software suites with no reset option available ● Continuous integration (CI) testing ● Isolated network environment ● Rapidly changing hardware
  • 8. When Cobbler is not appropriate Scenarios: ● Simple application development ● Legacy system development ● Where automation is not possible ● Windows
  • 9. Continuous Integration Overview: ● High pace development style ● Automated deployment ● Integrate and test software ● Test every commit ● Similar to production environment
  • 10. Continuous Integration Advantages: ● Saves time and money ● Enables sophisticated QA ● Early warning of bugs ● Communication ● Develops metrics for analysis
  • 11. Continuous Integration Disadvantages: ● Setup time investment ● Full automation development
  • 12. CI example: Jenkins Jenkins is a fork from Hudson Java based Supports many SCM formats, including: ● git ● subversion ● mercurial ● cvs Automate testing based on SCM changes or regular schedule
  • 13. Typical Uses ● DNS/DHCP management of a company infrastructure ● Automation of installation of servers via PXE ● Power cycling of systems via ipmitool ● Local package repository mirror ● Simplified, standard installation process
  • 14. What you should know already ● How to build virtual machines ● How to configure a DHCP server ○ hostnames ○ MAC addresses ○ gateway ● Where to find installation media for your system (DVD and/or package repositories)
  • 15. Considerations Scale: ● How many sites ● Concurrent installations ● Number of systems Complexity: ● Linux distros ● System builds ● Localization ● Post-installation scripts
  • 16. Simple case: single node with virt Internet: ● Create a private OS files package virtual network repositories ● Two VMs ● VM 1 is CentOS VM 1 Linux host ● VM 2 is Ubuntu Cobbler server VM 2 System OS files configurati packages on
  • 17. Common use case: Development lab Internet: OS files package repositories Development Lab System1 System2 Cobbler server System3 System4 System5 System6 OS files System packages configuration
  • 19. Create kickstart file ● Set up install method ● Configure disks ● Configure language/keyboard/time ● Configure default package set ● Specify scripts in %post for automation
  • 20. Example kickstart for installation install reboot lang en_US network --bootproto=dhcp keyboard us clearpart --all part / --size 500 --grow part swap --recommended #set timezone timezone --utc US/Eastern
  • 21. Example kickstart for installation #set root password rootpw changeme #rootpw --iscrypted $1$Rig3dbXb$OWcv00J/V2WsBGcgx0bmp1 %packages @base openssh-server openssh-client %post #Your script here
  • 22. Debian/Ubuntu preseed file #Lang d-i debian-installer/locale string en_GB.UTF-8 d-i console-setup/ask_detect boolean false d-i keyboard-configuration/layoutcode string us #Net d-i netcfg/enable boolean true d-i netcfg/get_hostname string system01 d-i netcfg/get_domain string example.com
  • 23. Debian/Ubuntu preseed file ### Mirror settings d-i mirror/country string russia d-i mirror/http/hostname string archive.ubuntu.com d-i mirror/http/directory string /ubuntu d-i mirror/suite string precise d-i clock-setup/utc boolean true d-i time/zone string US/Eastern
  • 24. Debian/Ubuntu preseed file ## Account setup d-i passwd/root-password-crypted password [MD5 hash] d-i passwd/user-fullname string Ubuntu User d-i passwd/username string ubuntu d-i passwd/user-password-crypted password [MD5 hash] ### Apt setup d-i apt-setup/restricted boolean true d-i apt-setup/universe boolean true d-i apt-setup/backports boolean true tasksel tasksel/first multiselect lamp-server, print-server
  • 25. Debian/Ubuntu (cont'd) d-i preseed/early_command string your_pre_installation_script d-i preseed/late_command string your_post_installation_script
  • 26. Preinstallation script ● Useful for a disclaimer, warning, or safety message. ● Disk configuration manual steps
  • 27. Postinstallation script ● Custom downloaded files/settings/scripts ● Enable configuration management ● Set up SSH keys ● Custom authentication if not possible through preseed/kickstart
  • 28. Cobbler kickstart extra features ● You can store snippets and call them in multiple kickstarts ● You can use Cheetah template code directly in a kickstart (just prepend with '#'). Syntax similar to Python Examples: %post $SNIPPET('ntp_register') %packages #set $hostname = $getVar('$hostname', None) #if test in $hostname or devel in $hostname @development #end if
  • 29. Working with variables cobbler system dumpvars --name=system Built-in variables: ● $mac_address ● $ip_address ● $hostname ● $distro ● $profile ● $server
  • 30. Flexibility with variables ● Set custom variables in ksmeta section. ● Profile variables override distro variables. ● System variables override profile variables. ● Use getVar('var-name','default-value') in cases where an empty string would break your installation ○ RH: rootpw $getVar('rootpw','changeme') ○ Deb: d-i passwd/root-password-crypted password $getVar ('rootmd5','$1$Rig3dbXb$OWcv00J/V2WsBGcgx0bmp1')
  • 31. Adding systems to Cobbler
  • 32. Add your distro ● Download base OS media ● mount -oloop /mnt/iso /path/to/os.iso ● cobbler import --path /mnt/iso -- name=distro_name
  • 33. Adding profiles to Cobbler ● Log into Cobbler Web ● Add new profile with your distro and kickstart
  • 34. Remote install options ● Manual entry of systems ○ Requires MAC address ● PXE menu ○ Requires manual interaction on boot ● koan/virt-install ○ Create a virtual machine or reinstall existing system and specify Cobbler server and profile to use
  • 35. Koan examples Reinstall a host: ● koan --server=cobbler.example.org -- replace-self --profile=name Create a new virtual machine: ● koan --server=cobbler.example.org --virt -- system=name
  • 36. Further automation Puppet Squid proxy Jenkins Continuous integration
  • 37. Known limitations Ubuntu installation works, but there are some issues with virt-install for Ubuntu guests Scaling and redundancy
  • 38. Summary ● Cobbler allows you to automate installations ● Cobbler fits into CI testing ● Cobbler saves time ● Cobbler is extendable via Cheetah template engine