KrisKris BuytaertBuytaert
● I used to be a Dev,I used to be a Dev,
● Then Became an OpThen Became an Op
● Chief Trolling Officer and Open SourceChief Trolling Officer and Open Source
Consultant @inuits.euConsultant @inuits.eu
● Everything is an effing DNS ProblemEverything is an effing DNS Problem
● Organising too many confs , #devopsdays,Organising too many confs , #devopsdays,
#loadays, ...#loadays, ...
● Evangelizing devopsEvangelizing devops
Why talk about RepositoryWhy talk about Repository
management ?management ?
devops =~ clamsdevops =~ clams
● CultureCulture
● (Lean)(Lean)
● Automate all the things ...Automate all the things ...
– Build AutomationBuild Automation
– Package all the thingsPackage all the things
– Test AutomationTest Automation
– IACIAC
● Monitoring , Metrics ...Monitoring , Metrics ...
● SharingSharing
Let's talk about PackagingLet's talk about Packaging
● Do you package ?Do you package ?
– Packaging software in a distro ?Packaging software in a distro ?
– Packaging languages ?Packaging languages ?
– Packaging in an enterprisePackaging in an enterprise
Why ops like to packageWhy ops like to package
● Packages give you featuresPackages give you features
•Consistency, security, dependenciesConsistency, security, dependencies
● Uniquely identify where files come fromUniquely identify where files come from
•Package or cfg-mgmtPackage or cfg-mgmt
● Source repo not always availableSource repo not always available
•Firewall / Cloud etc ..Firewall / Cloud etc ..
● Weird deployment locations , no easy accessWeird deployment locations , no easy access
● Little overhead when you automateLittle overhead when you automate
● CONFIG does not belong in a packageCONFIG does not belong in a package
In Continuous DeliveryIn Continuous Delivery
● Unmodified , Tested artifacts go trough aUnmodified , Tested artifacts go trough a
pipeline.pipeline.
application code,application code,
Infra codeInfra code
metadatametadata
teststests
● We need to package these so they becomeWe need to package these so they become
immutableimmutable
#devopsdays 2010 Open#devopsdays 2010 Open
Space ConclusionsSpace Conclusions
● Always package software YOU deployAlways package software YOU deploy
– Exceptions: code that changes faster thanExceptions: code that changes faster than
you can package it. (Very rare)you can package it. (Very rare)
● Do NOT package Config FILES ,Do NOT package Config FILES ,
– Use a cfgmgmt tool for thisUse a cfgmgmt tool for this
● Languages are still reinventing the wheel :(Languages are still reinventing the wheel :(
So we 'solved' packaging, now how to shipSo we 'solved' packaging, now how to ship
packages ?packages ?
Level 2: Random yumLevel 2: Random yum
repo’srepo’s
● Enable repoEnable repo
● dnf/yum install packagednf/yum install package
● 3 weeks later package has been3 weeks later package has been
– RenamedRenamed
– UpgradedUpgraded
– MovedMoved
● Random upgrades / Differend versionsRandom upgrades / Differend versions
deployeddeployed
● Conflicting Dependencies from different repos.Conflicting Dependencies from different repos.
The ChallengeThe Challenge
● 20 + customer platforms/stacks20 + customer platforms/stacks
● 1 distro1 distro
● 2 majrel2 majrel
● 3 fte3 fte
● 2-3 environments (dev/uat/prod/...) per2-3 environments (dev/uat/prod/...) per
customer platformcustomer platform
● Evolving at different speedEvolving at different speed
Environment Based RepositoriesEnvironment Based Repositories
● Dedicated Set of repositories per EnvironmentDedicated Set of repositories per Environment
● {Stack/Customer} / uat /prod /dev{Stack/Customer} / uat /prod /dev
– Consistent stable repositoriesConsistent stable repositories
– Repoducable platformsRepoducable platforms
– Different versions stacks per customerDifferent versions stacks per customer
– Based on local mirrorsBased on local mirrors
3 types of packages3 types of packages
● UpstreamUpstream
– Standard ReposStandard Repos
– Extended ReposExtended Repos
– Community build reposCommunity build repos
3 types of packages3 types of packages
● UpstreamUpstream
● Custom/Build SoftwareCustom/Build Software
– Upstream Doesn’t packageUpstream Doesn’t package
– Upstream has broken packagesUpstream has broken packages
– Patched UpstreamPatched Upstream
3 types of packages3 types of packages
● UpstreamUpstream
● Custom Build SoftwareCustom Build Software
● Own SoftwareOwn Software
Early PulpEarly Pulp
● Redhat CommunityRedhat Community
● Redhat Emerging TechnologyRedhat Emerging Technology
● Part of Katello / Foreman .. EcosystemPart of Katello / Foreman .. Ecosystem
Pulp and puppetPulp and puppet
● Upstream katello-pulp moduleUpstream katello-pulp module
● To be pulp_apiTo be pulp_api
– Includes types and providers for repositoriesIncludes types and providers for repositories
● Pulp repos now configured from hieraPulp repos now configured from hiera
● https://github.com/SimonPe/puppet-pulpapihttps://github.com/SimonPe/puppet-pulpapi
Promoting your own packagesPromoting your own packages
● Application specific Jenkins Pipeline uploadsApplication specific Jenkins Pipeline uploads
promoted individual package to $environmentpromoted individual package to $environment
repositoryrepository
● Deploy & upload 2 repoDeploy & upload 2 repo
● (rebootstrappable but no delay in deployment)(rebootstrappable but no delay in deployment)
ConclusionConclusion
● Scalable approach to managing mirrorsScalable approach to managing mirrors
● Scalable approach to managing upstreamScalable approach to managing upstream
packagespackages
● Reproducable repositoriesReproducable repositories
● We’re all Yaml engineers now.We’re all Yaml engineers now.
One more thingOne more thing
Config Management Camp 2019Config Management Camp 2019
4-6 february 20194-6 february 2019
Gent , BelgiumGent , Belgium
https://cfp.cfgmgmtcamp.be/https://cfp.cfgmgmtcamp.be/
ContactContact
Kris Buytaert kris.buytaert@inuits.euKris Buytaert kris.buytaert@inuits.eu
Further ReadingFurther Reading
@krisbuytaert@krisbuytaert
http://www.krisbuytaert.be/blog/http://www.krisbuytaert.be/blog/
http://inuits.eu/http://inuits.eu/
Find Inuits inFind Inuits in
Antwerpen,Ghent,Antwerpen,Ghent,
Rotterdam,Prague,KieRotterdam,Prague,Kie
vv