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 full-size slide

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

    View full-size slide

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

    View full-size slide

  4. Service & Team

    View full-size slide

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

    View full-size slide

  6. Current Status

    View full-size slide

  7. Development Policy

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  10. 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 full-size slide

  11. 紹介
    https://containerdays.jp

    View full-size slide

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

    View full-size slide

  13. CI / CD Test

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  16. 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 full-size slide

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

    View full-size slide

  18. 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 full-size slide

  19. CI for Server
    ! "





    ςετ



    Run Tests

    View full-size slide

  20. 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 full-size slide

  21. 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 full-size slide

  22. Current Bitrise WorkFlow

    View full-size slide

  23. Current Bitrise Trigger

    View full-size slide

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

    View full-size slide

  25. 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 full-size slide

  26. 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 full-size slide

  27. Retrospective

    View full-size slide

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

    View full-size slide

  29. We are hiring!

    View full-size slide

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

    View full-size slide