SlideShare a Scribd company logo
1 of 35
Download to read offline
Package anything with
fpm-cookery
Marcelo Pinheiro
http://salizzar.net - @salizzar
$ whoami
• Fireman / Problem Solver / Programmer since 2000
• Ruby, Python, Golang, Java, C#, Classic ASP, PHP,
Coldfusion, Erlang and others
• DevOps Engineer @ Moip
In the beginning…
• How software was updated on old times?
• Tarballs (zip, tar.gz)
• Transfer via FTP / SSH / Ctrl+c Ctrl+v
• Common problems
• A not-so maintained README explaining how to update it
• Manual steps
• Lack of rastreability (who updated glibc?)
… to some years ago
• Package Manager concept
• Dependency Resolution
• Filesystem Standardisation
• File Integrity
• Central Package Repository
• Transaction History
… and today
• How software is updated today?
• Configuration Management tool
• Package Manager
Packaging is good?
Why I need to use it?
“Heroku takes care for me!”
– A hipster Ruby programmer
“Docker ships my container to production!”
– A hipster Go programmer
“I can deploy tarballs using my CF tool, man!”
– A darting sysadmin
“Packaging is good.”
– I
Packaging is good
• When your business grow, your software will too
• From monolith app to microservices
• You need to adopt a standard workflow to distribute
software recognisable to all ops people
• Package managers like APT/YUM are well-known
• Deploy-friendly
• You can use your custom solution, of course
Packaging is good
• Configuration Management recipes that manages
tarballs tends to be complex:
• Manual dependency resolution
• Can be a nightmare if requires compilation
• Black magic recipes
Packaging is good
• Configuration Management recipes have support
for main package management tools in-a-box as a
module
• Recipes much more simpler
Packaging is good
It sounds good, but…
It’s complex.
A LOT for newbies.
RPM Packaging: Challenges
• RPM packaging
• # yum install -y rpm-build
• spec file
• one file to rule all
DEB Packaging: Challenges
• DEB packaging:
• # apt-get install -y dpkg-tools
• debian folder with the following files:
• control
• init
• rules
• preinst, postinst, conffiles, dirs, etc…
RPM / DEB: Challenges
• Rich documentation, but…
• $ man p0rn
• Too many options
• High learning curve
“Hnm, I didn’t like. Forget it.”
– All of you here
fpm-cookery for the rescue
C’mon, show me the code! >:(
fpm-cookery for the rescue
• https://github.com/bernd/fpm-cookery
• Bernd Ahlers
• A tool to build and package anything
• Abstraction to famous Jordan Sissel fpm gem
fpm-cookery for the rescue
• Package is created with a recipe
• class MyPackage < FPM::Cookery::Recipe
• Two methods to implement:
• build
• install
• It’s Ruby, man. Enjoy :)
fpm-cookery for the rescue
• Download tarball with precompiled binaries
• Download and compile from source code
• Build dependency resolution with Chef gem
• One recipe to package .rpm, .deb and.dmi
• Helpers to create package filesystem as you need
fpm-cookery Live Demo
• How I package a tarball containing binaries?
• How I package a tarball with source code?
“It sounds good. But how I can package
mundane things like web apps without need to
write recipe for all of them?”
– I, maybe you
Gordon: agnostic packaging
• https://github.com/salizzar/
gordon
• Very oppiniated tool to
package web / standalone
apps
• No need to recipe, just use it
as a CLI
Gordon: agnostic packaging
• Some years ago I wrote a code generator to create Debian
package build files
• Code generator to create skeletons is great, but after some time
you will get a problem when you need to change something
• Some examples:
• change init scripts to use systemd
• add / remove files to project
• Apps will change, developers without knowledge of
standards will break it
Gordon: agnostic packaging
• Foreman to generate init files
• systemd
• Other formats can be included
• inittab
• supervisord
• upstart
• Set of fpm-cookery generic recipes that handles most cases of
web / standalone apps
Gordon: agnostic packaging
• Generic recipes are based on years of application packaging
following good conventions
• Operational System standards (Debian, Red Hat / CentOS)
• Nginx / Apache / Tomcat / Jetty directories
• Application run using their non-interactive shell user or
application server user (Tomcat)
• Dedicated log directory
• /var/run issue
Gordon: agnostic packaging
• Languages supported
• Ruby
• Java
• Plans to include
• Node.js
• Golang
Gordon Live Demo
• How I package a Ruby web app?
Questions?
O’rly?
Thank you! :)

More Related Content

What's hot

Indexing BackPAN
Indexing BackPANIndexing BackPAN
Indexing BackPANbrian d foy
 
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowAnn Cascarano
 
