SlideShare una empresa de Scribd logo
1 de 59
Descargar para leer sin conexión
Artem Nikitin
Heisenbug | May, 2018
New CI from scratch
These slides are already available!
https://bit.ly/2rOa0Ah
© 2018 HERE | PublicHeisenbug | May, 2018
About SDK
© 2018 HERE | PublicHeisenbug | May, 2018
https://developer.here.com/develop/mobile-sdks
Specifics of our existing SDK
• Huge codebase in C++/Java/ObjC
• 40 min checkout sources from scratch
• 6 GB size of source code after checkout
• 11M+ LOC (including dependencies)
© 2018 HERE | PublicHeisenbug | May, 2018
© 2018 HERE | PublicHeisenbug | May, 2018
Problems of existed SDK
• Build on top of huge internal monolithic core
• Big size of SDK
• No modularity in SDK
• Low developer productivity
© 2018 HERE | PublicHeisenbug | May, 2018
Problems of existed CI
• Big Jenkins setup
https://www.youtube.com/watch?v=cT8GjzM1DXk
https://conferences.oreilly.com/velocity/vl-eu-2017/public/schedule/detail/61951
• Highly opinionated CI setup
• Hard to customize
• Apple support is third class citizen
© 2018 HERE | PublicHeisenbug | May, 2018
© 2018 HERE | PublicHeisenbug | May, 2018
01
Solving architecture
problems first
Huge and complex codebase
• Huge internal codebase (10M+ LOC)
• Very modular (1000+ Git repos)
• Our project depends on almost 100 internal
dependencies
© 2018 HERE | PublicHeisenbug | May, 2018
Solution
• Using `repo` for working with codebase
https://source.android.com/setup/develop/
• Gerrit for code reviews
https://news.ycombinator.com/item?id=8605293
• Block changes to our dependencies if they are failing
our builds/tests
© 2018 HERE | PublicHeisenbug | May, 2018
Lots of boilerplate code
• Complex codebase structure with C++/Java/ObjC
• Code written by different people from different teams
• No consistency in implementation
• Lots of manually written boilerplate code
© 2018 HERE | PublicHeisenbug | May, 2018
Solution
• Using IDL to describe public API
• Using code generation to generate all the boilerplate
code based on IDL description
• We are using Djinni from Dropbox
https://github.com/dropbox/djinni
© 2018 HERE | PublicHeisenbug | May, 2018
Djinni, IDL
© 2018 HERE | PublicHeisenbug | May, 2018
Djinni, generated C++
© 2018 HERE | PublicHeisenbug | May, 2018
Djinni, generated Java
© 2018 HERE | PublicHeisenbug | May, 2018
Djinni, generated ObjC
© 2018 HERE | PublicHeisenbug | May, 2018
Complex build system
• Project setup is complicated and unfriendly
• Separate build setups for local development and for CI
© 2018 HERE | PublicHeisenbug | May, 2018
Solution
• Universal build system/setup for local development
and CI
• Make project setup as friendly as possible
© 2018 HERE | PublicHeisenbug | May, 2018
Script
© 2018 HERE | PublicHeisenbug | May, 2018
Differences in test coverage
• Platform level tests written by different people from
different teams
• As a result, sometimes test coverage differ between
platforms
© 2018 HERE | PublicHeisenbug | May, 2018
Solution
• Using BDD as a tool
• Specify test scenarios with Gherkin
• It forces to have exactly the same tests on every
platform
© 2018 HERE | PublicHeisenbug | May, 2018
02
New CI
© 2018 HERE | PublicHeisenbug | May, 2018
Foundation of our new CI
• Jenkins (TeamCity? GitLab? Travis CI? AWS CodeBuild?)
• AWS (GCP? Azure? Virtualization? Own hardware?
Kubernetes? Mesos?)
• Docker (Configuration management?)
• Mac (Own hardware? Managed hosting? Virtualization?)
© 2018 HERE | PublicHeisenbug | May, 2018
CI Overview
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Mac nodes
Jenkins
Artifactory
Gerrit
S3 Device Farm
Workflow: Blocking change before merging
© 2018 HERE | PublicHeisenbug | May, 2018
Developer
Gerrit
Chang
e
Workflow: Verify after merging
© 2018 HERE | PublicHeisenbug | May, 2018
Gerrit
Developer
S3
Workflow: Release
© 2018 HERE | PublicHeisenbug | May, 2018
Gerrit
Artifactory
User
User
Jenkins
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Mac nodes
Jenkins
Artifactory
Gerrit
S3 Device Farm
Jenkins
© 2018 HERE | PublicHeisenbug | May, 2018
Freestyle jobs Declarative pipeline
Easy to use + -
Maintenance - +
Configuration as Code -* +
Shared lib/code -* +
Reaction on job
status
-* +
Complex scenarios +/- +
WTF per minute min a lot
AWS
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Mac nodes
Jenkins
Artifactory
Gerrit
S3 Device Farm
AWS
• Spot Instances - key element for scalable CI
• A way to get resources with discount up to 90%
• But no guarantee of availability!
• We paid around 65 USD for 500+ hours in April
• 0.12 USD per hour -> x3 cheaper then On-Demand price
of the same instance!
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Mac nodes
Jenkins
Artifactory
Gerrit
S3 Device Farm
AWS
• EFS - it’s a NAS (Network-attached storage)
• Very tricky throughput management
https://docs.aws.amazon.com/efs/latest/ug/performance.html
• You should monitor BurstCreditBalance metric
• Around 25 USD per ~100GB of cache in April
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
Use cases:
• We are using it for sharing ccache cache to speed up
C++ compilation
• You can use it to share something between EC2
instances
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Mac nodes
Jenkins
Artifactory
Gerrit
S3 Device Farm
AWS
• S3 – object storage
• S3 isn’t a file system!
• Not just for storing files
• 2.52 USD in April for 1M+ of requests and 400GB+ of
output traffic
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
Use cases:
• We are using it to store temporary build artifacts
(demo apps, reports, logs, screenshots, etc…)
• We are delivering releases to public using S3 with
CloudFront
• I’m hosting my personal blog on S3
• Once I used it like a DB for a hackathon project,
because it was easy to use and cheap J
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Mac nodes
Jenkins
Artifactory
Gerrit
S3 Device Farm
AWS
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
• Lambda – new paradigm
• Run code on events without thinking about
infrastructure
• Pay for amount of resources and time
• Lambda’s from Java to Go -> 2x money savings
• 250K+ requests and 180K seconds in April for 3.16 USD*
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
Use cases:
• Posting review feedback to code changes in Gerrit
• Killing unused EC2 instances
• Updating AMI (like Packer but with our specifics)
• Collecting metrics from test apps
• In general, it’s a great glue for AWS services
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Mac nodes
Jenkins
Artifactory
Gerrit
S3 Device Farm
AWS
• Device Farm – mobile devices in cloud
• Supports fuzzing (random input events), mobile web,
android and iOS testing
• Supports Appium, Calabash and “native” tools
• Remote access to devices
• https://github.com/artemnikitin/devicefarm-ci-tool
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
Must Do in the Cloud:
• Immutable infrastructure
• Infrastructure as Code
• Prepare for failures
• Monitor your spending's
© 2018 HERE | PublicHeisenbug | May, 2018
AWS
https://github.com/open-guides/og-aws
https://www.expeditedssl.com/aws-in-plain-English
https://read.acloud.guru/
https://www.slideshare.net/hornsby/10-lessons-from-10-years-of-aws
https://seleniumcamp.com/talk/scaling-execution-of-protractorjs-on-aws-
lambda-with-selenoid/
https://aws.amazon.com/blogs/devops/ui-testing-at-scale-with-aws-
lambda/
https://www.youtube.com/watch?v=EDZBYbEwhm8
https://www.youtube.com/watch?v=73-G2zQ9sHU
https://www.youtube.com/watch?v=ZgxZCXouBkY
https://www.youtube.com/watch?v=w7X4gAQTk2E
© 2018 HERE | PublicHeisenbug | May, 2018
Docker
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Docker
• Docker – tool for operating-system-level virtualization,
aka containerization
• We are using it to encapsulate environment for builds
• We are ”backing” images in AMI
• It creates a problem. We need to keep AMI up to date
© 2018 HERE | PublicHeisenbug | May, 2018
Docker
© 2018 HERE | PublicHeisenbug | May, 2018
Mac nodes
© 2018 HERE | PublicHeisenbug | May, 2018
EC2 + EFS
Mac nodes
Jenkins
Artifactory
Gerrit
S3 Device Farm
Mac nodes
• It’s ok to manage 1 or 2 node(s) manually
• It’s become a nightmare on a higher scale
• Not everything can be automated easily
© 2018 HERE | PublicHeisenbug | May, 2018
Mac nodes
• Ansible – tool for configuration management
• Works for Linux, MacOS, Windows
• What was done: managing operations via CLI
• What is still missing: how to manage system stuff?
(MacOS updates, Xcode updates, etc…)
© 2018 HERE | PublicHeisenbug | May, 2018
Mac nodes
© 2018 HERE | PublicHeisenbug | May, 2018
Mac nodes
© 2018 HERE | PublicHeisenbug | May, 2018
In the end…
• We have our own CI setup what fits our needs
• CI is relatively cheap
• It can scale until we have money
• We found some ways of managing Mac nodes
automatically
© 2018 HERE | PublicHeisenbug | May, 2018
Thank you
Contact
Artem Nikitin hi@artemnikitin.com artemnikitin artemnikitin
Building CI from scratch

