www.immobilienscout24.deSystem management withRPM and YADTA Solution for Data CentersBrussels | 2012-02-05 | Ralph Angenen...
So what is it?  RPM    Well known packaging format    Easy to use (and package)    Built-in content verification    Co...
So what is it?  YADT    An Augmented Deployment Tool    Central management of dependencies between       Services      ...
RPM, huh?  Sure. Everything is packaged as an RPM    Our system software (RHEL – 100% RPM)    Software from the outside ...
But config?  It comes in files  RPM is good at handling files  There are tools to get RPMs on a machine  RPM can verify pa...
So you build RPMs for every machine?                Um. No.Slide 6 | System management with RPM & YADT | Ralph Angenendt
So you build RPMs for every machine?             Well, sort                of.Slide 7 | System management with RPM & YADT ...
So you build RPMs for every machine?             We let            machines             do it.Slide 8 | System management ...
„Config Subversion“  All Configuration is kept in an SVN repository    Hierarchical    Supports a „Data Center“ layout  ...
Config „subversion“  Goes from general to special  On-Commit    RPM building    YUM repository generation  Also works wi...
In general it looks like this             all/Overwrites             loc/             type/             loctype/          ...
In general it looks like this             all/                      etc/Overwrites                      data/             ...
In general it looks like this             all/             loc/                      tuv/Overwrites                      b...
In general it looks like this             all/             loc/             type/Overwrites                  web/         ...
In general it looks like this             all/             loc/             type/Overwrites             loctype/          ...
In general it looks like this             all/             loc/             type/Overwrites             loctype/          ...
VARIABLES?  VARIABLES/ contains – well – variables    Many hosts have a similar configuration    Best to configure that ...
Variables   all/etc/proxy.conf:      [...]      proxy_port=3128      proxy_host=@@@PROXY_HOST@@@   loc/tuv/VARIABLES/PROXY...
More specials  There are two special Variables   RPM_PROVIDES     config-hostname (e.g. config-berweb01)    RPM_REQUIRE...
Putting it all together                            config-rpm-maker                                substitutes            ...
Putting it all together  yadt-config-rpm-maker    Works as a post-commit hook in subversion    Written in python    Cre...
Caveats  RPM dislikes a few things    Mainly two packages owning the same file    Not every software has a config.d/   ...
Caveats  Solution    Write wrapper packages    Those overwrite config via %post       Config now includes config.d/ (if...
Summary  Complete config is in one package  Config pulls in „complete machine“  Tool chain allows easy verification  Tool ...
ADVERTISEMENT                   Nexus Yum Plugin available from            https://code.google.com/p/nexus-yum-plugin/Slid...
YADT  Knows your Data Center    Allows you to model your DC    YAML-based description of       Services       Applicat...
Configuration  Target definition in file „target“:   name: probau   log-dir: logs   hosts:   - hambau*.example.com   - ber...
Configuration  Service definition in file „yadt.services“:        - service1:            needs_services: [service2]       ...
Configuration  Notations:    service://hostname/servicename    host://hostname/    artefact://hostname/packagename/vers...
YADT – the smallest unit                                               yadt.services:                                     ...
YADT – simple dependencies                                               yadt.services:                          Stopped 1...
YADT – adding external services           LB                                  yadt.services:                     Removed f...
External services  YADT has a service layer    Python module    Can also execute scripts    Loadbalancer:       Uses t...
YADT – adding services on other systems                                  yadt.services:  LB                               ...
YADT – more complex modeling                                     LBhttpd                                                  ...
YADT – chunks and wave deployment                                       LBhttpd       httpd           httpd           http...
InterfaceSlide 37 | System management with RPM & YADT | Ralph Angenendt
Conclusion  RPM configuration works astonishingly well    Though needs work around caveats    Easy to maintain (for ever...
Conclusion  YADT is a work in progress – but it works reliably    For many machines, it can get slow       Especially wh...
Outlook  New yadt-shell (the interface) on the way  Work has started to parallelize yadt    Against slowness    Lets you...
The End (finally!)                              YADT                https://code.google.com/p/yadt/                    Yad...
Thank you very much!Please contact me for furtherquestions and discussions.Kontakt:Immobilien Scout GmbH   Fon:   +49 30 2...
Upcoming SlideShare
Loading in …5
×

System management with rpm and yadt

2,171 views

Published on

My collegue Ralph Angenendt gave this talk at the FOSDEM 2012 at Bruessels.

Raw video of the talk: http://vimeo.com/36551629

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,171
On SlideShare
0
From Embeds
0
Number of Embeds
136
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

System management with rpm and yadt

  1. 1. www.immobilienscout24.deSystem management withRPM and YADTA Solution for Data CentersBrussels | 2012-02-05 | Ralph AngenendtApplication Manager License: http://creativecommons.org/licenses/by-nc-nd/3.0/
  2. 2. So what is it? RPM  Well known packaging format  Easy to use (and package)  Built-in content verification  Complete toolchainSlide 2 | System management with RPM & YADT | Ralph Angenendt
  3. 3. So what is it? YADT  An Augmented Deployment Tool  Central management of dependencies between  Services  Systems  Software PackagesSlide 3 | System management with RPM & YADT | Ralph Angenendt
  4. 4. RPM, huh? Sure. Everything is packaged as an RPM  Our system software (RHEL – 100% RPM)  Software from the outside (think EPEL)  Our Applications  We wish  But were getting thereSlide 4 | System management with RPM & YADT | Ralph Angenendt
  5. 5. But config? It comes in files RPM is good at handling files There are tools to get RPMs on a machine RPM can verify package contents Updates are easySlide 5 | System management with RPM & YADT | Ralph Angenendt
  6. 6. So you build RPMs for every machine? Um. No.Slide 6 | System management with RPM & YADT | Ralph Angenendt
  7. 7. So you build RPMs for every machine? Well, sort of.Slide 7 | System management with RPM & YADT | Ralph Angenendt
  8. 8. So you build RPMs for every machine? We let machines do it.Slide 8 | System management with RPM & YADT | Ralph Angenendt
  9. 9. „Config Subversion“ All Configuration is kept in an SVN repository  Hierarchical  Supports a „Data Center“ layout  Is easy to understand  Typical unixy filesystem layoutSlide 9 | System management with RPM & YADT | Ralph Angenendt
  10. 10. Config „subversion“ Goes from general to special On-Commit  RPM building  YUM repository generation Also works with dpkg and apt  If you write the code to support itSlide 10 | System management with RPM & YADT | Ralph Angenendt
  11. 11. In general it looks like this all/Overwrites loc/ type/ loctype/ host/Slide 11 | System management with RPM & YADT | Ralph Angenendt
  12. 12. In general it looks like this all/ etc/Overwrites data/ VARIABLES/ loc/ type/ loctype/ host/Slide 12 | System management with RPM & YADT | Ralph Angenendt
  13. 13. In general it looks like this all/ loc/ tuv/Overwrites ber/ ham/ etc/ data/ VARIABLES/ type/ loctype/ host/Slide 13 | System management with RPM & YADT | Ralph Angenendt
  14. 14. In general it looks like this all/ loc/ type/Overwrites web/ app/ etc/ data/ VARIABLES/ loctype/ host/Slide 14 | System management with RPM & YADT | Ralph Angenendt
  15. 15. In general it looks like this all/ loc/ type/Overwrites loctype/ berweb/ berapp/ etc/ data/ VARIABLES/ host/Slide 15 | System management with RPM & YADT | Ralph Angenendt
  16. 16. In general it looks like this all/ loc/ type/Overwrites loctype/ host/ berweb01/ berweb02/ etc/ data/ VARIABLES/Slide 16 | System management with RPM & YADT | Ralph Angenendt
  17. 17. VARIABLES? VARIABLES/ contains – well – variables  Many hosts have a similar configuration  Best to configure that in a general way  All hosts use a proxy  Proxies in tuv, ber and in ham are differentSlide 17 | System management with RPM & YADT | Ralph Angenendt
  18. 18. Variables all/etc/proxy.conf: [...] proxy_port=3128 proxy_host=@@@PROXY_HOST@@@ loc/tuv/VARIABLES/PROXY_HOST: tuvprx.example.com loc/ber/VARIABLES/PROXY_HOST: berprx.example.com loc/ham/VARIABLE/PROXY_HOST: hamprx.example.comSlide 18 | System management with RPM & YADT | Ralph Angenendt
  19. 19. More specials There are two special Variables  RPM_PROVIDES config-hostname (e.g. config-berweb01)  RPM_REQUIRES tomcat,httpd,java-application RPM_PROVIDES is required during kickstart Content of RPM_REQUIRES pulls in all other needed RPMs for the hostSlide 19 | System management with RPM & YADT | Ralph Angenendt
  20. 20. Putting it all together config-rpm-maker substitutes VARIABLES builds RPMs creates YUM-RepoSlide 20 | System management with RPM & YADT | Ralph Angenendt
  21. 21. Putting it all together yadt-config-rpm-maker  Works as a post-commit hook in subversion  Written in python  Creates packages in parallel  Automatically determines which packages have to be rebuilt  Rebuilds the minimal set needed  Is open source (GPL)  Available from https://code.google.com/p/yadt/Slide 21 | System management with RPM & YADT | Ralph Angenendt
  22. 22. Caveats RPM dislikes a few things  Mainly two packages owning the same file  Not every software has a config.d/  „Generic“ config mostly not usable  Installation tends to break, thenSlide 22 | System management with RPM & YADT | Ralph Angenendt
  23. 23. Caveats Solution  Write wrapper packages  Those overwrite config via %post  Config now includes config.d/ (if possible)  Write your own config.d/ structure  Overwrite original config by piecing things from config.d/ togetherSlide 23 | System management with RPM & YADT | Ralph Angenendt
  24. 24. Summary Complete config is in one package Config pulls in „complete machine“ Tool chain allows easy verification Tool chain is well known Package format is  Well known  Rather easy (from an „RPM person“ view) Config is precalculated before copyingSlide 24 | System management with RPM & YADT | Ralph Angenendt
  25. 25. ADVERTISEMENT Nexus Yum Plugin available from https://code.google.com/p/nexus-yum-plugin/Slide 25 | System management with RPM & YADT | Ralph Angenendt
  26. 26. YADT Knows your Data Center  Allows you to model your DC  YAML-based description of  Services  Applications  Hosts Knows about dependencies between  Packages  Services  SystemsSlide 26 | System management with RPM & YADT | Ralph Angenendt
  27. 27. Configuration Target definition in file „target“: name: probau log-dir: logs hosts: - hambau*.example.com - berbau*.exampe.comSlide 27 | System management with RPM & YADT | Ralph Angenendt
  28. 28. Configuration Service definition in file „yadt.services“: - service1: needs_services: [service2] - service2: needs_services: [service3] - service3:Slide 28 | System management with RPM & YADT | Ralph Angenendt
  29. 29. Configuration Notations:  service://hostname/servicename  host://hostname/  artefact://hostname/packagename/version  yadt status service://hostname1/httpd  yadt ignore host://{host2|host33}  yadt lock -m host://hostname3  yadt updateartefact artefact:// [host1..host15]/yadt-clientSlide 29 | System management with RPM & YADT | Ralph Angenendt
  30. 30. YADT – the smallest unit yadt.services: - tomcat: Restarts on tomcat update Target: hosts: - foo.example.com tomcat Depends configSlide 30 | System management with RPM & YADT | Ralph Angenendt
  31. 31. YADT – simple dependencies yadt.services: Stopped 1st httpd Started 2nd - httpd: needs_services: [tomcat] httpd - tomcat:Depends config Stopped 2nd tomcat Started 1st tomcat config DependsSlide 31 | System management with RPM & YADT | Ralph Angenendt
  32. 32. YADT – adding external services LB yadt.services: Removed from - loadbalancer:Depends config needs_services: [httpd] class: LoadbalancerService loadbalancer_clusters: [pro-fe] pool: test httpd Stopped 1st port: 80 Started 2nd status_max_tries: 2 httpd Depends config - httpd: needs_services: [tomcat] Stopped 2nd - tomcat: tomcat Started 1st tomcat config DependsSlide 32 | System management with RPM & YADT | Ralph Angenendt
  33. 33. External services YADT has a service layer  Python module  Can also execute scripts  Loadbalancer:  Uses the F5 Big IP python api  Can disable/enable hosts  We also use it for making Nagios go quiet  Not yet open source  Needs to be generalizedSlide 33 | System management with RPM & YADT | Ralph Angenendt
  34. 34. YADT – adding services on other systems yadt.services: LB - loadbalancer: needs_services: [httpd] class: LoadbalancerService loadbalancer_clusters: [pro-fe] pool: testhttpd [...] httpd config - tomcat: needs_services: [app]tomcat tomcat config yadt.services: app - app: app configSlide 34 | System management with RPM & YADT | Ralph Angenendt
  35. 35. YADT – more complex modeling LBhttpd httpd httpd target: httpd config hosts: config - host[01..02]tomcat tomcat tomcat tomcat config app config app configSlide 35 | System management with RPM & YADT | Ralph Angenendt
  36. 36. YADT – chunks and wave deployment LBhttpd httpd httpd httpd httpd httpd 1. 2. 3. Slide 36 | System management with RPM & YADT | Ralph Angenendt
  37. 37. InterfaceSlide 37 | System management with RPM & YADT | Ralph Angenendt
  38. 38. Conclusion RPM configuration works astonishingly well  Though needs work around caveats  Easy to maintain (for everyone, just change config)  Distribution via yum repositories  One RPM pulls up a complete machine  Need to „resetup“?  Remove config-rpm  Reinstall config-rpmSlide 38 | System management with RPM & YADT | Ralph Angenendt
  39. 39. Conclusion YADT is a work in progress – but it works reliably  For many machines, it can get slow  Especially when nagios / loadbalancer are included  Services layer not yet open sourced  Easy configuration  Needs package based distribution system  We use it on a daily basisSlide 39 | System management with RPM & YADT | Ralph Angenendt
  40. 40. Outlook New yadt-shell (the interface) on the way Work has started to parallelize yadt  Against slowness  Lets you do „server, rack, datacenter“ scenario  You can determine fault tolerance Would be nice to have a working Demo system =:)Slide 40 | System management with RPM & YADT | Ralph Angenendt
  41. 41. The End (finally!) YADT https://code.google.com/p/yadt/ Yadt-rpm-config-maker https://code.google.com/p/yadt/ Nexus YUM plugin https://code.google.com/p/nexus-yum-plugin/Slide 41 | System management with RPM & YADT | Ralph Angenendt
  42. 42. Thank you very much!Please contact me for furtherquestions and discussions.Kontakt:Immobilien Scout GmbH Fon: +49 30 243 01-1036Andreasstraße 10 Email: ralph.angenendt@immobilienscout24.de10243 Berlin URL: www.immobilienscout24.deSlide 42 | System management with RPM & YADT | Ralph Angenendt

×