Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

openSUSE Conference 2017 - The Docker at Travis Presentation

150 views

Published on

Slides from the openSUSE Conference 2017 presentation.

The presentation describes the advantages of using Docker at Travis. There 2 described examples how we use it in the YaST team.

Published in: Software
  • Be the first to comment

  • Be the first to like this

openSUSE Conference 2017 - The Docker at Travis Presentation

  1. 1. Ladislav Slezák YaST Developer lslezak@suse.cz Docker at Travis There is no excuse for NOT using a CI
  2. 2. Why Travis?
  3. 3. Travis – Introduction ● CI as a service (hosted) ● Free for open source projects ● Integrated with GitHub
  4. 4. Travis ● Builds run in Ubuntu 12.04 (Precise) or 14.04 (Trusty) VM ● 12.04 is discontinued, even 14.04 is pretty old ● What if you need a newer compiler, libraries? ● What if you need a completely different distro? ● Local/remote debugging not possible
  5. 5. Why Docker?
  6. 6. Docker ● Works out of box at Travis ● Container based, no virtualization ● Lightweight (minimal overhead) ● Many base OS images available ● Easy to build and publish your own images
  7. 7. Example1: Snapper
  8. 8. Snapper ● A tool for managing file system snapshots ● Portable, built for many distributions in OBS ● Single Git source repository ● Changed less frequently
  9. 9. Snapper – Travis Implementation ● Separate Dockerfile (defines the Docker image) and build script for each target distribution ● The Docker images are built at Travis – Easier to maintain – Takes some more time ● The targets are built in parallel at Travis
  10. 10. Snapper – Travis https://travis-ci.org/openSUSE/snapper
  11. 11. Example2: YaST
  12. 12. YaST ● Not portable, (open)SUSE specific ● Does not work in other distributions ● Modular design ● 100+ Git source repositories ● Bigger development team, frequent changes
  13. 13. YaST – Old Ubuntu Setup ● Build YaST packages for Ubuntu 12.04 in OBS – Not a full port! Just enough for running unit tests (system access is simulated) ● Extra work, hard to maintain ● Not reliable (false positives or uncaught issues) ● Limited scope for tests (cannot build RPM easily)
  14. 14. YaST – New Docker Setup ● Pre-built Docker images at Docker Hub – Faster (only built once) – Two images for Ruby or C++ packages – The Travis script is included (shared)
  15. 15. Docker at Travis – Summary ● Less maintenace ● More reliable builds – Using the real target distribution ● Easier debugging – Use the same Docker image locally ● Independent on Travis default OS – Ubuntu 12.04 will be dropped soon (switch to 14.04)
  16. 16. Questions?
  17. 17. Links ● https://blog.ladslezak.cz/2017/03/28/docker_at_travis/ ● https://travis-ci.org/ ● https://docs.travis-ci.com/user/docker/ ● https://docs.docker.com/ ● https://github.com/openSUSE/snapper/blob/master/README.Travis.md ● https://yastgithubio.readthedocs.io/en/latest/travis-integration/ ● https://github.com/yast/docker-yast-ruby ● https://hub.docker.com/r/yastdevel/ruby/
  18. 18. Contacts ● ML: yast-devel@opensuse.org ● IRC: #yast at freenode.net
  19. 19. Thank You!
  20. 20. Join Us at www.opensuse.org
  21. 21. License This slide deck is licensed under the Creative Commons Attribution-ShareAlike 4.0 International license. It can be shared and adapted for any purpose (even commercially) as long as Attribution is given and any derivative work is distributed under the same license. Details can be found at https://creativecommons.org/licenses/by-sa/4.0/ General Disclaimer This document is not to be construed as a promise by any participating organisation to develop, deliver, or market a product. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. openSUSE makes no representations or warranties with respect to the contents of this document, and specifically disclaims any express or implied warranties of merchantability or fitness for any particular purpose. The development, release, and timing of features or functionality described for openSUSE products remains at the sole discretion of openSUSE. Further, openSUSE reserves the right to revise this document and to make changes to its content, at any time, without obligation to notify any person or entity of such revisions or changes. All openSUSE marks referenced in this presentation are trademarks or registered trademarks of SUSE LLC, in the United States and other countries. All third-party trademarks are the property of their respective owners. Credits Template Richard Brown rbrown@opensuse.org Design & Inspiration openSUSE Design Team http://opensuse.github.io/branding- guidelines/

×