Más contenido relacionado

La actualidad más candente

Visual Recognition with Anki Cozmo and TensorFlow
Visual Recognition with Anki Cozmo and TensorFlowVisual Recognition with Anki Cozmo and TensorFlow
Visual Recognition with Anki Cozmo and TensorFlowNiklas Heidloff
 
Knative from an Enterprise Perspective
Knative from an Enterprise PerspectiveKnative from an Enterprise Perspective
Knative from an Enterprise PerspectiveQAware GmbH
 
Alfresco Process Services (APS) and the Internet of Things
Alfresco Process Services (APS) and the Internet of ThingsAlfresco Process Services (APS) and the Internet of Things
Alfresco Process Services (APS) and the Internet of ThingsNathan McMinn
 
Intro to the Google Cloud for Developers
Intro to the Google Cloud for DevelopersIntro to the Google Cloud for Developers
Intro to the Google Cloud for DevelopersLynn Langit
 
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyer
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyerCase Study: Migration to GitLab (from Bitbucket) at AppsFlyer
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyerNoa Harel
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knativeMofizur Rahman
 
Leveraging Helm to manage Deployments on Kubernetes
Leveraging Helm to manage Deployments on KubernetesLeveraging Helm to manage Deployments on Kubernetes
Leveraging Helm to manage Deployments on KubernetesManoj Bhagwat
 
