SlideShare a Scribd company logo
1 of 20
Download to read offline
Deploying with Super
Cow Powers
Hosting your own APT repository
with reprepro
Simon Boulet
Consultant, Deployment and Automation
simon@nostalgeek.com
DevOps Montréal
February 2015
1
Challenge of Modern Application
You want:
- Nginx 1.7
- Node.js 0.11
- MongoDB 2.6
- Consul
But latest Ubuntu has:
- Nginx 1.4.6
- Node.js 0.10.25
- MongoDB 2.4.9
- Consul N/A
2
/etc/apt/sources.list
3
How do you turn this:
deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
deb https://deb.nodesource.com/node-devel wheezy main
deb http://nginx.org/packages/mainline/debian/ wheezy nginx
deb http://ppa.launchpad.net/bcandrea/consul/ubuntu/ trusty main
Into this:
deb http://apt.devops.quebec/ dev main
Signatures
And this:
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280
apt-key adv --keyserver keyserver.ubuntu.com --recv 7BD9BF62
apt-key adv --keyserver keyserver.ubuntu.com --recv E2FDAE02
Into this:
apt-key adv --keyserver keyserver.ubuntu.com --recv ABCD1234
4
Red Pill, Blue Pill?
Who has never been through this?
5
Reprepro
- Manage your own APT repository
- Allow for syncing external repos
- Can do signatures checks and resign
- Does NOT package .deb for you
- Does NOT make your repository externally
accessible
6
Syncing External Repo
7
Reprepro: conf/updates
Name: mongodb
Suite: dist
Components: 10gen>main
Method: http://downloads-distro.mongodb.org/repo/debian-sysvinit
VerifyRelease: 7F0CEB10
Name: nodesource
Suite: jessie
Components: main
Method: https://deb.nodesource.com/node-devel
FilterFormula: Package (==nodejs)
VerifyRelease: 68576280
Name: debian-20141003
Suite: jessie
Components: main
Method: http://snapshot.debian.org/archive/debian/20141003T221320Z/
FilterFormula: Source (==libguestfs)
VerifyRelease: 46925553
8
Reprepro: conf/distributions
Codename: dev
Suite: unstable
Architectures: amd64
Components: main
Tracking: minimal
Update: mongodb nodesource nginx consul debian-20141003
SignWith: ABCD1234
Codename: prod
Suite: stable
Architectures: amd64
Components: main
Tracking: minimal
SignWith: ABCD1234
reprepro update
9
Packaging Configurations Tricks
- Rebuild config packages simultaneously for
all environments
- Bump config package version on each build
- Don’t store secrets in packages
- Use conf.d directories when available
- Setup diversion if you really need to update
configurations files provided by other
packages
10
Config Package: debian/control
Source: superapp-config
Section: unknown
Priority: extra
Maintainer: Simon Boulet <simon@nostalgeek.com>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.3
Package: superapp-config-dev
Architecture: all
Provides: superapp-config
Description: Super App Config (dev)
Package: superapp-config-prod
Architecture: all
Provides: superapp-config
Description: Super App Config (prod)
11
Config Package: debian/*.install files
debian/superapp-config-dev.install:
dev/etc/nginx/conf.d/ssl.conf etc/nginx/conf.d
dev/etc/superapp/config.js etc/superapp
common/etc/nginx/conf.d/common.conf etc/nginx/conf.d
debian/superapp-config-prod.install:
prod/etc/nginx/conf.d/ssl.conf etc/nginx/conf.d
prod/etc/superapp/config.js etc/superapp
common/etc/nginx/conf.d/common.conf etc/nginx/conf.d
dh_make
12
Multiple Environments
- Use per-environment config package
- Each environment to have their own suite:
deb http://apt.devops.quebec/ dev main
deb http://apt.devops.quebec/ staging main
deb http://apt.devops.quebec/ prod main
- Always add package to dev, and use copy to
promote from dev to staging or prod
13
Promoting Dev > Staging > Prod
Adding to dev:
reprepro includedeb dev <.deb file>
Promoting from dev to prod:
reprepro copy prod dev <packages...>
14
Integrating with CM Tools
Ansible:
- Add your repository (apt_repository)
- Import your signing key (apt_key)
- Ensure conformity (ansible --check)
15
Export your Repository
Using your favorite web server:
- Make /dist and /pool folders available
- Use .htaccess (or other method) for limiting
access
Using SSH:
deb ssh://repo@apt.devops.quebec/path/to/repo dev main
16
Going Large Scale
- Sync your repository to an Object Store
(Amazon S3, Rackspace Cloud Files, etc.)
- Use CDN service in front of your repository
(CloudFront, CloudFlare, etc.)
17
Notes on using Amazon S3
- S3 treats “+” in filename as space
characters. Packages with “+” in their
version numbers won’t work [1]
- No HTTP authentication on S3. See apt-
transport-s3 [2] for private repo.
18
[1] https://forums.aws.amazon.com/message.jspa?messageID=208095
[2] https://github.com/kyleshank/apt-transport-s3
Deploying with Super Cow Powers
- Control versions of packages in different
environments (enforces deployment
pipeline)
- Simplifies repo and key management by
having a centralized repo
- Ease config management by packaging
application configuration
19
Thank you!
Questions?
Simon Boulet
simon@nostalgeek.com
https://www.linkedin.com/in/simonboulet
https://github.com/siboulet
20

More Related Content

What's hot

Installing apache sqoop
Installing apache sqoopInstalling apache sqoop
Installing apache sqoopEnrique Davila
 
Installing hive on ubuntu 16
Installing hive on ubuntu 16Installing hive on ubuntu 16
Installing hive on ubuntu 16Enrique Davila
 
Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16Enrique Davila
 
How to contribute Apache CloudStack
How to contribute Apache CloudStackHow to contribute Apache CloudStack
How to contribute Apache CloudStackGo Chiba
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPressdotCloud
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottleJordi Soucheiron
 
Nuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationNuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationPASCAL Jean Marie
 
Barcamp Gent 2: rsnapshot
Barcamp Gent 2: rsnapshotBarcamp Gent 2: rsnapshot
Barcamp Gent 2: rsnapshotPeter Dedecker
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleStein Inge Morisbak
 
uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsTomislav Raseta
 
How we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental BackupsHow we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental Backupsnicholaspaun
 
Controlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonControlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonYurii Vasylenko
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsyncHazel Smith
 
Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Conrad Cruz
 
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringAeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringConrad Cruz
 

What's hot (20)

Ansible intro
Ansible introAnsible intro
Ansible intro
 
Installing apache sqoop
Installing apache sqoopInstalling apache sqoop
Installing apache sqoop
 
Ex407
Ex407Ex407
Ex407
 
Installing hive on ubuntu 16
Installing hive on ubuntu 16Installing hive on ubuntu 16
Installing hive on ubuntu 16
 
Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16Installing hadoop on ubuntu 16
Installing hadoop on ubuntu 16
 
How to contribute Apache CloudStack
How to contribute Apache CloudStackHow to contribute Apache CloudStack
How to contribute Apache CloudStack
 
Dev ops
Dev opsDev ops
Dev ops
 
Fabric: A Capistrano Alternative
Fabric:  A Capistrano AlternativeFabric:  A Capistrano Alternative
Fabric: A Capistrano Alternative
 
Dockerizing WordPress
Dockerizing WordPressDockerizing WordPress
Dockerizing WordPress
 
nginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottlenginx + uwsgi emperor + bottle
nginx + uwsgi emperor + bottle
 
Nuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationNuxeo5 - Continuous Integration
Nuxeo5 - Continuous Integration
 
Capistrano
CapistranoCapistrano
Capistrano
 
Barcamp Gent 2: rsnapshot
Barcamp Gent 2: rsnapshotBarcamp Gent 2: rsnapshot
Barcamp Gent 2: rsnapshot
 
Zero Downtime Deployment with Ansible
Zero Downtime Deployment with AnsibleZero Downtime Deployment with Ansible
Zero Downtime Deployment with Ansible
 
uWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web appsuWSGI - Swiss army knife for your Python web apps
uWSGI - Swiss army knife for your Python web apps
 
How we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental BackupsHow we setup Rsync-powered Incremental Backups
How we setup Rsync-powered Incremental Backups
 
Controlling multiple VMs with the power of Python
Controlling multiple VMs with the power of PythonControlling multiple VMs with the power of Python
Controlling multiple VMs with the power of Python
 
Using filesystem capabilities with rsync
Using filesystem capabilities with rsyncUsing filesystem capabilities with rsync
Using filesystem capabilities with rsync
 
Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)Aeon mike guide transparent ssl filtering (1)
Aeon mike guide transparent ssl filtering (1)
 
Aeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filteringAeon mike guide transparent ssl filtering
Aeon mike guide transparent ssl filtering
 

Similar to Host your own APT repo with reprepro

How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)Thierry Gayet
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with dockerJohan Janssen
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMAlexander Shopov
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionFabio Kung
 
RAC-Installing your First Cluster and Database
RAC-Installing your First Cluster and DatabaseRAC-Installing your First Cluster and Database
RAC-Installing your First Cluster and DatabaseNikhil Kumar
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linuxnejadmand
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment TacticsIan Barber
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package managerTimur Safin
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wikiyaranusa
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDocker, Inc.
 
テストプラン
テストプランテストプラン
テストプランstucon
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed AssafAhmed Assaf
 
Node.js Build, Deploy and Scale Webinar
Node.js Build, Deploy and Scale WebinarNode.js Build, Deploy and Scale Webinar
Node.js Build, Deploy and Scale Webinarjguerrero999
 
Docker for Java developers at JavaLand
Docker for Java developers at JavaLandDocker for Java developers at JavaLand
Docker for Java developers at JavaLandJohan Janssen
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleOrestes Carracedo
 
Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14jijukjoseph
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabSoftware Guru
 

Similar to Host your own APT repo with reprepro (20)

How to make debian package from scratch (linux)
How to make debian package from scratch (linux)How to make debian package from scratch (linux)
How to make debian package from scratch (linux)
 
Continuous delivery with docker
Continuous delivery with dockerContinuous delivery with docker
Continuous delivery with docker
 
Bundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPMBundling Packages and Deploying Applications with RPM
Bundling Packages and Deploying Applications with RPM
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
 
RAC-Installing your First Cluster and Database
RAC-Installing your First Cluster and DatabaseRAC-Installing your First Cluster and Database
RAC-Installing your First Cluster and Database
 
Software management in linux
Software management in linuxSoftware management in linux
Software management in linux
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Deployment Tactics
Deployment TacticsDeployment Tactics
Deployment Tactics
 
Approaching package manager
Approaching package managerApproaching package manager
Approaching package manager
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Erp 2.50 openbravo environment installation openbravo-wiki
Erp 2.50 openbravo environment installation   openbravo-wikiErp 2.50 openbravo environment installation   openbravo-wiki
Erp 2.50 openbravo environment installation openbravo-wiki
 
DCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best PracticesDCSF19 Dockerfile Best Practices
DCSF19 Dockerfile Best Practices
 
テストプラン
テストプランテストプラン
テストプラン
 
Introduction to node.js By Ahmed Assaf
Introduction to node.js  By Ahmed AssafIntroduction to node.js  By Ahmed Assaf
Introduction to node.js By Ahmed Assaf
 
Node.js Build, Deploy and Scale Webinar
Node.js Build, Deploy and Scale WebinarNode.js Build, Deploy and Scale Webinar
Node.js Build, Deploy and Scale Webinar
 
Docker for Java developers at JavaLand
Docker for Java developers at JavaLandDocker for Java developers at JavaLand
Docker for Java developers at JavaLand
 
Deploying PHP Applications with Ansible
Deploying PHP Applications with AnsibleDeploying PHP Applications with Ansible
Deploying PHP Applications with Ansible
 
grate techniques
grate techniquesgrate techniques
grate techniques
 
Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14Hadoop single node installation on ubuntu 14
Hadoop single node installation on ubuntu 14
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 

Recently uploaded

Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...Neha Pandey
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Delhi Call girls
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...aditipandeya
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.soniya singh
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)Damian Radcliffe
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girladitipandeya
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...SofiyaSharma5
 
SEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistSEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistKHM Anwar
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGAPNIC
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsstephieert
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirtrahman018755
 

Recently uploaded (20)

Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
Dwarka Sector 26 Call Girls | Delhi | 9999965857 🫦 Vanshika Verma More Our Se...
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
𓀤Call On 7877925207 𓀤 Ahmedguda Call Girls Hot Model With Sexy Bhabi Ready Fo...
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
Best VIP Call Girls Noida Sector 75 Call Me: 8448380779
 
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Ashram Chowk Delhi 💯Call Us 🔝8264348440🔝
 
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
10.pdfMature Call girls in Dubai +971563133746 Dubai Call girls
 
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Defence Colony Delhi 💯Call Us 🔝8264348440🔝
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
VIP 7001035870 Find & Meet Hyderabad Call Girls Dilsukhnagar high-profile Cal...
 
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Green Park Escort Service Delhi N.C.R.
 
How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)How is AI changing journalism? (v. April 2024)
How is AI changing journalism? (v. April 2024)
 
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call GirlVIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
VIP 7001035870 Find & Meet Hyderabad Call Girls LB Nagar high-profile Call Girl
 
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
Low Rate Young Call Girls in Sector 63 Mamura Noida ✔️☆9289244007✔️☆ Female E...
 
SEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization SpecialistSEO Growth Program-Digital optimization Specialist
SEO Growth Program-Digital optimization Specialist
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
Networking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOGNetworking in the Penumbra presented by Geoff Huston at NZNOG
Networking in the Penumbra presented by Geoff Huston at NZNOG
 
Radiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girlsRadiant Call girls in Dubai O56338O268 Dubai Call girls
Radiant Call girls in Dubai O56338O268 Dubai Call girls
 
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya ShirtChallengers I Told Ya Shirt
Challengers I Told Ya ShirtChallengers I Told Ya Shirt
 

Host your own APT repo with reprepro

  • 1. Deploying with Super Cow Powers Hosting your own APT repository with reprepro Simon Boulet Consultant, Deployment and Automation simon@nostalgeek.com DevOps Montréal February 2015 1
  • 2. Challenge of Modern Application You want: - Nginx 1.7 - Node.js 0.11 - MongoDB 2.6 - Consul But latest Ubuntu has: - Nginx 1.4.6 - Node.js 0.10.25 - MongoDB 2.4.9 - Consul N/A 2
  • 3. /etc/apt/sources.list 3 How do you turn this: deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen deb https://deb.nodesource.com/node-devel wheezy main deb http://nginx.org/packages/mainline/debian/ wheezy nginx deb http://ppa.launchpad.net/bcandrea/consul/ubuntu/ trusty main Into this: deb http://apt.devops.quebec/ dev main
  • 4. Signatures And this: apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10 apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280 apt-key adv --keyserver keyserver.ubuntu.com --recv 7BD9BF62 apt-key adv --keyserver keyserver.ubuntu.com --recv E2FDAE02 Into this: apt-key adv --keyserver keyserver.ubuntu.com --recv ABCD1234 4
  • 5. Red Pill, Blue Pill? Who has never been through this? 5
  • 6. Reprepro - Manage your own APT repository - Allow for syncing external repos - Can do signatures checks and resign - Does NOT package .deb for you - Does NOT make your repository externally accessible 6
  • 8. Reprepro: conf/updates Name: mongodb Suite: dist Components: 10gen>main Method: http://downloads-distro.mongodb.org/repo/debian-sysvinit VerifyRelease: 7F0CEB10 Name: nodesource Suite: jessie Components: main Method: https://deb.nodesource.com/node-devel FilterFormula: Package (==nodejs) VerifyRelease: 68576280 Name: debian-20141003 Suite: jessie Components: main Method: http://snapshot.debian.org/archive/debian/20141003T221320Z/ FilterFormula: Source (==libguestfs) VerifyRelease: 46925553 8
  • 9. Reprepro: conf/distributions Codename: dev Suite: unstable Architectures: amd64 Components: main Tracking: minimal Update: mongodb nodesource nginx consul debian-20141003 SignWith: ABCD1234 Codename: prod Suite: stable Architectures: amd64 Components: main Tracking: minimal SignWith: ABCD1234 reprepro update 9
  • 10. Packaging Configurations Tricks - Rebuild config packages simultaneously for all environments - Bump config package version on each build - Don’t store secrets in packages - Use conf.d directories when available - Setup diversion if you really need to update configurations files provided by other packages 10
  • 11. Config Package: debian/control Source: superapp-config Section: unknown Priority: extra Maintainer: Simon Boulet <simon@nostalgeek.com> Build-Depends: debhelper (>= 8.0.0) Standards-Version: 3.9.3 Package: superapp-config-dev Architecture: all Provides: superapp-config Description: Super App Config (dev) Package: superapp-config-prod Architecture: all Provides: superapp-config Description: Super App Config (prod) 11
  • 12. Config Package: debian/*.install files debian/superapp-config-dev.install: dev/etc/nginx/conf.d/ssl.conf etc/nginx/conf.d dev/etc/superapp/config.js etc/superapp common/etc/nginx/conf.d/common.conf etc/nginx/conf.d debian/superapp-config-prod.install: prod/etc/nginx/conf.d/ssl.conf etc/nginx/conf.d prod/etc/superapp/config.js etc/superapp common/etc/nginx/conf.d/common.conf etc/nginx/conf.d dh_make 12
  • 13. Multiple Environments - Use per-environment config package - Each environment to have their own suite: deb http://apt.devops.quebec/ dev main deb http://apt.devops.quebec/ staging main deb http://apt.devops.quebec/ prod main - Always add package to dev, and use copy to promote from dev to staging or prod 13
  • 14. Promoting Dev > Staging > Prod Adding to dev: reprepro includedeb dev <.deb file> Promoting from dev to prod: reprepro copy prod dev <packages...> 14
  • 15. Integrating with CM Tools Ansible: - Add your repository (apt_repository) - Import your signing key (apt_key) - Ensure conformity (ansible --check) 15
  • 16. Export your Repository Using your favorite web server: - Make /dist and /pool folders available - Use .htaccess (or other method) for limiting access Using SSH: deb ssh://repo@apt.devops.quebec/path/to/repo dev main 16
  • 17. Going Large Scale - Sync your repository to an Object Store (Amazon S3, Rackspace Cloud Files, etc.) - Use CDN service in front of your repository (CloudFront, CloudFlare, etc.) 17
  • 18. Notes on using Amazon S3 - S3 treats “+” in filename as space characters. Packages with “+” in their version numbers won’t work [1] - No HTTP authentication on S3. See apt- transport-s3 [2] for private repo. 18 [1] https://forums.aws.amazon.com/message.jspa?messageID=208095 [2] https://github.com/kyleshank/apt-transport-s3
  • 19. Deploying with Super Cow Powers - Control versions of packages in different environments (enforces deployment pipeline) - Simplifies repo and key management by having a centralized repo - Ease config management by packaging application configuration 19