cloud foundry diego: the new cloud runtime
TRANSCRIPT
![Page 1: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/1.jpg)
Cloud Foundry Diego: The New Cloud Runtime
Heterogeneous Container Scheduling, Docker & More
![Page 2: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/2.jpg)
How many people here are already running containers?
![Page 3: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/3.jpg)
Open source and 6 commercial distros Global 2000 focus
Launched 2011
Cloud Native Application Platform
A single API for managing applications on 4 infrastructures
![Page 4: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/4.jpg)
32,000 meetup members 2,100 committers
50+ foundation companies
Major enterprise adoption: Huawei running 5,000+ apps
GE next-gen Internet of Things platform Baidu has 700+ CF devs
$ cf scale
![Page 5: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/5.jpg)
David Soul Platform Technical Marketing, Pivotal
@davidsoul
![Page 6: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/6.jpg)
1. Designed for openness and extensibility
2. Flexible cloud primitives and processes
3. A platform that can keep promises
What Makes This Runtime Interesting?
![Page 7: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/7.jpg)
An Extensible Cloud Platform
New Workloads New Environments
![Page 8: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/8.jpg)
Develop and administer thousands of cloud native applications with heterogeneous
workloads and architectures
The Problem
![Page 9: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/9.jpg)
1. Design!
2. Build!
3. Configure!
4. Deploy!
5. Run!1. Provision!
2. Authorize!
3. Integrate!
4. Monitor!5. Audit!
6. Scale!
7. Recover!
8. Upgrade! Dev Loop
Ops Loop
![Page 10: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/10.jpg)
• Role-based to resource access
• Run code on demand
• Coordinate cross-service configuration
• Route public requests
• Read and write persistent data
• Record internal and external events
• Isolate resources and failures
• Measure performance/health
• Detect and determine failure
• Failure recovery
• Work tomorrow
• Add and remove resources
Runtime Capabilities
![Page 11: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/11.jpg)
The Diego Runtime
A distributed system that orchestrates containerized workloads
![Page 12: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/12.jpg)
Core Runtime Concepts
Cells Container Execution
Brain Container Scheduler & Health Monitor
BBS Shared Runtime State
![Page 13: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/13.jpg)
Container Scheduler & Health Monitor
Container Execution
Shared Runtime State
![Page 14: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/14.jpg)
Auctions
Rep
Auctioneer
Desired Tasks
Desired Processes
Executor
Cell
Garden Containers
Bids
Rep
Executor
Cell
Garden Containers
![Page 15: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/15.jpg)
Platform Abstractions
NSync
![Page 16: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/16.jpg)
Layers of Abstraction
NSync
Generic Specific
![Page 17: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/17.jpg)
Garden Windows Garden Linux
Garden API
Garden Container Abstraction A platform-neutral API for containerization
![Page 18: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/18.jpg)
Run Dockerized applications
Run .NET applications
Run workers and tasks
Develop Cloud Foundry applications locally
Extending the Cloud Foundry Runtime
![Page 19: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/19.jpg)
How can I run Dockerized applications?
![Page 20: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/20.jpg)
Extend the deployment API to run a Docker image on our native Garden-Linux container backend.
cf push APP DOCKER-REPO
POST /containers { "bind_mounts": [], "grace_time": 1200, "handle": 'user-supplied-handle', "network": 'network', "rootfs": 'rootfs', "properties": [], "env": [] } 200 Ok { handle: 'handle-of-created-container' }
Deploy the container image root filesystem.
Attempt to parse container image metadata for memory, disk, user,
launch command and port.
![Page 21: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/21.jpg)
Run Docker Images on Linux Cells
Garden Linux Cells
Docker Linux Cells
![Page 22: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/22.jpg)
How can I run .NET applications?
![Page 23: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/23.jpg)
Container Scheduler & Health Monitor
Windows Cells Container Execution Nodes
Shared Runtime State
Service Discovery & Monitoring
![Page 24: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/24.jpg)
Windows Cells
Garden Linux Cells
.NET Windows Cells
![Page 25: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/25.jpg)
How can I run workers and tasks?
![Page 26: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/26.jpg)
New Workload Types
Tasks
A single unit of work
Runs at most once
N long running instances
Distributed across cells for HA
Monitored and restarted
Long Running Processes
![Page 27: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/27.jpg)
RunAction: run process in container
DownloadAction: fetches and extract archive
UploadAction: POST file from container to URL
ParallelAction: run multiple actions in parallel
SerialAction: runs multiple actions in order
EmitProgressAction: wraps action and logs progress
TimeoutAction: wrap action and fail if timed out
TryAction: wrap action and ignore errors
Workload Primitives
![Page 28: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/28.jpg)
Desired Task
{ ... "rootfs": "docker:///docker-org/docker-image", "env": [ {"name": "ENV_NAME_A", "value": "ENV_VALUE_A"}, {"name": "ENV_NAME_B", "value": "ENV_VALUE_B"} ], "cpu_weight": 57, "disk_mb": 1024, "memory_mb": 128, "privileged": true, "action": ACTION(s) TO RUN, ... }
![Page 29: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/29.jpg)
Desired LRP
{ ... "instances": 17, "rootfs": "VALID-ROOTFS", "env": [ {"name": "ENV_NAME_A", "value": "ENV_VALUE_A"}, {"name": "ENV_NAME_B", "value": "ENV_VALUE_B"} ], "cpu_weight": 57, "disk_mb": 1024, "memory_mb": 128, "privileged": true, "setup": ACTION, "action": ACTION, "monitor": ACTION, "start_timeout": N seconds, "ports": [8080, 5050], ... }
![Page 30: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/30.jpg)
How can I develop Cloud Foundry applications on my local machine?
![Page 31: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/31.jpg)
![Page 32: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/32.jpg)
• Single-tenant • Everyone is ‘cluster root’ • Wide-open networking • Not all components are HA • Red-black upgrades • No data services
• Multi-tenancy with resource quotas • Role-based access control • Application security groups • Highly-available components • Zero-downtime, rolling upgrades • Backing data service orchestration
Repackaging the Runtime
Production usage with 20+ VMs
Local development on a single host
![Page 33: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/33.jpg)
![Page 34: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/34.jpg)
10,000 “real app” container instances (100 per cell)
4,000 concurrent tasks
4,000-instance LRPs
Scalability
Runtime testing with tens of thousands of containers:
![Page 35: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/35.jpg)
Garden Windows Garden Linux
Garden API
Multiple Workloads
![Page 36: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/36.jpg)
Multiple Environments
Garden Linux Cells
Docker Linux Cells
.NET Windows Cells
![Page 37: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/37.jpg)
The Extensible Cloud Platform
Tasks Docker Windows Lattice
![Page 38: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/38.jpg)
cloudfoundry.org
Try the New Runtime Today
> LATTICE !
lattice.cf
![Page 39: Cloud Foundry Diego: The New Cloud Runtime](https://reader033.vdocuments.us/reader033/viewer/2022051506/587f51cf1a28abef518bfe7f/html5/thumbnails/39.jpg)
Discussion? #cloudopen @davidsoul
Diego > LATTICE !