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.

Mathias Lafeldt

March 31, 2015
Tweet

More Decks by Mathias Lafeldt

Other Decks in Technology

Transcript

  1. Rethinking
    Package Building
    at Jimdo
    1

    View Slide

  2. Hello
    I'm Mathias Lafeldt.
    2

    View Slide

  3. I work at Jimdo
    3

    View Slide

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

    View Slide

  5. The Past
    5

    View Slide

  6. buildhost02
    $ ssh buildhost02.jimdo.office
    $ sudo su buildmaster
    $ cd ~/builds
    $ ... do something to build package ...
    $ ~/scripts/regenerate_deb_repo.sh
    6

    View Slide

  7. But...
    Who built the package?
    How was it built?
    Why?
    7

    View Slide

  8. buildhost02
    8

    View Slide

  9. Milestone
    "Packaging 2.0"
    May 2014
    9

    View Slide

  10. Package builds
    Automated
    Documented
    Repeatable
    10

    View Slide

  11. A build system that
    anybody may use
    11

    View Slide

  12. Rebuild
    and
    redeploy
    all packages
    12

    View Slide

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

    View Slide

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

    View Slide

  15. The Present
    15

    View Slide

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

    View Slide

  17. Old-school Makefile
    build:
    dpkg-buildpackage
    publish: build
    rsync ../*.deb $(PUBLISH_DIR)
    $ make build publish PUBLISH_DIR=/some/path
    17

    View Slide

  18. Rake
    18

    View Slide

  19. git-buildpackage
    # Rakefile
    require "buildtasks"
    BuildTasks::GitBuildpackage.define do
    name "periodicnoise"
    version "debian/1.1"
    source "https://github.com/Jimdo/periodicnoise"
    end
    19

    View Slide

  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

    View Slide

  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

    View Slide

  22. Demo
    22

    View Slide

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

    View Slide

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

    View Slide

  25. Package recipes
    +
    Isolated build env
    +
    Shell glue
    25

    View Slide

  26. $ cd buildbox/
    $ vagrant up
    $ script/build
    26

    View Slide

  27. $ cd buildbox/
    $ script/bootstrap
    $ script/build
    27

    View Slide

  28. Demo
    28

    View Slide

  29. ! buildhost02 !
    September 2014
    29

    View Slide

  30. The Future
    30

    View Slide

  31. Turn shell glue into tool
    CI for package building
    Open source all the things
    31

    View Slide

  32. Thank you.
    mlafeldt.github.io
    @mlafeldt
    32

    View Slide