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

CI CD Test on ReRep

Spring_MT
November 08, 2018

CI CD Test on ReRep

Spring_MT

November 08, 2018
Tweet

More Decks by Spring_MT

Other Decks in Technology

Transcript

  1. CI / CD Test on ReRep
    春⼭ 誠
    Makoto Haruyama
    Nov, 8, 2018
    CI/CD Test Night #2

    View Slide

  2. DeNA
    E-Commerce & Incubation Unit,
    Service Incubation Div.,
    Rerep Gr.SpringMT Spring_MT
    Makoto Haruyama
    春⼭ 誠

    View Slide

  3. Service & Team
    Development Policy
    CI / CD Test
    Retrospective
    Agenda

    View Slide

  4. Service & Team

    View Slide

  5. View Slide

  6. Team

    View Slide

  7. Using FrameWorks
    API Server
    • Ruby on Rails
    Client
    • iOS and Android
    • React Native + TypeScript
    • Web(JS)
    • React

    View Slide

  8. Current Status

    View Slide

  9. Development Policy

    View Slide

  10. Policy
    Use existing Tools and Services for High Productivity
    • Fastly
    • CircleCI
    • Bitrise
    • Sentry
    • Firebase

    View Slide

  11. Policy
    API Spec Driven Development
    • API Spec Driven Development using Swagger
    • https://speakerdeck.com/spring_mt/api-spec-driven-
    development-with-swagger

    View Slide

  12. Policy
    Environment parity
    • Environment parity for Artifacts
    • Environment parity for Infrastructure
    • Rais on GKE
    • https://speakerdeck.com/spring_mt/rails-on-gke
    • 1⼈でできるDocker/Kubernetes(GKE)を使った新規サービス⽴ち上げ
    • https://containerdays.jp

    View Slide

  13. 紹介
    https://containerdays.jp

    View Slide

  14. Policy
    Stateless and Immutable Build Artifacts
    • Artifacts will work everywhere without modifying
    • Artifacts will be deployable regardless of previous contexts

    View Slide

  15. CI / CD Test

    View Slide

  16. Artifacts in ReRep
    Server
    • Docker image
    Client
    • ipa
    • apk
    Contents Data for Service
    • Zipped JSON files

    View Slide

  17. Manage Artifacts
    Build artifacts on Every repos push
    Store All Artifacts
    • Store Build artifacts which are ready to deploy

    View Slide

  18. CI

    View Slide

  19. CI
    Build artifacts on every repos push
    • Server : Build Docker images
    • Client : Make ipa and apk files
    • Service Contents Data : Zipped JSON Files
    Run tests before integration
    Store All Artifacts

    View Slide

  20. CI
    CI Tools
    • Server
    • CircleCI
    • Client
    • Bitrise

    View Slide

  21. CI
    Why use external tools like CircleCI and Bitrise?
    • It is important to introduce CI from the beginning
    • So, to be easy to introduce CI is important
    • Independent from local environment

    View Slide

  22. CI for Server
    ! "





    ςετ



    Run Tests

    View Slide

  23. CI for Client
    Bitrise
    • Why?
    • Useful features for client app building
    • Easy to manage iOS Provisioning profile
    • Easy to manage Android Code signing
    • Store all artifacts(DeNA uses elite plan)
    • Distribute Apps on Bitrise
    • Easy to use workflow Editors

    View Slide

  24. Bitrise Client Build Settings History
    History of build workflows using Bitrise
    1. Default React Native Configurations
    • Simple and Fast!
    2. Fastlane
    • For controlling build types

    View Slide

  25. Current Bitrise WorkFlow

    View Slide

  26. Current Bitrise Trigger

    View Slide

  27. Test

    View Slide

  28. Test
    Unit tests before Integration
    • Server : rspec
    • Client : NO tests yet (use Jest)
    Functional tests for Build Artifacts
    • Execute manually

    View Slide

  29. CD

    View Slide

  30. CD
    No CD
    • Deploy manually in ReRep
    • Server : kubectl set image
    • Client : Under preparation(will upload from Bitrise)
    • Contents Data for Service : Upload from Administrator tools

    View Slide

  31. Deploy Docker images for Server
    Move docker image to Prod from Dev directly when
    QA finished
    • Move Docker image in Google Cloud Registry over GCP Project
    using gcloud command
    • gcloud container images add-tag

    View Slide

  32. Retrospective

    View Slide

  33. Retrospective
    Sever Troubles in Prod
    • No Release Step Troubles
    • One Prod Specific bug
    • Using “Rails.production?” Ops
    Client Troubles in Prod
    • Not Yet

    View Slide

  34. We are hiring!

    View Slide

  35. https://dena.com/jp/recruit/career/engineer/
    DeNA is hiring!

    View Slide