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 full-size slide

  2. Hello
    I'm Mathias Lafeldt.
    2

    View full-size slide

  3. I work at Jimdo
    3

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  7. buildhost02
    8

    View full-size slide

  8. Milestone
    "Packaging 2.0"
    May 2014
    9

    View full-size slide

  9. Package builds
    Automated
    Documented
    Repeatable
    10

    View full-size slide

  10. A build system that
    anybody may use
    11

    View full-size slide

  11. Rebuild
    and
    redeploy
    all packages
    12

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  14. The Present
    15

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  18. 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 full-size slide

  19. 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 full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  25. ! buildhost02 !
    September 2014
    29

    View full-size slide

  26. The Future
    30

    View full-size slide

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

    View full-size slide

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

    View full-size slide