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

Bamboo & Docker

Steve Teo
February 22, 2017

Bamboo & Docker

This is a talk regarding consistent build environments using Bamboo and Docker. It was presented during Singapore Atlassian User Group's February 2017 Meetup

Steve Teo

February 22, 2017
Tweet

More Decks by Steve Teo

Other Decks in Technology

Transcript

  1. • Me - Cloud DevOps Lead in SGX - Previous

    Build Tooling Experience: Jenkins / Teamcity - Baby steps into Bamboo & Docker • Current Environment - Jira / Confluence / Bitbucket / Bamboo - Mobile: Swift / Android - FE: SPA (HTML5/CSS/JS) - BE: Java / PHP - Infra: On-Prem & AWS • Goal - Provide consistent build & deployment environments Background
  2. Easy Setup & Usage Why Bamboo? Tight Integration with the

    Atlassian Stack Pipelines & Feature Branches as First-Class Citizens
  3. Goal: Consistent CI Environments • Problem • Traditional Challenges of

    Build Environment • Use Case • Building traditional artifacts eg. jar, golang, rpm, deb • Minimize your need for bamboo remote agents • Solves • Consistent Runtime Environment: “It runs on my computer” • Dependency Hell from OS to App
  4. Docker Baby Steps • Docker Hub • https://hub.docker.com/explore/ • https://hub.docker.com/_/hello-world/

    • Run the following • docker pull hello-world • docker run hello-world • docker ps -a
  5. Bamboo Server on Docker • Source • https://github.com/cptactionhank/docker-atlassian-bamboo • https://hub.docker.com/r/cptactionhank/atlassian-bamboo

    • Run the following • docker run -d -p 8085:8085 -p 54663:54663 cptactionhank/atlassian- bamboo:latest • docker exec -i -t <container> /bin/bash • docker ps
  6. Bamboo Remote Agent on Host Mac • Run the following

    • java -jar atlassian-bamboo-agent-installer-5.15.0.1.jar http://localhost:8085/agentServer/
  7. Sample Java Project with Unit Test • Source Image •

    https://hub.docker.com/r/niaquinto/gradle/ • Project • https://github.com/stevepotayteo/saug-bamboo-docker-example • Not the best design of course • Every source code change results in a new docker image • Answer: Maybe use Docker Volume to mount source code from host
  8. Food for Thought & Future Investigations • Separating Code from

    Tests • Containers as a Deployment Unit • Integration Testing • Running Bamboo Agent in a Container • https://confluence.atlassian.com/bamboo/getting-started-with-docker-and- bamboo-687213473.html • Elastic Bamboo • Container Orchestration • Good Read: Docker Testing Strategies • http://blog.terranillius.com/post/docker_testing/
  9. Learning References • Up & Running • https://deninet.com/blog/1582/docker-scratch-part-1-installing-and-your- first-container •

    http://www.tricksofthetrades.net/2015/12/23/installing-running-docker/ • Docker & Bamboo • https://confluence.atlassian.com/bamboo/getting-started-with-docker-and- bamboo-687213473.html • Docker Testing Strategies • http://blog.terranillius.com/post/docker_testing/
  10. Learning References • Running Bamboo Agents • https://confluence.atlassian.com/bamboo/getting-started-with-docker-and- bamboo-687213473.html •

    https://blog.avisi.nl/2016/01/22/get-more-out-of-bamboo-with-docker-part-1/ • http://blog.brianmkelley.com/leveraging-bamboo-with-docker/ • Automating Docker Deployments to Amazon ECS • http://www.tothenew.com/blog/how-to-automate-docker-deployments-in-aws-ecs/ • https://github.com/awslabs/aws-cicd-docker-containers • CI with Docker & Docker-Compose • https://www.digitalocean.com/community/tutorials/how-to-configure-a- continuous-integration-testing-environment-with-docker-and-docker-compose-on-
  11. Learning References • CI with Docker & Docker-Compose • https://www.digitalocean.com/community/tutorials/how-to-configure-a-

    continuous-integration-testing-environment-with-docker-and-docker-compose-on- ubuntu-14-04 • Bamboo Feature Branches • https://www.atlassian.com/continuous-delivery/building-feature-branches-with- bamboo