+ All Categories
Home > Technology > Packaging Software, Puppet Labs Style - PuppetConf 2014

Packaging Software, Puppet Labs Style - PuppetConf 2014

Date post: 25-Dec-2014
Category:
Upload: puppet-labs
View: 406 times
Download: 1 times
Share this document with a friend
Description:
Packaging Software, Puppet Labs Style - Melissa Stone, Puppet Labs
27
2014 Presented by Packaging Software, Puppet Labs Edition Melissa Stone Release Engineer | Puppet Labs
Transcript
Page 1: Packaging Software, Puppet Labs Style - PuppetConf 2014

2014

Presented by

Packaging Software, Puppet Labs Edition Melissa Stone Release Engineer | Puppet Labs

Page 2: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

tar -xzvf ${project}.tgz && cd ${project} && ./configure && make && make install

Page 3: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

but but…

• People can just build from source!

• Too much learning…

• No one really cares about packages…

• Too much maintenance!

• Meh, someone’s already doing that for me.

Page 4: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

why?!!?? • Clean production system • Project versioning • Uninstalling • Pre/post install/uninstall actions • Dependency resolution • User confidence

Page 5: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Downloads per week over six monthsapt.puppetlabs.com yum.puppetlabs.com downloads.puppetlabs.com

Page 6: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Downloads per week over six monthstarballs from downloads.puppetlabs.com

Page 7: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Alright, alright, I’m convinced !

!

How do I immerse myself in this insanity??!?!??!?!!1

Page 8: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

case $::osfamily { ‘Redhat’: { class { ‘rpmbuilder’: vendor => ‘Puppet Labs', use_extra_packages => true, } } ‘Debian’: { class { ‘debbuilder’: use_cows => true, }

Builders!

Page 9: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Automation! Let’s take a look at how we can use github.com/puppetlabs/packaging to build a project!

Page 10: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Page 11: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Page 12: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Page 13: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Page 14: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Page 15: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Page 16: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

for rpm files => http://fedoraproject.org/wiki/Packaging:Guidelines !

for deb files => https://www.debian.org/doc/manuals/maint-guide

Platform Files?

Page 17: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Set up SPECS/SOURCES layout

Move spec file and sources into place

Pass spec file and sources to mock to build srpm

Pass srpm to mock to build rpm

Move packages to pkg/ directory

Clean up

Process templates

ssh rpm-builder

git clone ${project}

cd ${project}

rake package:bootstrap

rake pl:mock

Manual Automated

Page 18: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Tar the project contents

Create ${project}.orig.tar.gz from tar ball

Set up the debian directory

Process templates

Move packages to pkg/ directory

Clean up

ssh deb-builder

git clone ${project}

cd ${project}

rake package:bootstrap

rake pl:deb

Move all files into correct location

Build packages with pdebuild in specified COW

AutomatedManual

Page 19: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

rake pl:jenkins:uber_build

Page 20: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Now What?

Page 21: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Signing!

rake pl:sign_deb_changes

rake pl:sign_rpms

Page 22: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Shipping!

rake pl:ship_debs

rake pl:ship_rpms

Page 23: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

apt.puppetlabs.com => sudo freight-add ${repo-source}/* ${repo} sudo -E freight-cache ${repo} !

yum.puppetlabs.com => cd ${repo} ; createrepo --checksum=sha --database --update .

Repos!

Page 24: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

for pkg in ruby hiera facter puppet ; do

tar -xzvf ${pkg}.tar.gz && cd ${pkg} && \

./configure && make && make install ;

done

Page 25: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

yum install puppet

Page 26: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

You can help us if you like! We are always looking for help improving our tools and

processes. Open a ticket at tickets.puppetlabs.com/

browse/CPR, or open a pull request at github.com/

puppetlabs/packaging

Page 27: Packaging Software, Puppet Labs Style - PuppetConf 2014

Presented by

Useful Links debian.org/doc/manuals/maint-guide fedoraproject.org/wiki/Packaging:Guidelines github.com/rcrowley/freight fedoraproject.org/wiki/Extras/CreateRepo github.com/puppetlabs/packaging github.com/puppetlabs/puppetlabs-rpmbuilder github.com/puppetlabs/puppetlabs-debbuilder


Recommended