Cloud-native Patterns (July 4th, 2019)
Cloud-native Patterns (July 4th, 2019)Cloud-native Patterns (July 4th, 2019)
Cloud-native Patterns (July 4th, 2019)Alexandre Roman
 
Serverless with Google Cloud Functions
Serverless with Google Cloud FunctionsServerless with Google Cloud Functions
Serverless with Google Cloud FunctionsJerry Jalava
 
Neptue Graph Database - 0 to Production
Neptue Graph Database - 0 to ProductionNeptue Graph Database - 0 to Production
Neptue Graph Database - 0 to Productionisraelio
 
Reactive Microservices with Quarkus
Reactive Microservices with QuarkusReactive Microservices with Quarkus
Reactive Microservices with QuarkusNiklas Heidloff
 
Trying out the Go language with Google App Engine
Trying out the Go language with Google App EngineTrying out the Go language with Google App Engine
Trying out the Go language with Google App EngineLynn Langit
 
Transformational DevOps with AWS Native Tools
Transformational DevOps with AWS Native ToolsTransformational DevOps with AWS Native Tools
Transformational DevOps with AWS Native ToolsBhuvaneswari Subramani
 
Kubernetes on AWS @ Zalando Tech
Kubernetes on AWS @ Zalando TechKubernetes on AWS @ Zalando Tech
Kubernetes on AWS @ Zalando TechMichael Dürgner
 
