Presented at Open Source South Carolina
Presented by Veer Muchandi
Title: Super Fast Inner Loop Application Development with Containers
Abstract: Developers parse through inner loop multiple times a day while doing application development. Slower inner loop can waste a significant amount of time and is frustrating for developers. Also many enterprise developers don't use containers while doing application development in the inner loop. This causes their app dev environment to be much different from higher environments and different from how applications run in production. Even those developers that build containers locally have to spend a lot of time for every change to build a container and test.
In this session you will learn Google's approach to solve the above problems. We will introduce you to innovative application development process that helps container based inner loop application development right from a developer's workstation preconfigured developer environments (optional) running on cloud to onboard developers much faster reduce the cycle time for code and test from mins to seconds with hot reloading to containers using open source technologies such as skaffold to improve productivity connect to 1st party and 3rd party services right when you are developing code debug issues in containers with step-by-step debugging.
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Super Fast Inner Loop Application Development with Containers
1. Confidential + Proprietary
Confidential + Proprietary
Super fast inner loop development with
containers
Veer Muchandi
AppMod Solution Manager
Google Cloud
6. Proprietary + Confidential
Workstation security concerns
Security
Source code on
user workstation is
an exfiltration risk
Downloading test
data is a security
risk
I wish everything
was VDI or Cloud
IDEs
Infra Admin
We limit access to
Dev machines as
we can’t guarantee
their security
Laptop shipping
delays cause
developer
onboarding delays
7. Proprietary + Confidential
Remote developer pains
Remote Developer
VDI is slow and
painful
Being offshore, I
am not allowed to
download code
Builds take too
long.
I wish my
workstation was
on cloud to access
from anywhere
8. Proprietary + Confidential
No containers in development
Application
Developer
Create a binary and test locally
Containers created in the outer loop
Development doesn’t
match Production
9. Proprietary + Confidential
Using containers (Docker) in development
IDE integration is a challenge
Container
Developer
Slow inner loop: Several minutes for each change
Dev Still doesn’t match
Production. No K8S.
minutes
10. Proprietary + Confidential
Other container developer challenges
How to debug issues in
containers
How to test integration with
other (micro)services
Who is responsible for layers
in Dockerfiles
13. Proprietary + Confidential
Features
seconds
Hot reloading
code changes to
containers
IDE integration
with container
runtime
Debugging code
from IDE
Production-like
environment
during
development
Integration with
other services
Code-to-container
for new container
developers
14. Proprietary + Confidential
Products
Cloud IDE:
- Cloud Shell Editor
Local IDE:
- VS Code, IntelliJ etc
Runtime Integration
Debug
- Cloud Code
Hot Reloading
- Skaffold
Runtime
- GKE (K8S)
- Cloud Run (serverless)
- Minikube
seconds
16. Proprietary + Confidential
Integrated into IDE
● Connect to Kubernetes or Cloud
Run from the editor
● Deploy applications from editor
● View container logs
● Seamless integration with
Skaffold
17. Proprietary + Confidential
Skaffold Use Cases
Deploy manifests
Build artifacts and
render manifests to
commit to Git
Build and deploy
artifacts, stream logs,
and watch for changes
Continuous
Development &
Debugging
Continuous
Integration &
GitOps
Continuous
Delivery
18. Proprietary + Confidential
Skaffold for inner loop
Skaffold will be set up to allow hot reloading of
code to a running container:
● First time, the application container is
built, tested, and deployed into the dev
environment
● Skaffold streams application logs from
the running container to the
developer’s workstation
● Skaffold watches for code changes and
syncs them into the running container
aka hot reloading
Code
Build Unit Test Deploy
Running
Container
Cloud Code Skaffold
Cloud Run
GKE
Developer
Workstation
Development
Environment
File Sync
Watch
Initial deployment
Logs
Stream
Cloud Shell
19. Proprietary + Confidential
GKE as a developer’s Application Developer Runtime
● Container development in
environment matching
production
● No workstation resource issues
(CPU and memory)
● Constrain resources by namespace
● Shift Integration left: Integration
testing with databases and other
cloud services
Shared GKE
Cluster
namespace#1 namespace#2 namespace#3
Developer#1 Developer#2 Developer#3
Pods
Cloud SQL
Container
Registry
Pub/Sub
Cloud Services
Cloud Shell Cloud Shell Cloud Shell
Integrate
with cloud
services
Namespace
allocations
20. Proprietary + Confidential
Minikube as a developer’s Application Developer Runtime
● Container development in K8S
environment
● Workstation resource issues (CPU
and memory)
● Connecting to other services
requires access
Minikube on
Workstation
Developer#1 Developer#2 Developer#3
Pods
Cloud SQL
Container
Registry
Pub/Sub
Cloud Services
Cloud Shell Cloud Shell Cloud Shell
Integration with
cloud services
requires access
outside network
Minikube on
Workstation
Minikube on
Workstation