Dev Env Make Easy
Standard project preset
&
Container based dev environment
Leo Liang
Chief Architect, SES
http://aleung.github.io/blog
Background
Micro-service architecture
Node.js based tech stack
Personal Env
CI Env
Git Server
standardise ➭ lint ➭ compile ➭ unit test ➭ packaging
What does dev env consist of?
- Editor
- SCM client
- Programming language toolkit
- Language runtime
- Software dependencies
- Test tool
- Test dependencies
- Build automation tool
- ...
Challenges in dev env
Every project, every version requires different environment;
Setup dev environment is cumbersome
➥
Use incomplete environment
Use shared environment
➥
Success in one environment but fail in another
Dev environment we want:
Lightweight
Reproducible
&
Portable
Lightweight
Quickly setup
by one command, in one minute
$ git clone <repo> $ ./dev_up
Reproducible
Everything is declared inside the Git repo
⁓
Bring up containers which form a consistent environment for development and test
Portable
Windows / Linux / macOS
PC / IT-Hub Machine / Lab Machine
⁓
Only requirement: Docker is installed
Fully automated build process
Install dependencies ➭ preset update
➭ code re-format ➭ lint (code-checking)
➭ compile ➭ test
$ yarn test
Docker Container
Package software
into standardized units
for development,
shipment
and deployment
Docker Compose
Define and run
multi-container applications
Project standard preset
Covers whole software dev lifecycle:
editor setting / git setting / code style / code check /
build workflow / unit test / CI setup / release packaging
⁓
Infrastructure as code
Automatic check & update
-
A util has been created to apply preset on a project
-
Release new preset package on changed
-
Auto update to latest preset on entering dev environment
$ npx -p mrm -p @ses/mrm-preset mrm all \
--preset @ses/mrm-preset
Demo
See the real thing...
Dev Env Make Easy
By Leo Liang
Dev Env Make Easy
Container based dev environment
- 393