Chef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & ChefChef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & Chefice799
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & HowAlfonso Cabrera
 
Building Open-source React Components
Building Open-source React ComponentsBuilding Open-source React Components
Building Open-source React ComponentsZack Argyle
 
Contributing to WordPress core - a primer
Contributing to WordPress core - a primerContributing to WordPress core - a primer
Contributing to WordPress core - a primerlessbloat
 
Building Open-Source React Components
Building Open-Source React ComponentsBuilding Open-Source React Components
Building Open-Source React ComponentsZack Argyle
 
Introduction to hubot
Introduction to hubotIntroduction to hubot
Introduction to hubotTencent
 
Docker for everything
Docker for everythingDocker for everything
Docker for everythingTim Haak
 
Packaging is the Worst Way to Distribute Software, Except for Everything Else
Packaging is the Worst Way to Distribute Software, Except for Everything ElsePackaging is the Worst Way to Distribute Software, Except for Everything Else
Packaging is the Worst Way to Distribute Software, Except for Everything Elsemckern
 
Build & deploy PHP application (intro level)
Build & deploy PHP application (intro level)Build & deploy PHP application (intro level)
Build & deploy PHP application (intro level)Anton Babenko
 
Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Manning Publications
 
Production Ready WordPress - WC Utrecht 2017
Production Ready WordPress  - WC Utrecht 2017Production Ready WordPress  - WC Utrecht 2017
Production Ready WordPress - WC Utrecht 2017Edmund Turbin
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCIThiago Paes
 
javerosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparisonjaverosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparisonDomingo Suarez Torres
 
Production Ready WordPress #WPLDN
Production Ready WordPress #WPLDNProduction Ready WordPress #WPLDN
Production Ready WordPress #WPLDNEdmund Turbin
 
Puppet Camp Atlanta 2014: DEV Toolsets for Ops (Beginner) -
Puppet Camp Atlanta 2014: DEV Toolsets for Ops (Beginner) - Puppet Camp Atlanta 2014: DEV Toolsets for Ops (Beginner) -
Puppet Camp Atlanta 2014: DEV Toolsets for Ops (Beginner) - Puppet
 
Docker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 WorkshopDocker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 WorkshopChris Tankersley
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet
 
Failing at Scale - PNWPHP 2016
Failing at Scale - PNWPHP 2016Failing at Scale - PNWPHP 2016
Failing at Scale - PNWPHP 2016Chris Tankersley
 

What's hot (20)

Indexing BackPAN
Indexing BackPANIndexing BackPAN
Indexing BackPAN
 
Go with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress WorkflowGo with the Flow - A Guide to a WordPress Workflow
Go with the Flow - A Guide to a WordPress Workflow
 
Chef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & ChefChef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & Chef
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & How
 
Building Open-source React Components
Building Open-source React ComponentsBuilding Open-source React Components
Building Open-source React Components
 
Contributing to WordPress core - a primer
Contributing to WordPress core - a primerContributing to WordPress core - a primer
Contributing to WordPress core - a primer
 
Building Open-Source React Components
Building Open-Source React ComponentsBuilding Open-Source React Components
Building Open-Source React Components
 
Introduction to hubot
Introduction to hubotIntroduction to hubot
Introduction to hubot
 
Docker for everything
Docker for everythingDocker for everything
Docker for everything
 
Packaging is the Worst Way to Distribute Software, Except for Everything Else
Packaging is the Worst Way to Distribute Software, Except for Everything ElsePackaging is the Worst Way to Distribute Software, Except for Everything Else
Packaging is the Worst Way to Distribute Software, Except for Everything Else
 
Build & deploy PHP application (intro level)
Build & deploy PHP application (intro level)Build & deploy PHP application (intro level)
Build & deploy PHP application (intro level)
 
Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...Crafting interactive troubleshooting guides and team documentation for your K...
Crafting interactive troubleshooting guides and team documentation for your K...
 
Production Ready WordPress - WC Utrecht 2017
Production Ready WordPress  - WC Utrecht 2017Production Ready WordPress  - WC Utrecht 2017
Production Ready WordPress - WC Utrecht 2017
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCI
 
javerosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparisonjaverosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparison
 
Production Ready WordPress #WPLDN
Production Ready WordPress #WPLDNProduction Ready WordPress #WPLDN
Production Ready WordPress #WPLDN
 
Puppet Camp Atlanta 2014: DEV Toolsets for Ops (Beginner) -
Puppet Camp Atlanta 2014: DEV Toolsets for Ops (Beginner) - Puppet Camp Atlanta 2014: DEV Toolsets for Ops (Beginner) -
Puppet Camp Atlanta 2014: DEV Toolsets for Ops (Beginner) -
 
