Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

Service & Team Development Policy CI / CD Test Retrospective Agenda

Slide 4

Slide 4 text

Service & Team

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Team

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

Current Status

Slide 9

Slide 9 text

Development Policy

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

紹介 https://containerdays.jp

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

CI / CD Test

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

CI

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

CI CI Tools • Server • CircleCI • Client • Bitrise

Slide 21

Slide 21 text

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

Slide 22

Slide 22 text

CI for Server ! " ςετ Run Tests

Slide 23

Slide 23 text

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

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

Current Bitrise WorkFlow

Slide 26

Slide 26 text

Current Bitrise Trigger

Slide 27

Slide 27 text

Test

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

CD

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

Retrospective

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

We are hiring!

Slide 35

Slide 35 text

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