Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rethinking Package Building at Jimdo

Rethinking Package Building at Jimdo

Building Debian packages isn’t always fun. In fact, it can be a pain from time to time. In this presentation, Mathias talks about the challenges of package building at Jimdo and what it means to create a build system that everybody can use.

2190d7a468f51fa3be5eabfc9397a28b?s=128

Mathias Lafeldt

March 31, 2015
Tweet

Transcript

  1. Rethinking Package Building at Jimdo 1

  2. Hello I'm Mathias Lafeldt. 2

  3. I work at Jimdo 3

  4. Building Debian packages isn't (always) fun 4

  5. The Past 5

  6. buildhost02 $ ssh buildhost02.jimdo.office $ sudo su buildmaster $ cd

    ~/builds $ ... do something to build package ... $ ~/scripts/regenerate_deb_repo.sh 6
  7. But... Who built the package? How was it built? Why?

    7
  8. buildhost02 8

  9. Milestone "Packaging 2.0" May 2014 9

  10. Package builds Automated Documented Repeatable 10

  11. A build system that anybody may use 11

  12. Rebuild and redeploy all packages 12

  13. Languages PHP Python Ruby Go (whatever upstream uses) 13

  14. Build instructions debian/rules Makefile script.sh recipe.rb ... 14

  15. The Present 15

  16. Common interface $ make build publish or $ rake build

    publish 16
  17. Old-school Makefile build: dpkg-buildpackage publish: build rsync ../*.deb $(PUBLISH_DIR) $

    make build publish PUBLISH_DIR=/some/path 17
  18. Rake 18

  19. git-buildpackage # Rakefile require "buildtasks" BuildTasks::GitBuildpackage.define do name "periodicnoise" version

    "debian/1.1" source "https://github.com/Jimdo/periodicnoise" end 19
  20. fpm-cookery # Rakefile require "buildtasks" BuildTasks::FPMCookery.define do recipe "recipe.rb" fpm_cookery_version

    "0.25.0" fpm_version "1.3.3" end 20
  21. Rake tasks $ rake -T rake build # Build packages

    rake clean # Remove any temporary products rake clobber # Remove any generated file rake deps # Install build dependencies rake publish # Publish built packages $ rake build publish PUBLISH_DIR=/some/path 21
  22. Demo 22

  23. It's open source! $ gem install buildtasks github.com/Jimdo/buildtasks 23

  24. Jimdo BuildBox1 1 Cool project name. Only used by two

    companies so far. 24
  25. Package recipes + Isolated build env + Shell glue 25

  26. $ cd buildbox/ $ vagrant up <distro> $ script/build <distro>

    <recipe> 26
  27. $ cd buildbox/ $ script/bootstrap <distro> $ script/build <distro> <recipe>

    27
  28. Demo 28

  29. ! buildhost02 ! September 2014 29

  30. The Future 30

  31. Turn shell glue into tool CI for package building Open

    source all the things 31
  32. Thank you. mlafeldt.github.io @mlafeldt 32