SlideShare ist ein Scribd-Unternehmen logo
1 von 19
Downloaden Sie, um offline zu lesen
MASS-MIGRATION OF
5000 SERVERS TO
FOREMAN/KATELLO
WITH BOOTSTRAP.PY
Evgeni Golov
1
$ WHOAMI
Evgeni Golov
Software Engineer at Red Hat
ex-Consultant at Red Hat
Debian and Grml Developer
♥ FOSS ♥
♥ automation ♥
2
SITUATION
10k RHEL (5k RHEL5, 4k RHEL6, 1k RHEL7)
most of them subscribed to
Satellite5/Spacewalk
want to move to Satellite6/Foreman
this requires a plan
3
TOOLING
Satellite 6.1 (Foreman 1.7, Katello 2.2)
this was done about a year ago
the learnings also apply to Foreman itself
bootstrap.py
script for registration of machines to
Foreman/Katello
at that time not even part of the Katello
project
mimicks the idea of bootstrap.sh from
Spacewalk
4
BOOTSTRAP.PY
install katello-ca-consumer RPM
subscribe the machine using subscription-
manager or rhn-migrate-classic-to-
rhsm
con gure katello-agent
con gure Puppet
5
STEP 1: EL5?!
ain't nobody got time for that
just let it bit-rot on the old infra
there is an migration to EL6/7 planned
anyways
(guess who is still up and running today?)
no need to care for the old content
but also no insight if there are any gotchas
6
STEP 2: SIZE THE
INFRASTRUCTURE
main VM: 12vCore, 32GB RAM, 1TB ash
6 proxies: 8vCore, 24GB RAM, 500G ash
rough setup:
no machines connect directly to Foreman
no more than 1000 clients per proxy
most machines don't do Puppet
7
STEP 3: WAIT FOR FIREWALLS
there is always a rewall somewhere
and it for sure will make you unhappy
request the new rewall rules early and
broadly (allow ALL the networks!)
8
STEP 4: DESIGN CONTENT
the old setup provided almost only RHEL, apps
were delivered from other sources
this makes an easy setup with one CCV per
RHEL release, containing CVs for:
RHEL + SatTools
admin software (backup, monitoring, etc)
9
STEP 5: REGISTER ALL THE
MACHINES
piece of cake, right?
10
STEP 5.1: FIND THE RIGHT PROXY
most machines are subscribed to Spacewalk
nd the old Spacewalk proxy in
/etc/sysconfig/rhn/up2date
have a map of old proxy to new proxy
machine is not subscribed?
try guessing based on host/domainname
try guessing based on IPv4 subnet
if everything fails, use a "default" proxy
11
STEP 5.2: FIND AN EXECUTOR
you need to run a script on every single
machine
Spacewalk has a function for that, but it was
disabled
when a problem occurs during migration,
Spacewalk might not be able to control the
machine anymore
today everybody would have used Ansible
we had BMC BladeLogic, as that was what the
customer had for all platforms
12
STEP 5.3: CHECK THAT FIREWALL
nobody wants to schedule 5000 jobs that will
fail
run a quick pre-check job before doing the
actual work
can the host resolve itself (and get a FQDN?)
can the host reach the old proxy
can the host reach the new proxy (on 80,
443, 5671)
13
STEP 5.4: WAIT FOR EVERYBODY
the previous step will identify a lot machines
as "broken"
enjoy your co ee while waiting for the
rewalls, machine owners, etc
14
STEP 5.5: TEST WHILE WAITING
gure out which bootstrap.py parameters
you need
gure out which patches for bootstrap.py
you need
submit everything upstream
become the de-facto maintainer of
bootstrap.py upstream
15
STEP 5.6: REGISTER!
we run batches of 1000 per day, so we would
not a ect too many departments
--skip foreman as we did not care for
Foreman/Puppet, just content
--force as we sometimes just re-run the
same machine multiple times
--legacy-purge to remove the machine
from Spacewalk
16
STEP 5.7: COLLECT THE PIECES
sometimes rhsmcertd would hang, blocking
subscription-manager, blocking yum
some machines have broken clocks, SSL
terribly fails
yes, we served "wrong" content to a couple
boxes, but that was found quickly (missing
repos)
(broken) proxies in yum.conf make it hard to
fetch packages
17
RANDOM FINDINGS
BMC BladeLogic injects an own libssl using
LD_LIBRARY_PATH, breaking yum
EL6.4 (and older) has a nasty Python bug,
making all syslog calls EMERG
People hate monitoring lesystems
It is considered OK to leave a machine with
broken dependencies
18
THANKS!






evgeni@golov.de
die-welt.net
@zhenech
+EvgeniGolov
@evgeni
zhenech
19

Weitere ähnliche Inhalte

Was ist angesagt?

OpenNebula and SaltStack - OpenNebulaConf 2013
OpenNebula and SaltStack - OpenNebulaConf 2013OpenNebula and SaltStack - OpenNebulaConf 2013
OpenNebula and SaltStack - OpenNebulaConf 2013
databus.pro
 
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenSteve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
PostgresOpen
 

Was ist angesagt? (20)

SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...
SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...
SaltConf14 - Anita Kuno, HP & OpenStack - Using SaltStack for event-driven or...
 
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
JavaCro'15 - Conquer the Internet of Things with Java and Docker - Johan Jans...
 
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...
SaltConf14 - Ryan Lane, Wikimedia - Immediate consistency with Trebuchet Depl...
 
Foreman presentation
Foreman presentationForeman presentation
Foreman presentation
 
SaltConf14 - Forrest Alvarez, Choice Hotels - Salt Formulas and States
SaltConf14 - Forrest Alvarez, Choice Hotels - Salt Formulas and StatesSaltConf14 - Forrest Alvarez, Choice Hotels - Salt Formulas and States
SaltConf14 - Forrest Alvarez, Choice Hotels - Salt Formulas and States
 
OpenNebula and SaltStack - OpenNebulaConf 2013
OpenNebula and SaltStack - OpenNebulaConf 2013OpenNebula and SaltStack - OpenNebulaConf 2013
OpenNebula and SaltStack - OpenNebulaConf 2013
 
Foreman in Your Data Center :OSDC 2015
Foreman in Your Data Center :OSDC 2015Foreman in Your Data Center :OSDC 2015
Foreman in Your Data Center :OSDC 2015
 
Capistrano
CapistranoCapistrano
Capistrano
 
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
Performance Tuning Your Puppet Infrastructure - PuppetConf 2014
 
Modern Infrastructure from Scratch with Puppet
Modern Infrastructure from Scratch with PuppetModern Infrastructure from Scratch with Puppet
Modern Infrastructure from Scratch with Puppet
 
Managing Puppet using MCollective
Managing Puppet using MCollectiveManaging Puppet using MCollective
Managing Puppet using MCollective
 
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
SaltConf14 - Eric johnson, Google - Orchestrating Google Compute Engine with ...
 
Salt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environmentsSalt conf 2014 - Using SaltStack in high availability environments
Salt conf 2014 - Using SaltStack in high availability environments
 
Deployment with capistrano
Deployment with capistranoDeployment with capistrano
Deployment with capistrano
 
CPAN Training
CPAN TrainingCPAN Training
CPAN Training
 
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres OpenSteve Singer - Managing PostgreSQL with Puppet @ Postgres Open
Steve Singer - Managing PostgreSQL with Puppet @ Postgres Open
 
Using SaltStack to orchestrate microservices in application containers at Sal...
Using SaltStack to orchestrate microservices in application containers at Sal...Using SaltStack to orchestrate microservices in application containers at Sal...
Using SaltStack to orchestrate microservices in application containers at Sal...
 
Vagrant and CentOS 7
Vagrant and CentOS 7Vagrant and CentOS 7
Vagrant and CentOS 7
 
Setup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platformSetup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platform
 
Capistrano
CapistranoCapistrano
Capistrano
 

Ähnlich wie Mass-Migration of 5000 Servers to Foreman/Katello with bootstrap.py - Evgeni Golov

Ähnlich wie Mass-Migration of 5000 Servers to Foreman/Katello with bootstrap.py - Evgeni Golov (20)

Fabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymoreFabric8 - Being devOps doesn't suck anymore
Fabric8 - Being devOps doesn't suck anymore
 
Why you should revisit mgmt
Why you should revisit mgmtWhy you should revisit mgmt
Why you should revisit mgmt
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Supercomputing by API: Connecting Modern Web Apps to HPC
Supercomputing by API: Connecting Modern Web Apps to HPCSupercomputing by API: Connecting Modern Web Apps to HPC
Supercomputing by API: Connecting Modern Web Apps to HPC
 
Capistrano, Puppet, and Chef
Capistrano, Puppet, and ChefCapistrano, Puppet, and Chef
Capistrano, Puppet, and Chef
 
SHARE.ORG Orlando 2015
SHARE.ORG Orlando 2015SHARE.ORG Orlando 2015
SHARE.ORG Orlando 2015
 
OpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, tooOpenNebula, the foreman and CentOS play nice, too
OpenNebula, the foreman and CentOS play nice, too
 
PuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With Notes
 
Iteratively introducing Puppet technologies in the brownfield; Jeffrey Miller
Iteratively introducing Puppet technologies in the brownfield; Jeffrey MillerIteratively introducing Puppet technologies in the brownfield; Jeffrey Miller
Iteratively introducing Puppet technologies in the brownfield; Jeffrey Miller
 
DevOps in PHP environment
DevOps in PHP environmentDevOps in PHP environment
DevOps in PHP environment
 
PUG Romagna - Pipeline + Deployer PHP
PUG Romagna - Pipeline + Deployer PHPPUG Romagna - Pipeline + Deployer PHP
PUG Romagna - Pipeline + Deployer PHP
 
Owasp AppSecEU 2015 - BeEF Session
Owasp AppSecEU 2015 - BeEF SessionOwasp AppSecEU 2015 - BeEF Session
Owasp AppSecEU 2015 - BeEF Session
 
Practical Operation Automation with StackStorm
Practical Operation Automation with StackStormPractical Operation Automation with StackStorm
Practical Operation Automation with StackStorm
 
