Yuchen Zhang
Personal account
Intro & Practice
ThoughtWorks
Zhang Yuchen
Suitable for deployment on modern cloud platforms
Clean contract with underlying OS, maximum portability
Automation setup with declarative formats
Continuous deployment for maximum agility
Scala up without significant changes
DevOps is the result of implementing lean principles to the whole IT value stream. IT value stream extends development into production, combining all ‘distant relatives’ that descended from the original Programmer.
- Gene Kim
frequent deployment
stable
easy to maintain
simple & flexible
easy to learn
no gap between dev and ops
knowledge and comm
git: notification-publisher
git: notification-publisher-deploy
prod
staging
...
env
MY_ITEMS_HOST: https://api.host-to-dest.com
API_VERSION: v2
SERVER_USE_FORWARD_HEADERS: true
One App, One Repo
Treat backing services as attached resources
Export services via port binding
mysql://host/db
smtp://auth@host
s3://host/bucket
http://host.com
No distinction between local and remote
Store in config
Easy to replace in development
Expose port as service
Service as resource
Twelve-factor processes are stateless and share-nothing
Cache for post process
Upload file to S3
Parallelism processing
Store session in Redis
Presist data in memory
Process dependecy
Code
--------
-----------
Unit Test
Code Quality
Style Check
Integration
.....
Product
Config
Release
V1 V2
...
Pick a release
What about rollback?
Have a parity env, we could mange more than 10 services
Weeks
Hours
Different People
Divergent
Same People
Similar
dev:
extends:
file: docker-compose-common.yml
service: _base
environment:
USER:
links:
- setting_db
redis:
extends:
file: docker-compose-common.yml
service: redis
setting_db:
extends:
file: docker-compose-common.yml
service: postgres
comm_setting_api:
extends:
file: docker-compose-common.yml
service: _base
command: bash -c "script/start_server.sh"
ports:
- "8080:80"
links:
- setting_db
- redis
Cache
DB
API
presist
5 Dev, 1 QA, 1 Ops
Changes go to prod in MINS
Release more than 190 times in developing
Thanks!
By Yuchen Zhang