FPM at the Ruby Drink-up of Sophia, September 2011

962 views

Published on

An overview of the FPM packaging tool made by Jordan Sissel (@jordansissel), in the context of ruby applications and gems deployment.
Presented at the Ruby Drink-up of Sophia Antipolis on the 6th of September 2011 by Emmanuel Bastien (@ebastien).

http://rivierarb.fr/2011/09/06/BackToSchool-Drinkup/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
962
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

FPM at the Ruby Drink-up of Sophia, September 2011

  1. 1. FPMThe Swiss Army knife of the casual packager Emmanuel Bastien September 2011 Ruby Drinkup Sophia
  2. 2. Who am I?@ebastienhttps://github.com/ebastienPolyglot programmerTechnologies enthusiastFOSS believer
  3. 3. A day in the life of a DevOps
  4. 4. When operating a production environment, one of yourbest friends is your configuration managementsoftware.Puppet is a well known open source configurationmanagement tool.
  5. 5. What Puppet typically handles for you: Network, Email and system tools System user accounts Monitoring agent Web server Database server Ruby runtime All your configuration files
  6. 6. All you have to do now is deploy your app and maybesome Gems.Puppet knows how to install (and uninstall) nativepackages.Wanna build one for your app?
  7. 7. Native packaging is greatNative packaging is hardDistribution policies are here for good reasons......but you dont care about policies if you are not amaintainer!
  8. 8. FPM to the rescue "Effing Package Management" https://github.com/jordansissel/fpm by @jordansissel
  9. 9. FPM puts a native package blanket on top of: directories gems Python modules Node packages
  10. 10. Itll make it deployable by your system packagesmanager but wont fool a maintainer.
  11. 11. FPM in practice
  12. 12. Packaging the runtime deps of rivierarb.frsudo gem install fpmmkdir -p ~/tmp/gemscd ~/tmpgem install --no-ri --no-rdoc --install-dir ~/tmp/gems jekyll compass rdiscountfind ~/tmp/gems/cache/ -name "*.gem" | xargs -rn1 fpm -s gem -t deb
  13. 13. Packaging the content of rivierarb.frmkdir -p ~/tmp/opt/rivierarbwget -O - http://github.com/rivierarb/rivierarb/tarball/gh-pages|tar -xz --strip-components=1 -C ~/tmp/opt/rivierarbfpm -s dir -t deb -n rivierarb -v 0.2.0 -a all -d "rubygem-jekyll (>= 0.11.0)" -d "rubygem-compass (>= 0.11.5)" -d "rubygem-rdiscount (>= 1.6.8)" ./opt/rivierarb
  14. 14. Deploying rivierarb.fr$ ls -1 *.debrivierarb_0.2.0_all.debrubygem-albino_1.3.3_all.debrubygem-chunky-png_1.2.1_all.debrubygem-classifier_1.3.3_all.debrubygem-compass_0.11.5_all.debrubygem-directory-watcher_1.4.1_all.debrubygem-fast-stemmer_1.0.0_amd64.debrubygem-fssm_0.2.7_all.debrubygem-jekyll_0.11.0_all.debrubygem-kramdown_0.13.3_all.debrubygem-liquid_2.2.2_all.debrubygem-maruku_0.6.0_all.debrubygem-posix-spawn_0.3.6_amd64.debrubygem-rdiscount_1.6.8_amd64.debrubygem-sass_3.1.7_all.debrubygem-syntax_1.0.0_all.deb
  15. 15. Deploying rivierarb.frNext steps: Upload the packages to your private repository Reference the new version in your Puppet manifest
  16. 16. Deploying rivierarb.frpackage { rivierarb: ensure => 0.2.0 }
  17. 17. Referenceshttp://github.com/jordansissel/fpmhttp://morethanseven.net/2011/04/29/Creating-a-cucumber-nagios-package-with-fpm.htmlhttp://projects.puppetlabs.com/projects/puppet/wikihttp://www.jejik.com/articles/2006/09/setting_up_and_managing_an_apt_repository_with_reprepro/ This work is licensed under the Creative Commons Attribution 3.0 Unported License.

×