Cloud Native Unleashed
Cloud Native UnleashedCloud Native Unleashed
Cloud Native UnleashedQAware GmbH
 
Global azurebootcamp2019vancouver aks_presentation_by_ashprasad_arjavprasad
Global azurebootcamp2019vancouver aks_presentation_by_ashprasad_arjavprasadGlobal azurebootcamp2019vancouver aks_presentation_by_ashprasad_arjavprasad
Global azurebootcamp2019vancouver aks_presentation_by_ashprasad_arjavprasadashishpd
 
Serverless Functions: Accelerating DevOps Adoption
Serverless Functions: Accelerating DevOps AdoptionServerless Functions: Accelerating DevOps Adoption
Serverless Functions: Accelerating DevOps AdoptionAll Things Open
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?Niklas Heidloff
 

La actualidad más candente (20)

Visual Recognition with Anki Cozmo and TensorFlow
Visual Recognition with Anki Cozmo and TensorFlowVisual Recognition with Anki Cozmo and TensorFlow
Visual Recognition with Anki Cozmo and TensorFlow
 
IaC on AWS Cloud
IaC on AWS CloudIaC on AWS Cloud
IaC on AWS Cloud
 
Knative from an Enterprise Perspective
Knative from an Enterprise PerspectiveKnative from an Enterprise Perspective
Knative from an Enterprise Perspective
 
Alfresco Process Services (APS) and the Internet of Things
Alfresco Process Services (APS) and the Internet of ThingsAlfresco Process Services (APS) and the Internet of Things
Alfresco Process Services (APS) and the Internet of Things
 
Intro to the Google Cloud for Developers
Intro to the Google Cloud for DevelopersIntro to the Google Cloud for Developers
Intro to the Google Cloud for Developers
 
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyer
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyerCase Study: Migration to GitLab (from Bitbucket) at AppsFlyer
Case Study: Migration to GitLab (from Bitbucket) at AppsFlyer
 
The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
 
Leveraging Helm to manage Deployments on Kubernetes
Leveraging Helm to manage Deployments on KubernetesLeveraging Helm to manage Deployments on Kubernetes
Leveraging Helm to manage Deployments on Kubernetes
 
Cloud-native Patterns (July 4th, 2019)
Cloud-native Patterns (July 4th, 2019)Cloud-native Patterns (July 4th, 2019)
Cloud-native Patterns (July 4th, 2019)
 
Serverless with Google Cloud Functions
Serverless with Google Cloud FunctionsServerless with Google Cloud Functions
Serverless with Google Cloud Functions
 
Neptue Graph Database - 0 to Production
Neptue Graph Database - 0 to ProductionNeptue Graph Database - 0 to Production
Neptue Graph Database - 0 to Production
 
Reactive Microservices with Quarkus
Reactive Microservices with QuarkusReactive Microservices with Quarkus
Reactive Microservices with Quarkus
 
Trying out the Go language with Google App Engine
Trying out the Go language with Google App EngineTrying out the Go language with Google App Engine
Trying out the Go language with Google App Engine
 
Transformational DevOps with AWS Native Tools
Transformational DevOps with AWS Native ToolsTransformational DevOps with AWS Native Tools
Transformational DevOps with AWS Native Tools
 
Activiti & Activiti Cloud DevCon
Activiti & Activiti Cloud DevConActiviti & Activiti Cloud DevCon
Activiti & Activiti Cloud DevCon
 
Kubernetes on AWS @ Zalando Tech
Kubernetes on AWS @ Zalando TechKubernetes on AWS @ Zalando Tech
Kubernetes on AWS @ Zalando Tech
 
Cloud Native Unleashed
Cloud Native UnleashedCloud Native Unleashed
Cloud Native Unleashed
 
Global azurebootcamp2019vancouver aks_presentation_by_ashprasad_arjavprasad
Global azurebootcamp2019vancouver aks_presentation_by_ashprasad_arjavprasadGlobal azurebootcamp2019vancouver aks_presentation_by_ashprasad_arjavprasad
Global azurebootcamp2019vancouver aks_presentation_by_ashprasad_arjavprasad
 
Serverless Functions: Accelerating DevOps Adoption
Serverless Functions: Accelerating DevOps AdoptionServerless Functions: Accelerating DevOps Adoption
Serverless Functions: Accelerating DevOps Adoption
 
When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?When to use Serverless? When to use Kubernetes?
When to use Serverless? When to use Kubernetes?
 

Similar a Building CI from scratch

AWS hurries to the rescue
AWS hurries to the rescueAWS hurries to the rescue
AWS hurries to the rescueArtem Nikitin
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsAmazon Web Services
 
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...LetsConnect
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersEmulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersCisco DevNet
 
DevNetCreate Workshop - build a react app - React crash course
DevNetCreate Workshop - build a react app - React crash courseDevNetCreate Workshop - build a react app - React crash course
DevNetCreate Workshop - build a react app - React crash courseCisco DevNet
 
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...Amazon Web Services
 
Developing with .NET Core on AWS: What's New (DEV318-R1) - AWS re:Invent 2018
Developing with .NET Core on AWS: What's New (DEV318-R1) - AWS re:Invent 2018Developing with .NET Core on AWS: What's New (DEV318-R1) - AWS re:Invent 2018
Developing with .NET Core on AWS: What's New (DEV318-R1) - AWS re:Invent 2018Amazon Web Services
 
Http Services in Rust on Containers
Http Services in Rust on ContainersHttp Services in Rust on Containers
Http Services in Rust on ContainersAnton Whalley
 
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Amazon Web Services
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesAmazon Web Services
 
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems IntegrationJenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems IntegrationOleg Nenashev
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Brian Culver
 
Apache Airflow at Dailymotion
Apache Airflow at DailymotionApache Airflow at Dailymotion
Apache Airflow at DailymotionGermain Tanguy
 
TechWiseTV Workshop: Cisco Hybrid Cloud Platform for Google Cloud
TechWiseTV Workshop:  Cisco Hybrid Cloud Platform for Google CloudTechWiseTV Workshop:  Cisco Hybrid Cloud Platform for Google Cloud
TechWiseTV Workshop: Cisco Hybrid Cloud Platform for Google CloudRobb Boyd
 
Lessons learnt in CI/CD with AWS serverless architecture
Lessons learnt in CI/CD with AWS serverless architectureLessons learnt in CI/CD with AWS serverless architecture
Lessons learnt in CI/CD with AWS serverless architectureAWS User Group Bengaluru
 
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesKubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesSeungYong Oh
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Aaron Saunders
 
Improve productivity with Continuous Integration & Delivery
Improve productivity with Continuous Integration & DeliveryImprove productivity with Continuous Integration & Delivery
Improve productivity with Continuous Integration & DeliveryAmazon Web Services
 

Similar a Building CI from scratch (20)

AWS hurries to the rescue
AWS hurries to the rescueAWS hurries to the rescue
AWS hurries to the rescue
 
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer ToolsA Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
A Tale of Two Pizzas: Accelerating Software Delivery with AWS Developer Tools
 
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...Exploring a simpler, more portable, less overhead solution to deploy Elastics...
Exploring a simpler, more portable, less overhead solution to deploy Elastics...
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersEmulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API Providers
 
DevNetCreate Workshop - build a react app - React crash course
DevNetCreate Workshop - build a react app - React crash courseDevNetCreate Workshop - build a react app - React crash course
DevNetCreate Workshop - build a react app - React crash course
 
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
AWS Greengrass, Containers, and Your Dev Process for Edge Apps (GPSWS404) - A...
 
