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.

Dockercon2015 bamboo

19,594 views

Published on

Slides from the tutorial on Docker, Bamboo and continuous integration/deployment pipeline.

Published in: Technology

Dockercon2015 bamboo

  1. 1. STEVE SMITH • DEVOPS ADVOCATE • ATLASSIAN • @TARKASTEVE Docker, Bamboo and the Pipeline https://bitbucket.org/ssmith/dockercon2015-docker-bamboo
  2. 2. Good WP
  3. 3. Testing with Docker
  4. 4. The example project ? https://bitbucket.org/ssmith/atlascamp2015-docker-ci
  5. 5. The example project Transfer Trigger / Async Data Data (See http://bit.do/postgres-es for details)
  6. 6. Docker testing Reuse images Startup speed Idempotent tests Dev / Test match Deploy to Docker
  7. 7. Docker And Bamboo Plan Stage Job Tasks QA Staging Prod Artifacts Deployment Environments Git Repo
  8. 8. All New! Bamboo Docker Task!
  9. 9. AWS cloud agents with Docker With Docker Or create your own
  10. 10. Require Docker support Bamboo will start on-demand
  11. 11. Building
  12. 12. Running
  13. 13. Linking
  14. 14. Compose with BambooSouth Florida Classical Review
  15. 15. No Compose? No problem…
  16. 16. Running Compose
  17. 17. Cleaning up
  18. 18. Extracting ResultsAtlantic Sentinel
  19. 19. Fetching in Bamboo
  20. 20. Fetching container files [ssmith] docker-compose ps Name Command State Ports -------------------------------------------------------------------------------- devweek15code_elasticsearch_1 /bin/sh -c /opt/elasticsea ... Exit -1 devweek15code_postgres_1 /docker-entrypoint.sh postgres Exit 0 devweek15code_transfer_1 /bin/sh -c waitport elasti ... Exit 0 [ssmith] docker-compose ps -q transfer fd7e728e3e9a361d96c253f5aeadab1a3506538d1b0e19d27c82848d9bf48bf8 [ssmith] ID=`docker-compose ps -q transfer` [ssmith] docker cp $ID:/code/testreports.xml . [ssmith] file testreports.xml testreports.xml: XML document text
  21. 21. Using Test Parsers
  22. 22. Parsing JUnit results
  23. 23. Using JUnit results
  24. 24. Deployment Environments Plan Stage Job Tasks QA Staging Prod Artifacts Deployment Environments Git Repo
  25. 25. Deployment Environments QA Staging Prod Artifacts Deployment Environments
  26. 26. Sharing Artifacts
  27. 27. Configuring the Environment
  28. 28. Configuring the Environment
  29. 29. Configuring the Environment
  30. 30. Custom Bamboo VMs Hodinkee
  31. 31. Packer File { "variables": { "aws_access_key": "{{env `AWS_ACCESS_KEY_ID`}}", "aws_secret_key": "{{env `AWS_SECRET_ACCESS_KEY`}}" }, "builders": [{ "type": "amazon-ebs", "access_key": "{{user `aws_access_key`}}", "secret_key": "{{user `aws_secret_key`}}", "region": "us-east-1", "source_ami": "ami-1c247d74", "instance_type": "m1.medium", "ssh_username": "ubuntu", "ami_name": "bamboo-ami {{timestamp}}" }], "provisioners": [{ "type": "shell", "execute_command": "echo 'vagrant'|{{.Vars}} sudo -S -E bash '{{.Path}}'", "scripts": ["scripts/ansible.sh"] }, { "type": "ansible-local", "playbook_dir": ".", "playbook_file": "bamboo-docker-update.yml" } ] } --- - name: Add Docker repo key apt_key: keyserver=keyserver.ubuntu.com id=36A1D7869245C8950F966E9 - name: Add Docker repo apt_repository: repo='deb https://get.docker.com/ubuntu docker main’ - name: Install Docker apt: pkg=lxc-docker - name: Add users to docker group user: name={{item}} groups=docker append=yes with_items: docker_users - name: Install Compose get_url: url="https://github.com/docker/compose/releases/download/ {{compose_version}}/docker-compose-{{ansible_system}}- {{ansible_machine}}" dest=/usr/local/bin/docker-compose - name: Set Compose permissions file: path=/usr/local/bin/docker-compose mode=a+x Ansible Role
  32. 32. STEVE SMITH • DEVOPS ADVOCATE • ATLASSIAN • @TARKASTEVE Thank you!

×