SlideShare a Scribd company logo
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 BackPAN
brian 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 Workflow
Ann Cascarano
 
Chef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & ChefChef Conf 2015: Package Management & Chef
Chef Conf 2015: Package Management & Chef
ice799
 
Ansible: What, Why & How
Ansible: What, Why & HowAnsible: What, Why & How
Ansible: What, Why & How
Alfonso Cabrera
 
Building Open-source React Components
Building Open-source React ComponentsBuilding Open-source React Components
Building Open-source React Components
Zack Argyle
 
Contributing to WordPress core - a primer
Contributing to WordPress core - a primerContributing to WordPress core - a primer
Contributing to WordPress core - a primer
lessbloat
 
Building Open-Source React Components
Building Open-Source React ComponentsBuilding Open-Source React Components
Building Open-Source React Components
Zack Argyle
 
Introduction to hubot
Introduction to hubotIntroduction to hubot
Introduction to hubot
Tencent
 
Docker for everything
Docker for everythingDocker for everything
Docker for everything
Tim 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 Else
mckern
 
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 2017
Edmund Turbin
 
Integração Contínua com PHPCI
Integração Contínua com PHPCIIntegração Contínua com PHPCI
Integração Contínua com PHPCI
Thiago Paes
 
javerosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparisonjaverosmx-2015-marzo-groovy-java8-comparison
javerosmx-2015-marzo-groovy-java8-comparison
Domingo Suarez Torres
 
Production Ready WordPress #WPLDN
Production Ready WordPress #WPLDNProduction Ready WordPress #WPLDN
Production Ready WordPress #WPLDN
Edmund 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 Workshop
Chris 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 2016
Chris 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

Idioms IváN
Idioms IváNIdioms IváN
Idioms IváN
Iván Bautista Díaz
 
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
Nikhil Mungel
 
Ruby and Rails Packaging to Production
Ruby and Rails Packaging to ProductionRuby and Rails Packaging to Production
Ruby and Rails Packaging to Production
Fabio Kung
 
Rails in docker
Rails in dockerRails in docker
Rails in docker
Andrew Klotz
 
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
Monika Piotrowicz
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
Yi-Ting Cheng
 
Vegetable & fruit cookery
Vegetable & fruit cookeryVegetable & fruit cookery
Vegetable & fruit cookery
anshuman 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 2015
ice799
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010
Kang-min Liu
 
Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015Puppet Camp LA 2/19/2015
Puppet Camp LA 2/19/2015
ice799
 
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
Mandi 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 Facebook
Davide Cavalca
 
CentOS at Facebook
CentOS at FacebookCentOS at Facebook
CentOS at Facebook
Phil Dibowitz
 
Django dev-env-my-way
Django dev-env-my-wayDjango dev-env-my-way
Django dev-env-my-way
Robert Lujo
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
willemstuursma
 
Automated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. AnsibleAutomated Deployment and Configuration Engines. Ansible
Automated Deployment and Configuration Engines. Ansible
Alberto 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_preso
jessicard
 
scaling compiled applications - highload 2013
scaling compiled applications - highload 2013scaling compiled applications - highload 2013
scaling compiled applications - highload 2013
ice799
 
Habitat Overview
Habitat OverviewHabitat Overview
Habitat Overview
Mandi Walls
 
CommandBox at CFCamp 2014
CommandBox at CFCamp 2014CommandBox at CFCamp 2014
CommandBox at CFCamp 2014
Ortus Solutions, Corp
 
Joe Damato
Joe DamatoJoe Damato
Joe Damato
Ontico
 
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 2013
Ben Corlett
 
Nodeconf npm 2011
Nodeconf npm 2011Nodeconf npm 2011
Nodeconf npm 2011
Florent Jaby ヅ
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
Tomas Doran
 

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
 
Steamlining your puppet development workflow
Steamlining your puppet development workflowSteamlining your puppet development workflow
Steamlining your puppet development workflow
 

Recently uploaded

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Zilliz
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
Introducing Milvus Lite: Easy-to-Install, Easy-to-Use vector database for you...
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

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?