Developing with .NET Core on AWS: What's New (DEV318-R1) - AWS re:Invent 2018
Developing with .NET Core on AWS: What's New (DEV318-R1) - AWS re:Invent 2018Developing with .NET Core on AWS: What's New (DEV318-R1) - AWS re:Invent 2018
Developing with .NET Core on AWS: What's New (DEV318-R1) - AWS re:Invent 2018
 
Http Services in Rust on Containers
Http Services in Rust on ContainersHttp Services in Rust on Containers
Http Services in Rust on Containers
 
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
Infrastructure Is Code with the AWS Cloud Development Kit (DEV372) - AWS re:I...
 
Build CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation SlidesBuild CICD Pipeline for Container Presentation Slides
Build CICD Pipeline for Container Presentation Slides
 
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems IntegrationJenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
Jenkins Pipeline @ Scale. Building Automation Frameworks for Systems Integration
 
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
Convert your Full Trust Solutions to the SharePoint Framework (SPFx)
 
SamSegalResume
SamSegalResumeSamSegalResume
SamSegalResume
 
Apache Airflow at Dailymotion
Apache Airflow at DailymotionApache Airflow at Dailymotion
Apache Airflow at Dailymotion
 
TechWiseTV Workshop: Cisco Hybrid Cloud Platform for Google Cloud
TechWiseTV Workshop:  Cisco Hybrid Cloud Platform for Google CloudTechWiseTV Workshop:  Cisco Hybrid Cloud Platform for Google Cloud
TechWiseTV Workshop: Cisco Hybrid Cloud Platform for Google Cloud
 
Lessons learnt in CI/CD with AWS serverless architecture
Lessons learnt in CI/CD with AWS serverless architectureLessons learnt in CI/CD with AWS serverless architecture
Lessons learnt in CI/CD with AWS serverless architecture
 
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with KubernetesKubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
Kubernetes Forum Seoul 2019: Re-architecting Data Platform with Kubernetes
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
 
Improve productivity with Continuous Integration & Delivery
Improve productivity with Continuous Integration & DeliveryImprove productivity with Continuous Integration & Delivery
Improve productivity with Continuous Integration & Delivery
 
Sam segal resume
Sam segal resumeSam segal resume
Sam segal resume
 