Docker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 WorkshopDocker for Developers - PNWPHP 2016 Workshop
Docker for Developers - PNWPHP 2016 Workshop
 
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
Puppet Camp LA 2015: Package Managers and Puppet (Beginner)
 
Failing at Scale - PNWPHP 2016
Failing at Scale - PNWPHP 2016Failing at Scale - PNWPHP 2016
Failing at Scale - PNWPHP 2016
 

Viewers also liked

Deployment Patterns in the Ruby on Rails World
Deployment Patterns in the Ruby on Rails WorldDeployment Patterns in the Ruby on Rails World
Deployment Patterns in the Ruby on Rails WorldNikhil Mungel
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionFabio Kung
 
Building & Scaling a Front End Practice & Team
Building & Scaling a Front End Practice & TeamBuilding & Scaling a Front End Practice & Team
Building & Scaling a Front End Practice & TeamMonika Piotrowicz
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with RailsYi-Ting Cheng
 
Vegetable & fruit cookery
Vegetable & fruit cookeryVegetable & fruit cookery
Vegetable & fruit cookeryanshuman kelsy
 

Viewers also liked (7)

Idioms IváN
Idioms IváNIdioms IváN
Idioms IváN
 
Deployment Patterns in the Ruby on Rails World
Deployment Patterns in the Ruby on Rails WorldDeployment Patterns in the Ruby on Rails World
Deployment Patterns in the Ruby on Rails World
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
 
Rails in docker
Rails in dockerRails in docker
Rails in docker
 
Building & Scaling a Front End Practice & Team
Building & Scaling a Front End Practice & TeamBuilding & Scaling a Front End Practice & Team
Building & Scaling a Front End Practice & Team
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
 
Vegetable & fruit cookery
Vegetable & fruit cookeryVegetable & fruit cookery
Vegetable & fruit cookery
 

Similar to Package anything with fpm cookery

Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015ice799
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010Kang-min Liu
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015ice799
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Mandi Walls
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)p3castro
 
What's new with CentOS at Facebook
What's new with CentOS at FacebookWhat's new with CentOS at Facebook
What's new with CentOS at FacebookDavide Cavalca
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-wayRobert Lujo
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Molliewillemstuursma
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAlberto Molina Coballes
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Bruno Capuano
 
Ruby v cpp_preso
Ruby v cpp_presoRuby v cpp_preso
Ruby v cpp_presojessicard
 
scaling compiled applications - highload 2013
scaling compiled applications - highload 2013scaling compiled applications - highload 2013
scaling compiled applications - highload 2013ice799
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat OverviewMandi Walls
 
Joe Damato
Joe DamatoJoe Damato
Joe DamatoOntico
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...Gaetano Giunta
 
Bridging the Gap - Laracon 2013
Bridging the Gap - Laracon 2013Bridging the Gap - Laracon 2013
Bridging the Gap - Laracon 2013Ben Corlett
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet
 

Similar to Package anything with fpm cookery (20)

Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015Package manages and Puppet - PuppetConf 2015
Package manages and Puppet - PuppetConf 2015
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
 
Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014Open Source Tools for Leveling Up Operations FOSSET 2014
Open Source Tools for Leveling Up Operations FOSSET 2014
 
Packaging perl (LPW2010)
Packaging perl (LPW2010)Packaging perl (LPW2010)
Packaging perl (LPW2010)
 
What's new with CentOS at Facebook
What's new with CentOS at FacebookWhat's new with CentOS at Facebook
What's new with CentOS at Facebook
 
CentOS at Facebook
CentOS at FacebookCentOS at Facebook
CentOS at Facebook
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
 
Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?Que nos espera a los ALM Dudes para el 2013?
Que nos espera a los ALM Dudes para el 2013?
 
Ruby v cpp_preso
Ruby v cpp_presoRuby v cpp_preso
Ruby v cpp_preso
 
scaling compiled applications - highload 2013
scaling compiled applications - highload 2013scaling compiled applications - highload 2013
scaling compiled applications - highload 2013
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
 
CommandBox at CFCamp 2014
CommandBox at CFCamp 2014CommandBox at CFCamp 2014
CommandBox at CFCamp 2014
 
Joe Damato
Joe DamatoJoe Damato
Joe Damato
 
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
eZ Publish 5: from zero to automated deployment (and no regressions!) in one ...
 
Bridging the Gap - Laracon 2013
Bridging the Gap - Laracon 2013Bridging the Gap - Laracon 2013
Bridging the Gap - Laracon 2013
 
