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

CircleCI Meetup #3 Slides

Kim, Hirokuni
September 16, 2017

CircleCI Meetup #3 Slides

Kim, Hirokuni

September 16, 2017
Tweet

More Decks by Kim, Hirokuni

Other Decks in Technology

Transcript

  1. 1

  2. 3 Why 2.0 is fast? Core tools/software in 2.0 1

    2 Dev Culture at CircleCI 3 New Features in 2.0 4 5 Agenda QA
  3. 5 Basic Architecture API Billing Webhook Usage Job Dispatcher gRPC

    Server Workflows Nomad Docker Container Build Agent Test Results 1.0/2.0 Services 2.0 Services Git Push
  4. 6 Build Agent • Core component of 2.0 • Written

    in Go • gRPC and Asynchronous Build Execution • Running on Docker
  5. 7 • Support Multiple Languages • Message Streaming • Asynchronous

    RPC call • SSL/TSL communication • Many many many features…. No More SSH Asynchronous Build Execution With gRPC High Performance RPC framework
  6. 8 Basic Architecture API Billing Webhook Usage Job Dispatcher gRPC

    Server Workflows Nomad Docker Container Build Agent Test Results 1.0/2.0 Services 2.0 Services Git Push
  7. 10 SSH is everywhere in 1.0 Host Machine Container Step

    1: ssh ubuntu@container1 bundle install Step 1: Exit Code & Output Step 2: Exit Code & Output Step 2: ssh ubuntu@container1 rspec Synchronous Build Step Execution
  8. 11 gRPC in 2.0 Asynchronous Build Step Execution gRPC Server

    Build Agent Compiled Build Steps: step 1, step 2 Step 1: Exit Code & Output Step 2: Exit Code & Output
  9. 12 • Pre-install packages • No more apt-get install •

    Creative Caching Custom Image & Flexible Caching
  10. 14 Other improvements • Inference daemon is gone • Remove

    extra tasks when starting container • The performance of each step is mostly the same • Proper resource allocation
  11. 17 • Leading Linux Container Platform • Replacing LXC in

    CircleCI 2.0 • Production ready • Very active development • Docker is not slow! Leading Linux Container Platform Docker The leading container platform
  12. 18 Basic Architecture API Billing Webhook Usage Job Dispatcher gRPC

    Server Workflows Nomad Docker Container Build Agent Test Results 1.0/2.0 Services 2.0 Services Git Push
  13. 20 Things We Learned About Docker Performance Docker is not

    slow Active Development Always use the latest Kernel Container Isolation Cgroup is not perfect
  14. 21 Things We Learned About Docker Active Development • Always

    use the latest kernel • Performance and stability issues with old kernels Container Isolation • Using cgroup doesn’t guarantee resource isolation • We are working on better I/O performance • https://sysdig.com/blog/container-isolation-gone-wrong/ Performance • Docker is not slow • I/O penalty in CoW is small • CircleCI DB images with optimizations
  15. 22 Revenge of VMs • VMs are used for machine

    executor in 2.0 • VMs are getting cheaper • Also faster: 45 ~ 60 secs to spin up a VM in GCP • Full control over hardware resource
  16. 24 • Simple Architecture • Still beta but reliable Job

    Scheduler in 2.0 Nomad Easy Deploy Applications At Any Scale
  17. 25 Basic Architecture API Billing Webhook Usage Job Dispatcher gRPC

    Server Workflows Nomad Docker Container Build Agent Test Results 1.0/2.0 Services 2.0 Services Git Push
  18. 26 Nomad: Job Scheduler in 2.0 • All builds are

    Nomad jobs • Simple architecture • Still pre-1.0 but stable • Sometimes backward compatibility is broken, though...
  19. 27 • Backbone for microservices in 2.0 • Rolling updates

    of services Breaking monolith into microservices Kubernetes Production-Grade Container Orchestration
  20. 34 jobs: build: docker: - image:quay.io/project/image:tag auth: username: $QUAY_USERNAME password:

    $QUAY_PASSWORD Sample .circleci/config.yml Private Images • Support Private Repositories • DockerHub, GCR, ECR, Quay.io and more
  21. 35 • Missing feature in 2.0 • Filter job execution

    by tag workflows: version: 2 build-workflow: jobs: - build: filters: tags: ignore: /^testing-.*/ Sample .circleci/config.yml Git Tag Support
  22. 36 • Creating sets of env vars in the organization

    page • Share the env vars among projects workflows: version: 2 my-workflow: jobs: - run-tests: context: org-global Sample .circleci/config.yml Contexts
  23. 37 • Running macOS builds in 2.0 infrastructure • Workflow

    support • We want beta customers!! jobs: build: macos: xcode: version: 8.3.3 Sample .circleci/config.yml macOS in 2.0 (beta)
  24. 38 • Enterprise in 2.0 was just out! • Only

    supporting AWS at the moment 2.0 in Enterprise (AWS)