Install MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and moreInstall MariaDB on IBM i - Tips, troubleshooting, and more
Install MariaDB on IBM i - Tips, troubleshooting, and more
 
Kioptrix 2014 5
Kioptrix 2014 5Kioptrix 2014 5
Kioptrix 2014 5
 
All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$
 
utf.pdf
utf.pdfutf.pdf
utf.pdf
 
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
 
How to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environmentHow to deploy a Java application on Google App engine Flexible environment
How to deploy a Java application on Google App engine Flexible environment
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
 

Kürzlich hochgeladen

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 

Kürzlich hochgeladen (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 

Mass-Migration of 5000 Servers to Foreman/Katello with bootstrap.py - Evgeni Golov

  • 1. MASS-MIGRATION OF 5000 SERVERS TO FOREMAN/KATELLO WITH BOOTSTRAP.PY Evgeni Golov 1
  • 2. $ WHOAMI Evgeni Golov Software Engineer at Red Hat ex-Consultant at Red Hat Debian and Grml Developer ♥ FOSS ♥ ♥ automation ♥ 2
  • 3. SITUATION 10k RHEL (5k RHEL5, 4k RHEL6, 1k RHEL7) most of them subscribed to Satellite5/Spacewalk want to move to Satellite6/Foreman this requires a plan 3
  • 4. TOOLING Satellite 6.1 (Foreman 1.7, Katello 2.2) this was done about a year ago the learnings also apply to Foreman itself bootstrap.py script for registration of machines to Foreman/Katello at that time not even part of the Katello project mimicks the idea of bootstrap.sh from Spacewalk 4
  • 5. BOOTSTRAP.PY install katello-ca-consumer RPM subscribe the machine using subscription- manager or rhn-migrate-classic-to- rhsm con gure katello-agent con gure Puppet 5
  • 6. STEP 1: EL5?! ain't nobody got time for that just let it bit-rot on the old infra there is an migration to EL6/7 planned anyways (guess who is still up and running today?) no need to care for the old content but also no insight if there are any gotchas 6
  • 7. STEP 2: SIZE THE INFRASTRUCTURE main VM: 12vCore, 32GB RAM, 1TB ash 6 proxies: 8vCore, 24GB RAM, 500G ash rough setup: no machines connect directly to Foreman no more than 1000 clients per proxy most machines don't do Puppet 7
  • 8. STEP 3: WAIT FOR FIREWALLS there is always a rewall somewhere and it for sure will make you unhappy request the new rewall rules early and broadly (allow ALL the networks!) 8
  • 9. STEP 4: DESIGN CONTENT the old setup provided almost only RHEL, apps were delivered from other sources this makes an easy setup with one CCV per RHEL release, containing CVs for: RHEL + SatTools admin software (backup, monitoring, etc) 9
  • 10. STEP 5: REGISTER ALL THE MACHINES piece of cake, right? 10
  • 11. STEP 5.1: FIND THE RIGHT PROXY most machines are subscribed to Spacewalk nd the old Spacewalk proxy in /etc/sysconfig/rhn/up2date have a map of old proxy to new proxy machine is not subscribed? try guessing based on host/domainname try guessing based on IPv4 subnet if everything fails, use a "default" proxy 11
  • 12. STEP 5.2: FIND AN EXECUTOR you need to run a script on every single machine Spacewalk has a function for that, but it was disabled when a problem occurs during migration, Spacewalk might not be able to control the machine anymore today everybody would have used Ansible we had BMC BladeLogic, as that was what the customer had for all platforms 12
  • 13. STEP 5.3: CHECK THAT FIREWALL nobody wants to schedule 5000 jobs that will fail run a quick pre-check job before doing the actual work can the host resolve itself (and get a FQDN?) can the host reach the old proxy can the host reach the new proxy (on 80, 443, 5671) 13
  • 14. STEP 5.4: WAIT FOR EVERYBODY the previous step will identify a lot machines as "broken" enjoy your co ee while waiting for the rewalls, machine owners, etc 14
  • 15. STEP 5.5: TEST WHILE WAITING gure out which bootstrap.py parameters you need gure out which patches for bootstrap.py you need submit everything upstream become the de-facto maintainer of bootstrap.py upstream 15
  • 16. STEP 5.6: REGISTER! we run batches of 1000 per day, so we would not a ect too many departments --skip foreman as we did not care for Foreman/Puppet, just content --force as we sometimes just re-run the same machine multiple times --legacy-purge to remove the machine from Spacewalk 16
  • 17. STEP 5.7: COLLECT THE PIECES sometimes rhsmcertd would hang, blocking subscription-manager, blocking yum some machines have broken clocks, SSL terribly fails yes, we served "wrong" content to a couple boxes, but that was found quickly (missing repos) (broken) proxies in yum.conf make it hard to fetch packages 17
  • 18. RANDOM FINDINGS BMC BladeLogic injects an own libssl using LD_LIBRARY_PATH, breaking yum EL6.4 (and older) has a nasty Python bug, making all syslog calls EMERG People hate monitoring lesystems It is considered OK to leave a machine with broken dependencies 18