Último

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Building CI from scratch

  • 1. Artem Nikitin Heisenbug | May, 2018 New CI from scratch
  • 2. These slides are already available! https://bit.ly/2rOa0Ah © 2018 HERE | PublicHeisenbug | May, 2018
  • 3. About SDK © 2018 HERE | PublicHeisenbug | May, 2018 https://developer.here.com/develop/mobile-sdks
  • 4. Specifics of our existing SDK • Huge codebase in C++/Java/ObjC • 40 min checkout sources from scratch • 6 GB size of source code after checkout • 11M+ LOC (including dependencies) © 2018 HERE | PublicHeisenbug | May, 2018
  • 5. © 2018 HERE | PublicHeisenbug | May, 2018
  • 6. Problems of existed SDK • Build on top of huge internal monolithic core • Big size of SDK • No modularity in SDK • Low developer productivity © 2018 HERE | PublicHeisenbug | May, 2018
  • 7. Problems of existed CI • Big Jenkins setup https://www.youtube.com/watch?v=cT8GjzM1DXk https://conferences.oreilly.com/velocity/vl-eu-2017/public/schedule/detail/61951 • Highly opinionated CI setup • Hard to customize • Apple support is third class citizen © 2018 HERE | PublicHeisenbug | May, 2018
  • 8. © 2018 HERE | PublicHeisenbug | May, 2018
  • 10. Huge and complex codebase • Huge internal codebase (10M+ LOC) • Very modular (1000+ Git repos) • Our project depends on almost 100 internal dependencies © 2018 HERE | PublicHeisenbug | May, 2018
  • 11. Solution • Using `repo` for working with codebase https://source.android.com/setup/develop/ • Gerrit for code reviews https://news.ycombinator.com/item?id=8605293 • Block changes to our dependencies if they are failing our builds/tests © 2018 HERE | PublicHeisenbug | May, 2018
  • 12. Lots of boilerplate code • Complex codebase structure with C++/Java/ObjC • Code written by different people from different teams • No consistency in implementation • Lots of manually written boilerplate code © 2018 HERE | PublicHeisenbug | May, 2018
  • 13. Solution • Using IDL to describe public API • Using code generation to generate all the boilerplate code based on IDL description • We are using Djinni from Dropbox https://github.com/dropbox/djinni © 2018 HERE | PublicHeisenbug | May, 2018
  • 14. Djinni, IDL © 2018 HERE | PublicHeisenbug | May, 2018
  • 15. Djinni, generated C++ © 2018 HERE | PublicHeisenbug | May, 2018
  • 16. Djinni, generated Java © 2018 HERE | PublicHeisenbug | May, 2018
  • 17. Djinni, generated ObjC © 2018 HERE | PublicHeisenbug | May, 2018
  • 18. Complex build system • Project setup is complicated and unfriendly • Separate build setups for local development and for CI © 2018 HERE | PublicHeisenbug | May, 2018
  • 19. Solution • Universal build system/setup for local development and CI • Make project setup as friendly as possible © 2018 HERE | PublicHeisenbug | May, 2018
  • 20. Script © 2018 HERE | PublicHeisenbug | May, 2018
  • 21. Differences in test coverage • Platform level tests written by different people from different teams • As a result, sometimes test coverage differ between platforms © 2018 HERE | PublicHeisenbug | May, 2018
  • 22. Solution • Using BDD as a tool • Specify test scenarios with Gherkin • It forces to have exactly the same tests on every platform © 2018 HERE | PublicHeisenbug | May, 2018
  • 24. © 2018 HERE | PublicHeisenbug | May, 2018
  • 25. Foundation of our new CI • Jenkins (TeamCity? GitLab? Travis CI? AWS CodeBuild?) • AWS (GCP? Azure? Virtualization? Own hardware? Kubernetes? Mesos?) • Docker (Configuration management?) • Mac (Own hardware? Managed hosting? Virtualization?) © 2018 HERE | PublicHeisenbug | May, 2018
  • 26. CI Overview © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS Mac nodes Jenkins Artifactory Gerrit S3 Device Farm
  • 27. Workflow: Blocking change before merging © 2018 HERE | PublicHeisenbug | May, 2018 Developer Gerrit Chang e
  • 28. Workflow: Verify after merging © 2018 HERE | PublicHeisenbug | May, 2018 Gerrit Developer S3
  • 29. Workflow: Release © 2018 HERE | PublicHeisenbug | May, 2018 Gerrit Artifactory User User
  • 30. Jenkins © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS Mac nodes Jenkins Artifactory Gerrit S3 Device Farm
  • 31. Jenkins © 2018 HERE | PublicHeisenbug | May, 2018 Freestyle jobs Declarative pipeline Easy to use + - Maintenance - + Configuration as Code -* + Shared lib/code -* + Reaction on job status -* + Complex scenarios +/- + WTF per minute min a lot
  • 32. AWS © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS Mac nodes Jenkins Artifactory Gerrit S3 Device Farm
  • 33. AWS • Spot Instances - key element for scalable CI • A way to get resources with discount up to 90% • But no guarantee of availability! • We paid around 65 USD for 500+ hours in April • 0.12 USD per hour -> x3 cheaper then On-Demand price of the same instance! © 2018 HERE | PublicHeisenbug | May, 2018
  • 34. AWS © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS Mac nodes Jenkins Artifactory Gerrit S3 Device Farm
  • 35. AWS • EFS - it’s a NAS (Network-attached storage) • Very tricky throughput management https://docs.aws.amazon.com/efs/latest/ug/performance.html • You should monitor BurstCreditBalance metric • Around 25 USD per ~100GB of cache in April © 2018 HERE | PublicHeisenbug | May, 2018
  • 36. AWS Use cases: • We are using it for sharing ccache cache to speed up C++ compilation • You can use it to share something between EC2 instances © 2018 HERE | PublicHeisenbug | May, 2018
  • 37. AWS © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS Mac nodes Jenkins Artifactory Gerrit S3 Device Farm
  • 38. AWS • S3 – object storage • S3 isn’t a file system! • Not just for storing files • 2.52 USD in April for 1M+ of requests and 400GB+ of output traffic © 2018 HERE | PublicHeisenbug | May, 2018
  • 39. AWS Use cases: • We are using it to store temporary build artifacts (demo apps, reports, logs, screenshots, etc…) • We are delivering releases to public using S3 with CloudFront • I’m hosting my personal blog on S3 • Once I used it like a DB for a hackathon project, because it was easy to use and cheap J © 2018 HERE | PublicHeisenbug | May, 2018
  • 40. AWS © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS Mac nodes Jenkins Artifactory Gerrit S3 Device Farm
  • 41. AWS © 2018 HERE | PublicHeisenbug | May, 2018
  • 42. AWS • Lambda – new paradigm • Run code on events without thinking about infrastructure • Pay for amount of resources and time • Lambda’s from Java to Go -> 2x money savings • 250K+ requests and 180K seconds in April for 3.16 USD* © 2018 HERE | PublicHeisenbug | May, 2018
  • 43. AWS Use cases: • Posting review feedback to code changes in Gerrit • Killing unused EC2 instances • Updating AMI (like Packer but with our specifics) • Collecting metrics from test apps • In general, it’s a great glue for AWS services © 2018 HERE | PublicHeisenbug | May, 2018
  • 44. AWS © 2018 HERE | PublicHeisenbug | May, 2018
  • 45. AWS © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS Mac nodes Jenkins Artifactory Gerrit S3 Device Farm
  • 46. AWS • Device Farm – mobile devices in cloud • Supports fuzzing (random input events), mobile web, android and iOS testing • Supports Appium, Calabash and “native” tools • Remote access to devices • https://github.com/artemnikitin/devicefarm-ci-tool © 2018 HERE | PublicHeisenbug | May, 2018
  • 47. AWS Must Do in the Cloud: • Immutable infrastructure • Infrastructure as Code • Prepare for failures • Monitor your spending's © 2018 HERE | PublicHeisenbug | May, 2018
  • 49. Docker © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS
  • 50. Docker • Docker – tool for operating-system-level virtualization, aka containerization • We are using it to encapsulate environment for builds • We are ”backing” images in AMI • It creates a problem. We need to keep AMI up to date © 2018 HERE | PublicHeisenbug | May, 2018
  • 51. Docker © 2018 HERE | PublicHeisenbug | May, 2018
  • 52. Mac nodes © 2018 HERE | PublicHeisenbug | May, 2018 EC2 + EFS Mac nodes Jenkins Artifactory Gerrit S3 Device Farm
  • 53. Mac nodes • It’s ok to manage 1 or 2 node(s) manually • It’s become a nightmare on a higher scale • Not everything can be automated easily © 2018 HERE | PublicHeisenbug | May, 2018
  • 54. Mac nodes • Ansible – tool for configuration management • Works for Linux, MacOS, Windows • What was done: managing operations via CLI • What is still missing: how to manage system stuff? (MacOS updates, Xcode updates, etc…) © 2018 HERE | PublicHeisenbug | May, 2018
  • 55. Mac nodes © 2018 HERE | PublicHeisenbug | May, 2018
  • 56. Mac nodes © 2018 HERE | PublicHeisenbug | May, 2018
  • 57. In the end… • We have our own CI setup what fits our needs • CI is relatively cheap • It can scale until we have money • We found some ways of managing Mac nodes automatically © 2018 HERE | PublicHeisenbug | May, 2018
  • 58. Thank you Contact Artem Nikitin hi@artemnikitin.com artemnikitin artemnikitin