Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

ConcourseCi overview

2.440 visualizaciones

Publicado el

Overview about ConcourseCI system.
Unit testing and continuous integration

Publicado en: Tecnología

ConcourseCi overview

  1. 1. 05/19/2016 Etourneau Gwenn @The_shinji62 Concourse Overview
  2. 2. About me Etourneau Gwenn Sr Solution Architect Bef.: Platform Architect https://github.com/shinji62 https://twitter.com/the_shinji62
  3. 3. Pivotal • Spring Framework • RabbitMQ • Concourse • Cloud Foundry • Pivotal Tracker • Gemfire
  4. 4. Agenda • Yet Another CI / CD • Architecture • Usage • Demo • Q&A
  5. 5. Yet Another CI / CD
  6. 6. But
  7. 7. Why not Jenkins ? (v1) • Snowflakes • No strict isolation • Too much dependency • well java …. ( ) • V2 really ?! pipeline yes ! but Groovy ..
  8. 8. Why not Jenkins ? (v1) • Snowflakes • No strict isolation • Too much dependency • well java …. • V2 really ?! pipeline yes ! but Groovy ..
  9. 9. Why not ? • No pipeline • Difficult to debug, commit to debug • Difficult to use / configure .. • Learning curve is high • Difficult to see everything
  10. 10. WE ARE ENGINEER
  11. 11. Concourse • Pluggable Resource Interface • Running builds in Containers Natively • Zero Snowflake-able Configuration • Submitting builds from the local file system up to run in CI • Pipeline pipeline pipeline !!! • Reproducible
  12. 12. Concourse
  13. 13. Concourse • Pluggable Resource Interface • Running builds in Containers Natively • Zero Snowflake-able Configuration • Submitting builds from the local file system up to run in CI • Pipeline pipeline pipeline !!! • Reproducible
  14. 14. Yes yaml …. Concourse
  15. 15. Concourse
  16. 16. Download Yaml Set-pipeline in concourse Concourse
  17. 17. Concourse • Pluggable Resource Interface • Running builds in Containers Natively • Zero Snowflake-able Configuration • Submitting builds from the local file system up to run in CI • Pipeline pipeline pipeline !!! • Reproducible
  18. 18. Architecture
  19. 19. Architecture ATC TSA Workers
  20. 20. Architecture ATC Air Traffic Controller • Brain • Web UI (ELM) • Responsible for Pipeline scheduling ELM
  21. 21. Architecture TSA Travel Security Agency • Register workers against ATC • Unregister workers against ATC
  22. 22. Architecture Workers • No State • Run the task • Container inside Garden container • Register themselves to the TSA
  23. 23. Architecture Workers Garden image_resource: type: docker-image source: repository: ubuntu/…. Garden image_resource: type: docker-image source: repository: ubuntu/…. Garden image_resource: type: docker-image source: repository: ubuntu/…. Garden image_resource: type: docker-image source: repository: ubuntu/…. VM Operating System
  24. 24. Concourse • Pluggable Resource Interface • Running builds in Containers Natively • Zero Snowflake-able Configuration • Submitting builds from the local file system up to run in CI • Pipeline pipeline pipeline !!! • Reproducible
  25. 25. Concept
  26. 26. Three main concept • Jobs • Resource } PIPELINE • Task
  27. 27. Task • Smallest configurable unit in a Concourse pipeline • Always behave same ways if inputs are the same result should be the same • Basically run things into containers • Input and output • Exit 0 ==> Success • Exit != 0 ==> failed
  28. 28. Task platform image_resource inputs run Worker type Docker image used to run the task input used by the task what to do unit-testing.yml
  29. 29. Task unit-testing
  30. 30. Concourse • Pluggable Resource Interface • Running builds in Containers Natively • Zero Snowflake-able Configuration • Submitting builds from the local file system up to run in CI • Pipeline pipeline pipeline !!! • Reproducible
  31. 31. Pipeline
  32. 32. Pipeline Master Develop
  33. 33. Pipeline
  34. 34. Resource Resource Resource Resource
  35. 35. Resource • Objects used for jobs in the pipeline. • Base on the resource type, ex : git, s3, github-release, semver, slack…. even your own • As well as input or output • Git • Git-release • Docker Image • S3 • Semver • Etc .. • Slack • Twitter • Perforce • Bintray • Flowdoc • Etc … Official Community
  36. 36. name type Source, etc… Name of resource resource type in this case git resource depend of the resource Resource
  37. 37. Resource (own resource type) Can import new resource type directly into the pipeline
  38. 38. Concourse • Pluggable Resource Interface • Running builds in Containers Natively • Zero Snowflake-able Configuration • Submitting builds from the local file system up to run in CI • Pipeline pipeline pipeline !!! • Reproducible
  39. 39. Job Job Job Job
  40. 40. Job • Determine “actions” of the pipeline • Plan, which resource, which task and in which order • Basically • What I need to do ? ==> Task • What I need to use ? ==> Resource • What I need to produce ? ==> Resource
  41. 41. Job name public serial plan Name of jobs Visibility input used by the task builds_plan pipeline.yml
  42. 42. Get Job Build-plans Input resource trigger the job new version of the resource 1 Job = 1 build-plan Task Run the task unit-testing pipeline.yml
  43. 43. VM Operating System Garden Basic Rootfs base on busybox git clone myrepos ./concourse-meetup-goserve-ci Task unit testing . is mounted ./concourse-meetup-goserve-ci/ci/unit-testin/unit-testing.yml
  44. 44. Usage
  45. 45. Installation Vagrant for local deployment Bosh for Cluster deployment, aws, azure, gce vagrant init concourse/lite vagrant up Configure your deployment file Deploy your cluster docker, chef etc… you can use the concourse binary
  46. 46. Installation Concourse Binary You can use the concourse binary with your favorite tool. Or no tool at all https://github.com/concourse/bin
  47. 47. First Step $ fly -t blite sync To be sure your client is on the same version of your Concourse deployment sync $ fly -t blite login --concourse-url https://ci.example.com login and create target to be use for all command login
  48. 48. One off-Task $ fly -t blite execute -c my-task.yml --input my-input-res=. Run one-off task from the local directoryexecute I want to execute the task my-task.yml using my local directory as input my-input-res
  49. 49. Pipeline $ fly -t blite set-pipeline -p pipeline-name -c ci/pipeline.yml --load-vars-from=/secret/credentials.yml set-pipeline Set or update the pipeline I want to setup the pipeline defined in ci/pipeline.yml and I will use the file credentials.ml for variable
  50. 50. Demo
  51. 51. One off-Task $fly -t clocal execute -c ci/unit-testing/unit-testing.yml --input concourse-meetup-goserv-ci=. Running unit-testing task
  52. 52. Pipeline $ fly -t clocal set-pipeline -p -p concourse-meetup-c ci/ pipeline.yml set-pipeline Set or update the pipeline
  53. 53. Online Resource
  54. 54. Documentation Tutorials • Official documentation http://concourse.ci • S&B https://github.com/starkandwayne/concourse-tutorial • Flight-School http://concourse.ci/flight-school.html
  55. 55. Public Pipeline • Buildpack • http://buildpacks-ci.cfapps.io/ • CF Release • https://runtime.ci.cf-app.com/pipelines/cf-release • Bosh • https://main.bosh-ci.cf-app.com/ • Concourse • https://ci.concourse.ci/
  56. 56. Slack http://concourseci.slack.com/
  57. 57. Q & A
  58. 58. Thank You !!

×