Nodeconf npm 2011
Nodeconf npm 2011Nodeconf npm 2011
Nodeconf npm 2011
 
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow Puppet Camp New York 2014: Streamlining Puppet Development Workflow
Puppet Camp New York 2014: Streamlining Puppet Development Workflow
 

Recently uploaded

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Recently uploaded (20)

Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Package anything with fpm cookery

  • 1. Package anything with fpm-cookery Marcelo Pinheiro http://salizzar.net - @salizzar
  • 2.
  • 3. $ whoami • Fireman / Problem Solver / Programmer since 2000 • Ruby, Python, Golang, Java, C#, Classic ASP, PHP, Coldfusion, Erlang and others • DevOps Engineer @ Moip
  • 4. In the beginning… • How software was updated on old times? • Tarballs (zip, tar.gz) • Transfer via FTP / SSH / Ctrl+c Ctrl+v • Common problems • A not-so maintained README explaining how to update it • Manual steps • Lack of rastreability (who updated glibc?)
  • 5. … to some years ago • Package Manager concept • Dependency Resolution • Filesystem Standardisation • File Integrity • Central Package Repository • Transaction History
  • 6. … and today • How software is updated today? • Configuration Management tool • Package Manager
  • 7. Packaging is good? Why I need to use it?
  • 8. “Heroku takes care for me!” – A hipster Ruby programmer
  • 9. “Docker ships my container to production!” – A hipster Go programmer
  • 10. “I can deploy tarballs using my CF tool, man!” – A darting sysadmin
  • 12. Packaging is good • When your business grow, your software will too • From monolith app to microservices • You need to adopt a standard workflow to distribute software recognisable to all ops people • Package managers like APT/YUM are well-known • Deploy-friendly • You can use your custom solution, of course
  • 13. Packaging is good • Configuration Management recipes that manages tarballs tends to be complex: • Manual dependency resolution • Can be a nightmare if requires compilation • Black magic recipes
  • 14. Packaging is good • Configuration Management recipes have support for main package management tools in-a-box as a module • Recipes much more simpler
  • 15. Packaging is good It sounds good, but…
  • 17. A LOT for newbies.
  • 18. RPM Packaging: Challenges • RPM packaging • # yum install -y rpm-build • spec file • one file to rule all
  • 19. DEB Packaging: Challenges • DEB packaging: • # apt-get install -y dpkg-tools • debian folder with the following files: • control • init • rules • preinst, postinst, conffiles, dirs, etc…
  • 20. RPM / DEB: Challenges • Rich documentation, but… • $ man p0rn • Too many options • High learning curve
  • 21. “Hnm, I didn’t like. Forget it.” – All of you here
  • 22. fpm-cookery for the rescue C’mon, show me the code! >:(
  • 23. fpm-cookery for the rescue • https://github.com/bernd/fpm-cookery • Bernd Ahlers • A tool to build and package anything • Abstraction to famous Jordan Sissel fpm gem
  • 24. fpm-cookery for the rescue • Package is created with a recipe • class MyPackage < FPM::Cookery::Recipe • Two methods to implement: • build • install • It’s Ruby, man. Enjoy :)
  • 25. fpm-cookery for the rescue • Download tarball with precompiled binaries • Download and compile from source code • Build dependency resolution with Chef gem • One recipe to package .rpm, .deb and.dmi • Helpers to create package filesystem as you need
  • 26. fpm-cookery Live Demo • How I package a tarball containing binaries? • How I package a tarball with source code?
  • 27. “It sounds good. But how I can package mundane things like web apps without need to write recipe for all of them?” – I, maybe you
  • 28. Gordon: agnostic packaging • https://github.com/salizzar/ gordon • Very oppiniated tool to package web / standalone apps • No need to recipe, just use it as a CLI
  • 29. Gordon: agnostic packaging • Some years ago I wrote a code generator to create Debian package build files • Code generator to create skeletons is great, but after some time you will get a problem when you need to change something • Some examples: • change init scripts to use systemd • add / remove files to project • Apps will change, developers without knowledge of standards will break it
  • 30. Gordon: agnostic packaging • Foreman to generate init files • systemd • Other formats can be included • inittab • supervisord • upstart • Set of fpm-cookery generic recipes that handles most cases of web / standalone apps
  • 31. Gordon: agnostic packaging • Generic recipes are based on years of application packaging following good conventions • Operational System standards (Debian, Red Hat / CentOS) • Nginx / Apache / Tomcat / Jetty directories • Application run using their non-interactive shell user or application server user (Tomcat) • Dedicated log directory • /var/run issue
  • 32. Gordon: agnostic packaging • Languages supported • Ruby • Java • Plans to include • Node.js • Golang
  • 33. Gordon Live Demo • How I package a Ruby web app?