ci cd with drone docker
play

CI/CD with Drone/Docker Justin Phelps onitato.com @Linuturk - PowerPoint PPT Presentation

CI/CD with Drone/Docker Justin Phelps onitato.com @Linuturk Terminology Lets discuss some terminology: CI CD Docker Drone CI Continuous Integration - test your code all the time for all the things, automatically. CD


  1. CI/CD with Drone/Docker Justin Phelps onitato.com @Linuturk

  2. Terminology Let’s discuss some terminology: ● CI ● CD ● Docker ● Drone

  3. CI Continuous Integration - test your code all the time for all the things, automatically.

  4. CD Continuous Delivery - deliver new code to environments as it is tested, automatically.

  5. Docker ● New Hotness! ● Isolated, self contained environment. ● Minimum resource overhead. ● Great for testing, with some exceptions.

  6. Docker

  7. Drone ● Written in Go ● Integrates with Github/Bitbucket ● Open Source and “as a service” https://github.com/drone/drone

  8. .drone.yml Configuration sections: ● image ● env ● script ● services ● notify ● deploy / publish

  9. .drone.yml - image The image option defines which Docker Image to use for testing. ● python ● ruby ● node ● dart ● java ● php ● etc

  10. drone.yml - env env is used to set environment variables. I like to use this to add another layer to my Secret Parameters. env: - RAXUSER={{rackspace_username}}

  11. .drone.yml - script script defines your build commands for your application. Include things like: ● syntax checks and linting ● unit tests ● functional tests Build fails if any command exits != 0

  12. .drone.yml - services Define any services your app tests against. Some options include: ● redis ● couchdb ● mysql ● postgres ● rabbitmq ● mongo ● etc

  13. .drone.yml - notify Notify based on the results of your build. ● email ● webhook ● hipchat ● started ● success ● failure

  14. .drone.yml - deploy/publish You can deploy and/or publish your app once a build completes. ● heroku ● git ● ssh ● bash ● Swift ● PyPi ● S3

  15. Demo 1. Install Drone: Install Docs $ wget http://downloads.drone.io/latest/drone.deb $ sudo dpkg -i drone.deb 2. Setup Github: Setup Docs 3. Add a repository. 4. Commit a .drone.yml file.

  16. Installing Drone Make sure Docker and docker-py are installed. wget http://downloads.drone.io/latest/drone.deb sudo dpkg -i drone.deb Drone should now be listening on port 80. http://<your IP>/install

  17. Installing Drone

  18. Setup Github https://github.com/settings/applications

  19. Setup Github

  20. Add Repository

  21. Add Repository

  22. Add Repository

  23. Add Repository

  24. Commit a .drone.yml File image: linuturk/pelican script: - whoami - make -C $DRONE_BUILD_DIR html publish: swift: username: {{rax_username}} password: {{rax_apikey}} auth_url: https://identity.api.rackspacecloud.com/v2.0 region: ORD container: www.onitato.com source: $DRONE_BUILD_DIR/output branch: master

  25. Watch Build

  26. Watch Build

  27. Questions? Justin Phelps @Linuturk

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend