From DIY to DTE
An Enterprise Experience
nx conf / 2023
Adrian Baran
Sr. Software Engineer @ Cisco
@AdrianBaran_
Monorepo (~150 projects)
apps
libs
build
lint
test
…yet?
~1h
my-important-feat-branch
build
lint
test
🤔
DIY
For each task…
Up to 75% reduction in time *
* All projects affected
Monorepo (~150 projects)
apps
libs
Monorepo (~150 projects)
apps
libs
400+ projects
[ Insert more containers here ]
DIY
For each task…
For each task…
[ Insert more containers here ]
DIY
DIY
60
For each task…
> npx nx run my-project-a:test
…
> NX Successfully ran target test for project my-project-a (20s)
> npx nx run my-project-b:test
…
> NX Successfully ran target test for project my-project-b (400s)
🙂
🥲
> npx nx run-many –-target=test --projects=my-project-a,my-project-c
> npx nx run-many –-target=test --projects=my-project-b
DIY
✔
Binning
𝑥 times
DIY
DTE
Where we want to be… 🤔
Monorepo (~150 projects)
apps
libs
400+ projects
MVP
> git checkout -b nx-dte-poc
> npx nx generate ci-workflow
…
✔ What is your target CI provider? · circleci
✔ How should we name your workflow? · CI
CREATE .circleci/config.yml
DIY
DTE
✔
👀
2) parallel level per task
lint: … --parallel=3
test: … --parallel=3
build: … --parallel=3
1) Number of agents
1
2
1
2
😓
1:1
DIY
DTE
✔
> npx nx run-many –-target=test --projects=my-project-a,my-project-c
> npx nx run-many –-target=test --projects=my-project-b
✔
install-node-modules
Nx Cloud Main
Nx Cloud Agent 1
Nx Cloud Agent 2
Nx Cloud Agent 4
Nx Cloud Agent 3
Nx Cloud Agent 5
test-my-project-b
MVP
✔
🏁
DIY ≈ DTE
Performance
For each task…
[ Insert more containers here ]
DIY
🥁
Resources Used
DTE ↓ ~75%*
* !== 75% reduction in costs
More tasks..?
MVP
✔
✔
DTE > DIY
1. Short-term setup, long-term adaptation
2. DJ Patience
3. Your mileage may vary, but remember…
😓
Thank You
Adrian Baran
Sr. Software Engineer @ Cisco
@AdrianBaran_
Credits