2019-11-07
All microservices-related tf codes are in one single repository
- Mercari JP and US are separated (but thinking to merge in the future)
- We have different repository for
- Organization management
- Network management
- 30,000+ commits
- 3800+ tf files (150,000 LoC)
- 350+ contributors
- 400+ states
- microservices-starter-kit
- vault
- memorystore
.
├── script
├── terraform
│ ├── microservices
│ │ ├── <Service ID>
│ │ │ ├── development
│ │ │ └── production
│ ├── microservices-platform
│ │ ├── <Service ID>
│ │ │ ├── development
│ │ │ └── production
Each directory has its own state. No state sharing. Each services are strictly isolated.
Github flow (plan
on PR, apply
when merge into master)
- Bash-script + CircleCI
- Github CODEOWNER
- Lint by https://github.com/b4b4r07/stein/
- Notification by https://github.com/mercari/tfnotify
MTC2018 - Microservices Platform at Mercari
- Developers write the terraform codes by themself
- Developers uses bootstrap codes to setup new project
- It asks required information like service name or corporation (Mercari vs. Merpay)
- It generates direcotry and update CODEOWNER
- Developers need to review terraform codes by themselves (CODEOWNER)
- Developers can ask review to platform team by Github label (
support wanted
)- We have dedicated on-support team for this (See How We Structure Our Work At Mercari Microservices Platform Team)
We want to move to Kubernetes reconcile way from terraform state management (See Config Connector)