SlideShare a Scribd company logo
1 of 34
Packages , Repositories,Packages , Repositories,
Pipelines & PromotionsPipelines & Promotions
Kris Buytaert
@krisbuytaert
Repositories as CodeRepositories as Code
Kris Buytaert
@krisbuytaert
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
Software Delivery AdoptionSoftware Delivery Adoption
● Level 0Level 0
– curlcurl http://somenaughtysite.io/random.shhttp://somenaughtysite.io/random.sh| sh| sh
● Level 1Level 1
– curl -sSL https://get.rvm.io | bashcurl -sSL https://get.rvm.io | bash
Solution :Solution :
Package all the thingsPackage all the things
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 :(
NotNot allall packagespackages areare equalequal
From
#packagingsucks
To
I love fpm
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.
Level 3: Local mirrorsLevel 3: Local mirrors
● FixesFixes
– Upstream changesUpstream changes
– Upstream dissapearingUpstream dissapearing
● Doesn’t fix duplicate / conflicting dependenciesDoesn’t fix duplicate / conflicting dependencies
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
Repository ManagementRepository Management
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
Pulp hiera (mirrors)Pulp hiera (mirrors)
•
xx
profile_pulp::purge_repos: true
profile_pulp::mirrors:
mirrors/centos/7/os/x86_64/:
url: http://mirror.centos.org/centos/7/os/x86_64/
mirrors/centos/7/updates/x86_64/:
url: http://mirror.centos.org/centos/7/updates/x86_64/
mirrors/centos/7/extras/x86_64/:
url: http://mirror.centos.org/centos/7/extras/x86_64/
mirrors/centos/7/sclo/x86_64/rh/:
url: http://mirror.centos.org/centos/7/sclo/x86_64/rh/
mirrors/centos/7/sclo/x86_64/sclo/:
url: http://mirror.centos.org/centos/7/sclo/x86_64/sclo/
mirrors/epel/7/x86_64/:
url: https://dl.fedoraproject.org/pub/epel/7/x86_64/
mirrors/puppetlabs/el/7/products/x86_64/:
url: http://yum.puppetlabs.com/el/7/products/x86_64/
mirrors/puppetlabs/el/7/dependencies/x86_64/:
url: http://yum.puppetlabs.com/el/7/dependencies/x86_64/
mirrors/puppetlabs/puppet/el/7/x86_64:
url: http://yum.puppetlabs.com/puppet/el/7/x86_64/
mirrors/passenger/el/7/x86_64/:
url: https://oss-binaries.phusionpassenger.com/yum/passenger/el/7/x86_64
mirrors/theforeman/latest/el7/x86_64/:
url: http://yum.theforeman.org/releases/latest/el7/x86_64/
mirrors/theforeman/plugins/latest/el7/x86_64/:
url: http://yum.theforeman.org/plugins/latest/el7/x86_64/
mirrors/pulp/stable/2/7/x86_64:
url: https://repos.fedorapeople.org/pulp/pulp/stable/2/7/x86_64/
Pulp hiera (defaults)Pulp hiera (defaults)
profile_pulp::promotion_defaults:profile_pulp::promotion_defaults:
repositories:repositories:
centos_base:centos_base:
upstream: /pub/mirrors/centos/7/os/x86_64/upstream: /pub/mirrors/centos/7/os/x86_64/
centos_updates:centos_updates:
upstream: /pub/mirrors/centos/7/updates/x86_64/upstream: /pub/mirrors/centos/7/updates/x86_64/
centos_extras:centos_extras:
upstream: /pub/mirrors/centos/7/extras/x86_64/upstream: /pub/mirrors/centos/7/extras/x86_64/
upstream:upstream:
allow_upload_from: [jenkins]allow_upload_from: [jenkins]
retain_old_count: 5retain_old_count: 5
internal:internal:
allow_upload_from: [jenkins]allow_upload_from: [jenkins]
retain_old_count: 10retain_old_count: 10
unpromotable: trueunpromotable: true
custom_build:custom_build:
allow_upload_from: [jenkins]allow_upload_from: [jenkins]
retain_old_count: 10retain_old_count: 10
Pulp hiera (promotions)Pulp hiera (promotions)
profile_pulp::yum_promotion_trees:profile_pulp::yum_promotion_trees:
hakka:hakka:
first_target:first_target:
- hakkadev- hakkadev
targets:targets:
hakkadev:hakkadev:
next_targets:next_targets:
- hakkauat- hakkauat
hakkauat:hakkauat:
next_targets:next_targets:
- hakkaprod- hakkaprod
hakkaprod:hakkaprod:
archive: truearchive: true
Generates all repositories andGenerates all repositories and
promotion scripts :promotion scripts :
promote-hakka-hakkadevpromote-hakka-hakkadev
promote-hakka-hakkaprodpromote-hakka-hakkaprod
promote-hakka-hakkaprod-archivepromote-hakka-hakkaprod-archive
promote-hakka-hakkauatpromote-hakka-hakkauat
Build the Upstream repoBuild the Upstream repo
● Initially :Initially :
– Manually pulp-admin upload filesManually pulp-admin upload files
– Pulp-admin copy files to other repoPulp-admin copy files to other repo
Build the Upstream repoBuild the Upstream repo
● Step 1Step 1
– Manually pulp-admin upload filesManually pulp-admin upload files
– Pulp-admin copy files to other repoPulp-admin copy files to other repo
Build the Upstream repoBuild the Upstream repo
● Yaml file that list files (+Yaml file that list files (+
versions) from sourceversions) from source
● Jenkins builds repo onJenkins builds repo on
commitcommit
- desc: epel tools + certbot (Let's Encrypt)- desc: epel tools + certbot (Let's Encrypt)
from: mirrors/epel/7/x86_64from: mirrors/epel/7/x86_64
pkgs:pkgs:
- htop- htop
- iftop- iftop
- mytop- mytop
- jq- jq
- ncdu- ncdu
- rkhunter- rkhunter
- certbot- certbot
- ngrep- ngrep
- desc: gluster- desc: gluster
from:from:
- mirrors/gluster41/- mirrors/gluster41/
pkgs:pkgs:
- glusterfs- glusterfs
- glusterfs-api- glusterfs-api
- glusterfs-cli- glusterfs-cli
- glusterfs-client-xlators- glusterfs-client-xlators
- glusterfs-fuse- glusterfs-fuse
- glusterfs-libs- glusterfs-libs
- glusterfs-server- glusterfs-server
- userspace-rcu- userspace-rcu
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

More Related Content

What's hot

Nightmare on Docker street
Nightmare on Docker streetNightmare on Docker street
Nightmare on Docker streetKris Buytaert
 
Continuous Infrastructure First
Continuous Infrastructure FirstContinuous Infrastructure First
Continuous Infrastructure FirstKris Buytaert
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodeKris Buytaert
 
From MonitoringSucks to Monitoring Love , 2016 Edition
From MonitoringSucks to Monitoring Love , 2016 EditionFrom MonitoringSucks to Monitoring Love , 2016 Edition
From MonitoringSucks to Monitoring Love , 2016 EditionKris Buytaert
 
From devoops to devops
From devoops to devopsFrom devoops to devops
From devoops to devopsKris Buytaert
 
The Return of the Dull Stack Engineer
The Return of the Dull Stack EngineerThe Return of the Dull Stack Engineer
The Return of the Dull Stack EngineerKris Buytaert
 
The influence of "Distributed platforms" on #devops
The influence of "Distributed platforms" on #devopsThe influence of "Distributed platforms" on #devops
The influence of "Distributed platforms" on #devopsKris Buytaert
 
Devops is dead, Long Live Devops
Devops is dead, Long Live DevopsDevops is dead, Long Live Devops
Devops is dead, Long Live DevopsKris Buytaert
 
Continuous Infrastructure First
Continuous Infrastructure FirstContinuous Infrastructure First
Continuous Infrastructure FirstKris Buytaert
 
Groovy there's a docker in my application pipeline
Groovy there's a docker in my application pipelineGroovy there's a docker in my application pipeline
Groovy there's a docker in my application pipelineKris Buytaert
 
No, we can't do continuous delivery
No, we can't do continuous deliveryNo, we can't do continuous delivery
No, we can't do continuous deliveryKris Buytaert
 
On the Importance of Infrastructure as Code
On the Importance of Infrastructure as CodeOn the Importance of Infrastructure as Code
On the Importance of Infrastructure as CodeKris Buytaert
 
Dev secops opsec, devsec, devops ?
Dev secops opsec, devsec, devops ?Dev secops opsec, devsec, devops ?
Dev secops opsec, devsec, devops ?Kris Buytaert
 
Continous Delivery of your Infrastructure
Continous Delivery of your InfrastructureContinous Delivery of your Infrastructure
Continous Delivery of your InfrastructureKris Buytaert
 
Closing the gap between Distros(devs) and their Users(ops)
Closing the gap between Distros(devs) and their Users(ops)Closing the gap between Distros(devs) and their Users(ops)
Closing the gap between Distros(devs) and their Users(ops)Kris Buytaert
 
Docker is killing your #devops Efforts
Docker is killing your #devops EffortsDocker is killing your #devops Efforts
Docker is killing your #devops EffortsKris Buytaert
 
Can we fix dev-oops ?
Can we fix dev-oops ?Can we fix dev-oops ?
Can we fix dev-oops ?Kris Buytaert
 
Run stuff, Deploy Stuff, Jax London 2017 Edition
Run stuff, Deploy Stuff, Jax London 2017 EditionRun stuff, Deploy Stuff, Jax London 2017 Edition
Run stuff, Deploy Stuff, Jax London 2017 EditionKris Buytaert
 
Help , My Datacenter is on fire
Help , My Datacenter is on fireHelp , My Datacenter is on fire
Help , My Datacenter is on fireKris Buytaert
 

What's hot (20)

Nightmare on Docker street
Nightmare on Docker streetNightmare on Docker street
Nightmare on Docker street
 
Continuous Infrastructure First
Continuous Infrastructure FirstContinuous Infrastructure First
Continuous Infrastructure First
 
Pipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as CodePipeline as code for your infrastructure as Code
Pipeline as code for your infrastructure as Code
 
From MonitoringSucks to Monitoring Love , 2016 Edition
From MonitoringSucks to Monitoring Love , 2016 EditionFrom MonitoringSucks to Monitoring Love , 2016 Edition
From MonitoringSucks to Monitoring Love , 2016 Edition
 
From devoops to devops
From devoops to devopsFrom devoops to devops
From devoops to devops
 
The Return of the Dull Stack Engineer
The Return of the Dull Stack EngineerThe Return of the Dull Stack Engineer
The Return of the Dull Stack Engineer
 
The influence of "Distributed platforms" on #devops
The influence of "Distributed platforms" on #devopsThe influence of "Distributed platforms" on #devops
The influence of "Distributed platforms" on #devops
 
Devops is dead, Long Live Devops
Devops is dead, Long Live DevopsDevops is dead, Long Live Devops
Devops is dead, Long Live Devops
 
Continuous Infrastructure First
Continuous Infrastructure FirstContinuous Infrastructure First
Continuous Infrastructure First
 
Groovy there's a docker in my application pipeline
Groovy there's a docker in my application pipelineGroovy there's a docker in my application pipeline
Groovy there's a docker in my application pipeline
 
No, we can't do continuous delivery
No, we can't do continuous deliveryNo, we can't do continuous delivery
No, we can't do continuous delivery
 
On the Importance of Infrastructure as Code
On the Importance of Infrastructure as CodeOn the Importance of Infrastructure as Code
On the Importance of Infrastructure as Code
 
GitOps , done Right
GitOps , done RightGitOps , done Right
GitOps , done Right
 
Dev secops opsec, devsec, devops ?
Dev secops opsec, devsec, devops ?Dev secops opsec, devsec, devops ?
Dev secops opsec, devsec, devops ?
 
Continous Delivery of your Infrastructure
Continous Delivery of your InfrastructureContinous Delivery of your Infrastructure
Continous Delivery of your Infrastructure
 
Closing the gap between Distros(devs) and their Users(ops)
Closing the gap between Distros(devs) and their Users(ops)Closing the gap between Distros(devs) and their Users(ops)
Closing the gap between Distros(devs) and their Users(ops)
 
Docker is killing your #devops Efforts
Docker is killing your #devops EffortsDocker is killing your #devops Efforts
Docker is killing your #devops Efforts
 
Can we fix dev-oops ?
Can we fix dev-oops ?Can we fix dev-oops ?
Can we fix dev-oops ?
 
Run stuff, Deploy Stuff, Jax London 2017 Edition
Run stuff, Deploy Stuff, Jax London 2017 EditionRun stuff, Deploy Stuff, Jax London 2017 Edition
Run stuff, Deploy Stuff, Jax London 2017 Edition
 
Help , My Datacenter is on fire
Help , My Datacenter is on fireHelp , My Datacenter is on fire
Help , My Datacenter is on fire
 

Similar to Repositories as Code

OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert NETWAYS
 
Continuous Delivery of (y)our infrastructure.
Continuous Delivery of (y)our infrastructure.Continuous Delivery of (y)our infrastructure.
Continuous Delivery of (y)our infrastructure.Kris Buytaert
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
Icinga Camp Amsterdam - Infrastructure as Code
Icinga Camp Amsterdam - Infrastructure as CodeIcinga Camp Amsterdam - Infrastructure as Code
Icinga Camp Amsterdam - Infrastructure as CodeIcinga
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsGR8Conf
 
When traditional configuration management is to slow for your needs
When traditional configuration management is to slow for your needsWhen traditional configuration management is to slow for your needs
When traditional configuration management is to slow for your needsKris Buytaert
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsPablo Godel
 
Docker in production: problems, fixes and beyond
Docker in production: problems, fixes and beyondDocker in production: problems, fixes and beyond
Docker in production: problems, fixes and beyondMiguel A. Guillén Tarazaga
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityGeoff Harcourt
 
Docking postgres
Docking postgresDocking postgres
Docking postgresrycamor
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadaysloadays
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015ice799
 
A Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and ContainersA Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and ContainersDocker, Inc.
 
Run stuff, Deploy Stuff
Run stuff, Deploy StuffRun stuff, Deploy Stuff
Run stuff, Deploy StuffKris Buytaert
 
Chef on SmartOS
Chef on SmartOSChef on SmartOS
Chef on SmartOSEric Saxby
 
Testing your puppet code
Testing your puppet codeTesting your puppet code
Testing your puppet codeJulien Pivotto
 
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 RightScale
 
A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment Systema3sec
 

Similar to Repositories as Code (20)

OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
 
Continuous Delivery of (y)our infrastructure.
Continuous Delivery of (y)our infrastructure.Continuous Delivery of (y)our infrastructure.
Continuous Delivery of (y)our infrastructure.
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Icinga Camp Amsterdam - Infrastructure as Code
Icinga Camp Amsterdam - Infrastructure as CodeIcinga Camp Amsterdam - Infrastructure as Code
Icinga Camp Amsterdam - Infrastructure as Code
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
When traditional configuration management is to slow for your needs
When traditional configuration management is to slow for your needsWhen traditional configuration management is to slow for your needs
When traditional configuration management is to slow for your needs
 
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony AppsSymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
SymfonyCon Madrid 2014 - Rock Solid Deployment of Symfony Apps
 
Docker in production: problems, fixes and beyond
Docker in production: problems, fixes and beyondDocker in production: problems, fixes and beyond
Docker in production: problems, fixes and beyond
 
DCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production ParityDCRUG: Achieving Development-Production Parity
DCRUG: Achieving Development-Production Parity
 
Docking postgres
Docking postgresDocking postgres
Docking postgres
 
Puppet managed loadays
Puppet managed loadaysPuppet managed loadays
Puppet managed loadays
 
Universal Userland
Universal UserlandUniversal Userland
Universal Userland
 
Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 
A Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and ContainersA Gentle Introduction to Docker and Containers
A Gentle Introduction to Docker and Containers
 
Run stuff, Deploy Stuff
Run stuff, Deploy StuffRun stuff, Deploy Stuff
Run stuff, Deploy Stuff
 
Chef on SmartOS
Chef on SmartOSChef on SmartOS
Chef on SmartOS
 
Testing your puppet code
Testing your puppet codeTesting your puppet code
Testing your puppet code
 
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
 
A3Sec Advanced Deployment System
A3Sec Advanced Deployment SystemA3Sec Advanced Deployment System
A3Sec Advanced Deployment System
 

More from Kris Buytaert

Years of (not) learning , from devops to devoops
Years of (not) learning , from devops to devoopsYears of (not) learning , from devops to devoops
Years of (not) learning , from devops to devoopsKris Buytaert
 
Observability will not fix your Broken Monitoring ,Ignite
Observability will not fix your Broken Monitoring ,IgniteObservability will not fix your Broken Monitoring ,Ignite
Observability will not fix your Broken Monitoring ,IgniteKris Buytaert
 
Infrastructure as Code Patterns
Infrastructure as Code PatternsInfrastructure as Code Patterns
Infrastructure as Code PatternsKris Buytaert
 
From devoops to devops 13 years of (not) learning
From devoops to devops 13 years of (not) learningFrom devoops to devops 13 years of (not) learning
From devoops to devops 13 years of (not) learningKris Buytaert
 
Pipeline all the Dashboards as Code
Pipeline all the Dashboards as CodePipeline all the Dashboards as Code
Pipeline all the Dashboards as CodeKris Buytaert
 
Devops is Dead, Long live Devops
Devops is Dead, Long live DevopsDevops is Dead, Long live Devops
Devops is Dead, Long live DevopsKris Buytaert
 
10 years of #devopsdays, but what have we really learned ?
10 years of #devopsdays, but what have we really learned ? 10 years of #devopsdays, but what have we really learned ?
10 years of #devopsdays, but what have we really learned ? Kris Buytaert
 
Is there a Future for devops ?
Is there a Future for devops   ? Is there a Future for devops   ?
Is there a Future for devops ? Kris Buytaert
 
10 Years of #devopsdays weirdness
10 Years of #devopsdays weirdness10 Years of #devopsdays weirdness
10 Years of #devopsdays weirdnessKris Buytaert
 
ADDO 2019: Looking back at over 10 years of Devops
ADDO 2019:    Looking back at over 10 years of DevopsADDO 2019:    Looking back at over 10 years of Devops
ADDO 2019: Looking back at over 10 years of DevopsKris Buytaert
 
Continuous Infrastructure First Ignite Edition
Continuous Infrastructure First  Ignite EditionContinuous Infrastructure First  Ignite Edition
Continuous Infrastructure First Ignite EditionKris Buytaert
 
Looking back at 5 years of #cfgmgmtcamp
Looking back at 5 years of #cfgmgmtcampLooking back at 5 years of #cfgmgmtcamp
Looking back at 5 years of #cfgmgmtcampKris Buytaert
 
Looking back at 7.5 years of Devopsdays , DOd PDX
Looking back at 7.5 years of Devopsdays , DOd PDXLooking back at 7.5 years of Devopsdays , DOd PDX
Looking back at 7.5 years of Devopsdays , DOd PDXKris Buytaert
 
Devopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMS
Devopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMSDevopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMS
Devopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMSKris Buytaert
 

More from Kris Buytaert (14)

Years of (not) learning , from devops to devoops
Years of (not) learning , from devops to devoopsYears of (not) learning , from devops to devoops
Years of (not) learning , from devops to devoops
 
Observability will not fix your Broken Monitoring ,Ignite
Observability will not fix your Broken Monitoring ,IgniteObservability will not fix your Broken Monitoring ,Ignite
Observability will not fix your Broken Monitoring ,Ignite
 
Infrastructure as Code Patterns
Infrastructure as Code PatternsInfrastructure as Code Patterns
Infrastructure as Code Patterns
 
From devoops to devops 13 years of (not) learning
From devoops to devops 13 years of (not) learningFrom devoops to devops 13 years of (not) learning
From devoops to devops 13 years of (not) learning
 
Pipeline all the Dashboards as Code
Pipeline all the Dashboards as CodePipeline all the Dashboards as Code
Pipeline all the Dashboards as Code
 
Devops is Dead, Long live Devops
Devops is Dead, Long live DevopsDevops is Dead, Long live Devops
Devops is Dead, Long live Devops
 
10 years of #devopsdays, but what have we really learned ?
10 years of #devopsdays, but what have we really learned ? 10 years of #devopsdays, but what have we really learned ?
10 years of #devopsdays, but what have we really learned ?
 
Is there a Future for devops ?
Is there a Future for devops   ? Is there a Future for devops   ?
Is there a Future for devops ?
 
10 Years of #devopsdays weirdness
10 Years of #devopsdays weirdness10 Years of #devopsdays weirdness
10 Years of #devopsdays weirdness
 
ADDO 2019: Looking back at over 10 years of Devops
ADDO 2019:    Looking back at over 10 years of DevopsADDO 2019:    Looking back at over 10 years of Devops
ADDO 2019: Looking back at over 10 years of Devops
 
Continuous Infrastructure First Ignite Edition
Continuous Infrastructure First  Ignite EditionContinuous Infrastructure First  Ignite Edition
Continuous Infrastructure First Ignite Edition
 
Looking back at 5 years of #cfgmgmtcamp
Looking back at 5 years of #cfgmgmtcampLooking back at 5 years of #cfgmgmtcamp
Looking back at 5 years of #cfgmgmtcamp
 
Looking back at 7.5 years of Devopsdays , DOd PDX
Looking back at 7.5 years of Devopsdays , DOd PDXLooking back at 7.5 years of Devopsdays , DOd PDX
Looking back at 7.5 years of Devopsdays , DOd PDX
 
Devopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMS
Devopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMSDevopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMS
Devopsdays Amsterdam 2017 Keynote, looking back at 5 years of AMS
 

Recently uploaded

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 

Recently uploaded (20)

Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 

Repositories as Code

  • 1. Packages , Repositories,Packages , Repositories, Pipelines & PromotionsPipelines & Promotions Kris Buytaert @krisbuytaert
  • 2. Repositories as CodeRepositories as Code Kris Buytaert @krisbuytaert
  • 3. 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
  • 4. Why talk about RepositoryWhy talk about Repository management ?management ?
  • 5. 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
  • 6. 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
  • 7. Software Delivery AdoptionSoftware Delivery Adoption ● Level 0Level 0 – curlcurl http://somenaughtysite.io/random.shhttp://somenaughtysite.io/random.sh| sh| sh ● Level 1Level 1 – curl -sSL https://get.rvm.io | bashcurl -sSL https://get.rvm.io | bash
  • 8. Solution :Solution : Package all the thingsPackage all the things
  • 9. 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
  • 10. 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
  • 11. #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 :(
  • 12. NotNot allall packagespackages areare equalequal
  • 14. So we 'solved' packaging, now how to shipSo we 'solved' packaging, now how to ship packages ?packages ?
  • 15. 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.
  • 16. Level 3: Local mirrorsLevel 3: Local mirrors ● FixesFixes – Upstream changesUpstream changes – Upstream dissapearingUpstream dissapearing ● Doesn’t fix duplicate / conflicting dependenciesDoesn’t fix duplicate / conflicting dependencies
  • 17. 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
  • 18. 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
  • 19. 3 types of packages3 types of packages ● UpstreamUpstream – Standard ReposStandard Repos – Extended ReposExtended Repos – Community build reposCommunity build repos
  • 20. 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
  • 21. 3 types of packages3 types of packages ● UpstreamUpstream ● Custom Build SoftwareCustom Build Software ● Own SoftwareOwn Software
  • 23. Early PulpEarly Pulp ● Redhat CommunityRedhat Community ● Redhat Emerging TechnologyRedhat Emerging Technology ● Part of Katello / Foreman .. EcosystemPart of Katello / Foreman .. Ecosystem
  • 24. 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
  • 25. Pulp hiera (mirrors)Pulp hiera (mirrors) • xx profile_pulp::purge_repos: true profile_pulp::mirrors: mirrors/centos/7/os/x86_64/: url: http://mirror.centos.org/centos/7/os/x86_64/ mirrors/centos/7/updates/x86_64/: url: http://mirror.centos.org/centos/7/updates/x86_64/ mirrors/centos/7/extras/x86_64/: url: http://mirror.centos.org/centos/7/extras/x86_64/ mirrors/centos/7/sclo/x86_64/rh/: url: http://mirror.centos.org/centos/7/sclo/x86_64/rh/ mirrors/centos/7/sclo/x86_64/sclo/: url: http://mirror.centos.org/centos/7/sclo/x86_64/sclo/ mirrors/epel/7/x86_64/: url: https://dl.fedoraproject.org/pub/epel/7/x86_64/ mirrors/puppetlabs/el/7/products/x86_64/: url: http://yum.puppetlabs.com/el/7/products/x86_64/ mirrors/puppetlabs/el/7/dependencies/x86_64/: url: http://yum.puppetlabs.com/el/7/dependencies/x86_64/ mirrors/puppetlabs/puppet/el/7/x86_64: url: http://yum.puppetlabs.com/puppet/el/7/x86_64/ mirrors/passenger/el/7/x86_64/: url: https://oss-binaries.phusionpassenger.com/yum/passenger/el/7/x86_64 mirrors/theforeman/latest/el7/x86_64/: url: http://yum.theforeman.org/releases/latest/el7/x86_64/ mirrors/theforeman/plugins/latest/el7/x86_64/: url: http://yum.theforeman.org/plugins/latest/el7/x86_64/ mirrors/pulp/stable/2/7/x86_64: url: https://repos.fedorapeople.org/pulp/pulp/stable/2/7/x86_64/
  • 26. Pulp hiera (defaults)Pulp hiera (defaults) profile_pulp::promotion_defaults:profile_pulp::promotion_defaults: repositories:repositories: centos_base:centos_base: upstream: /pub/mirrors/centos/7/os/x86_64/upstream: /pub/mirrors/centos/7/os/x86_64/ centos_updates:centos_updates: upstream: /pub/mirrors/centos/7/updates/x86_64/upstream: /pub/mirrors/centos/7/updates/x86_64/ centos_extras:centos_extras: upstream: /pub/mirrors/centos/7/extras/x86_64/upstream: /pub/mirrors/centos/7/extras/x86_64/ upstream:upstream: allow_upload_from: [jenkins]allow_upload_from: [jenkins] retain_old_count: 5retain_old_count: 5 internal:internal: allow_upload_from: [jenkins]allow_upload_from: [jenkins] retain_old_count: 10retain_old_count: 10 unpromotable: trueunpromotable: true custom_build:custom_build: allow_upload_from: [jenkins]allow_upload_from: [jenkins] retain_old_count: 10retain_old_count: 10
  • 27. Pulp hiera (promotions)Pulp hiera (promotions) profile_pulp::yum_promotion_trees:profile_pulp::yum_promotion_trees: hakka:hakka: first_target:first_target: - hakkadev- hakkadev targets:targets: hakkadev:hakkadev: next_targets:next_targets: - hakkauat- hakkauat hakkauat:hakkauat: next_targets:next_targets: - hakkaprod- hakkaprod hakkaprod:hakkaprod: archive: truearchive: true Generates all repositories andGenerates all repositories and promotion scripts :promotion scripts : promote-hakka-hakkadevpromote-hakka-hakkadev promote-hakka-hakkaprodpromote-hakka-hakkaprod promote-hakka-hakkaprod-archivepromote-hakka-hakkaprod-archive promote-hakka-hakkauatpromote-hakka-hakkauat
  • 28. Build the Upstream repoBuild the Upstream repo ● Initially :Initially : – Manually pulp-admin upload filesManually pulp-admin upload files – Pulp-admin copy files to other repoPulp-admin copy files to other repo
  • 29. Build the Upstream repoBuild the Upstream repo ● Step 1Step 1 – Manually pulp-admin upload filesManually pulp-admin upload files – Pulp-admin copy files to other repoPulp-admin copy files to other repo
  • 30. Build the Upstream repoBuild the Upstream repo ● Yaml file that list files (+Yaml file that list files (+ versions) from sourceversions) from source ● Jenkins builds repo onJenkins builds repo on commitcommit - desc: epel tools + certbot (Let's Encrypt)- desc: epel tools + certbot (Let's Encrypt) from: mirrors/epel/7/x86_64from: mirrors/epel/7/x86_64 pkgs:pkgs: - htop- htop - iftop- iftop - mytop- mytop - jq- jq - ncdu- ncdu - rkhunter- rkhunter - certbot- certbot - ngrep- ngrep - desc: gluster- desc: gluster from:from: - mirrors/gluster41/- mirrors/gluster41/ pkgs:pkgs: - glusterfs- glusterfs - glusterfs-api- glusterfs-api - glusterfs-cli- glusterfs-cli - glusterfs-client-xlators- glusterfs-client-xlators - glusterfs-fuse- glusterfs-fuse - glusterfs-libs- glusterfs-libs - glusterfs-server- glusterfs-server - userspace-rcu- userspace-rcu
  • 31. 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)
  • 32. 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.
  • 33. 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/
  • 34. 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