SlideShare a Scribd company logo
1 of 21
Download to read offline
BOSH
&
Diego
Benjamin Gandon
@BenjGa
2016-04-04
@BenjGa
Founder & CEO @ Gstack.io
Formerly: CTO @ Alvarum.com
Benjamin Gandon
BOSH
At:
We do:
And:
BOSH
Deploys Distributed Systems
Argh! It’s again those Americans! Don’t worry, Herr General, we will find out soon!
What is BOSH
BOSH is a flexible and resilient
technology that ………………………
complete ecosystems of distributed
software.
1. Package
2. Deploy
3. Monitor
4. Manage
(start/stop, scale, resurrect, update, …)
5. Upgrade
Instance in a BOSH Deployment
Container (or VM)
Filesystem + BOSH Agent
NginxHAproxy Pcre
HAproxy Nginx
Stemcell
Packages
Jobs
Instance Stemcell
+ Jobs
+ Packages
= Instance
Equation
/var/vcap/jobs/*
/var/vcap/packages/*
Availability Zone #3
AZ2AZ1
What we do with those “instances”
HAproxy
Stemcell
Pkg1 Pkg2
Nginx
Stemcell
Pkg3 Pkg2
HAproxy
Stemcell
Pkg1 Pkg2
Nginx
Stemcell
Pkg3 Pkg2
Nginx
Stemcell
Pkg3 Pkg2
● Garden containers (in a VitrualBox VM)
● Docker (experimental)
● AWS
● OpenStack
● CloudStack
● Azure
● vSphere
BOSH secret? → Use abstract Cloud Provider Interfaces (CPIs)
Deploy where ?
Diego
Flexible Container Engine
From
Try at home! Because…
● BOSH
● Cloud Foundry
● Diego
Open
Source
Why “diego”?
● Since 2019, intuition for stateless “not-yet-containers” → the Droplets
● Their engine: the Droplet Execution Agent
→ DEA
● When rewritten in Go: DEA-GO
→ Diego!
Diego architecture
(logs)
(controller)
(http routes)
Source: https://github.com/cloudfoundry-incubator/diego-design-notes
Not just about containers
● Long Running Processes
→ LRPs
● Tasks
→ Servers
→ Cron jobs
Two ways to use Diego
● Multi-tenant Diego
→ as Cloud Foundry central container engine
● Single-tenant Diego
→ as Lattice, a single-tenant Diego cluster
Dude, go to http://lattice.cf
Lattice is definitely cool
● Containerized workloads
○ Long running, or temporary tasks
○ Dynamically scaled
○ Dynamically balanced across cells (but no live re-balancing)
● Cluster scheduler
● HTTP load balancing
● Log aggregation
● Health management
Some code!
Diego Auctions Scoring
// See: github.com/cloudfoundry-incubator/rep/…/resources.go#L15-L24
type CellState struct {
RootFSProviders RootFSProviders
AvailableResources Resources
TotalResources Resources
LRPs []LRP
Tasks []Task
StartingContainerCount int
Zone string
Evacuating bool
VolumeDrivers []string
}
// See: github.com/cloudfoundry-incubator/rep/…/resources.go#L74-L79
func (c CellState) ComputeScore(res *Resource, startingContainerWeight float64) float64 {
remainingResources := c.AvailableResources.Copy()
remainingResources.Subtract(res)
startingContainerScore := float64(c.StartingContainerCount) * startingContainerWeight
return remainingResources.ComputeScore(&c.TotalResources) + startingContainerScore
}
// See: github.com/cloudfoundry-incubator/rep/…/resources.go#L90-L93
type Resources struct {
MemoryMB int32
DiskMB int32
Containers int
}
// See: github.com/cloudfoundry-incubator/rep/…/resources.go#L110-L115
func (r *Resources) ComputeScore(total *Resources) float64 {
fractionUsedMemory := 1.0 - float64(r.MemoryMB)/float64(total.MemoryMB)
fractionUsedDisk := 1.0 - float64(r.DiskMB)/float64(total.DiskMB)
fractionUsedContainers := 1.0 - float64(r.Containers)/float64(total.Containers)
return (fractionUsedMemory + fractionUsedDisk + fractionUsedContainers) / 3.0
}
// See: github.com/cloudfoundry-incubator/auction/…/auctionrunner/scheduler.go#L206-L258
func (s *Scheduler) scheduleLRPAuction(lrpAuction *auctiontypes.LRPAuction) (*auctiontypes.LRPAuction, error) {
var winnerCell *Cell
winnerScore := 1e20
// Lists all zones, and count how many times the LRP is already in each of them
zones := accumulateZonesByInstances(s.zones, lrpAuction.ProcessGuid)
// Retain only zones with compatible filesystem (e.g. Linux or Windows)
filteredZones := filterZones(zones, lrpAuction)
if len(filteredZones) == 0 {
return nil, auctiontypes.ErrorCellMismatch
}
sortedZones := sortZonesByInstances(filteredZones)
// …
}
Diego Auctions Evaluation (1/3)
// See: github.com/cloudfoundry-incubator/auction/…/auctionrunner/scheduler.go#L206-L258
func (s *Scheduler) scheduleLRPAuction(lrpAuction *auctiontypes.LRPAuction) (*auctiontypes.LRPAuction, error) {
// …
for zoneIndex, lrpByZone := range sortedZones {
for _, cell := range lrpByZone.zone {
score, err := cell.ScoreForLRP(&lrpAuction.LRP, s.startingContainerWeight)
if err != nil {
continue
}
// Look for the Diego cell with minimal overall utilization
if score < winnerScore {
winnerScore = score
winnerCell = cell
}
}
// if (not last zone) && (this zone has the same # of instances as the next sorted zone)
// acts as a tie breaker
if zoneIndex+1 < len(sortedZones) &&
lrpByZone.instances == sortedZones[zoneIndex+1].instances {
continue
}
if winnerCell != nil {
break
}
}
// …
}
Diego Auctions Evaluation (2/3)
// See: github.com/cloudfoundry-incubator/auction/…/auctionrunner/scheduler.go#L206-L258
func (s *Scheduler) scheduleLRPAuction(lrpAuction *auctiontypes.LRPAuction) (*auctiontypes.LRPAuction, error) {
// …
if winnerCell == nil {
return nil, rep.ErrorInsufficientResources
}
err := winnerCell.ReserveLRP(&lrpAuction.LRP)
if err != nil {
s.logger.Error("lrp-failed-to-reserve-cell", err, lager.Data{"cell-guid": winnerCell.Guid, "lrp-guid": lrpAuction.Identifier()})
return nil, err
}
winningAuction := lrpAuction.Copy()
// Return a copy of the auction containing the winning cell
winningAuction.Winner = winnerCell.Guid
return &winningAuction, nil
}
Diego Auctions Evaluation (3/3)
→ Simple as that!
Thank you!
www.gstack.io (not yet in Google)
www.bosh.io
www.lattice.cf
www.cloudfoundry.org
Questions?
↘ ↙
→ @BenjGa ←
↗ ↖

More Related Content

What's hot

ch8-pv1-the-virtual-filesystem
ch8-pv1-the-virtual-filesystemch8-pv1-the-virtual-filesystem
ch8-pv1-the-virtual-filesystemyushiang fu
 
PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013
PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013
PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013Puppet
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X ServerYasuhiro Asaka
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam
 
今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell LabsRyousei Takano
 
Apache Hadoop for System Administrators
Apache Hadoop for System AdministratorsApache Hadoop for System Administrators
Apache Hadoop for System AdministratorsAllen Wittenauer
 
IL: 失われたプロトコル
IL: 失われたプロトコルIL: 失われたプロトコル
IL: 失われたプロトコルRyousei Takano
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queueBrandon Lamb
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scriptingDan Morrill
 
Job Automation using Linux
Job Automation using LinuxJob Automation using Linux
Job Automation using LinuxJishnu Pradeep
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialGagah Arifianto
 
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationRedis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationrjsmelo
 
Gogo shell
Gogo shellGogo shell
Gogo shelljwausle
 
Eat my data
Eat my dataEat my data
Eat my dataPeng Zuo
 
Rustでパケットと戯れる
Rustでパケットと戯れるRustでパケットと戯れる
Rustでパケットと戯れるShuyaMotouchi1
 
Awk primer and Bioawk
Awk primer and BioawkAwk primer and Bioawk
Awk primer and BioawkHoffman Lab
 

What's hot (18)

ch8-pv1-the-virtual-filesystem
ch8-pv1-the-virtual-filesystemch8-pv1-the-virtual-filesystem
ch8-pv1-the-virtual-filesystem
 
PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013
PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013
PuppetDB: New Adventures in Higher-Order Automation - PuppetConf 2013
 
50 Most Frequently Used UNIX Linux Commands -hmftj
50 Most Frequently Used UNIX  Linux Commands -hmftj50 Most Frequently Used UNIX  Linux Commands -hmftj
50 Most Frequently Used UNIX Linux Commands -hmftj
 
Gitosis on Mac OS X Server
Gitosis on Mac OS X ServerGitosis on Mac OS X Server
Gitosis on Mac OS X Server
 
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRestPGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
PGDay.Amsterdam 2018 - Stefan Fercot - Save your data with pgBackRest
 
今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs今日から始めるPlan 9 from Bell Labs
今日から始めるPlan 9 from Bell Labs
 
Apache Hadoop for System Administrators
Apache Hadoop for System AdministratorsApache Hadoop for System Administrators
Apache Hadoop for System Administrators
 
IL: 失われたプロトコル
IL: 失われたプロトコルIL: 失われたプロトコル
IL: 失われたプロトコル
 
Redis as a message queue
Redis as a message queueRedis as a message queue
Redis as a message queue
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scripting
 
Job Automation using Linux
Job Automation using LinuxJob Automation using Linux
Job Automation using Linux
 
NUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline TutorialNUMOSS 4th Week - Commandline Tutorial
NUMOSS 4th Week - Commandline Tutorial
 
Redis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your applicationRedis & ZeroMQ: How to scale your application
Redis & ZeroMQ: How to scale your application
 
Gogo shell
Gogo shellGogo shell
Gogo shell
 
Eat my data
Eat my dataEat my data
Eat my data
 
Rustでパケットと戯れる
Rustでパケットと戯れるRustでパケットと戯れる
Rustでパケットと戯れる
 
Awk primer and Bioawk
Awk primer and BioawkAwk primer and Bioawk
Awk primer and Bioawk
 
Containers for sysadmins
Containers for sysadminsContainers for sysadmins
Containers for sysadmins
 

Viewers also liked

When containers fail
When containers failWhen containers fail
When containers failAlois Mayr
 
Building a PaaS for Government @ Cloud expo Europe
Building a PaaS for Government @ Cloud expo EuropeBuilding a PaaS for Government @ Cloud expo Europe
Building a PaaS for Government @ Cloud expo EuropeColin Saliceti
 
Myfirst cloudfoundry intro_20161201
Myfirst cloudfoundry intro_20161201Myfirst cloudfoundry intro_20161201
Myfirst cloudfoundry intro_20161201Tomohiro Ichimura
 
Install Concourse CI with BOSH
Install Concourse CI with BOSHInstall Concourse CI with BOSH
Install Concourse CI with BOSHToshiaki Maki
 
Cloud Foundry V2 | Intermediate Deep Dive
Cloud Foundry V2 | Intermediate Deep DiveCloud Foundry V2 | Intermediate Deep Dive
Cloud Foundry V2 | Intermediate Deep DiveKazuto Kusama
 
Introduction to Cloud Foundry #JJUG
Introduction to Cloud Foundry #JJUGIntroduction to Cloud Foundry #JJUG
Introduction to Cloud Foundry #JJUGToshiaki Maki
 
Cloud Foundry | How it works
Cloud Foundry | How it worksCloud Foundry | How it works
Cloud Foundry | How it worksKazuto Kusama
 
Bitcoinを技術的に理解する
Bitcoinを技術的に理解するBitcoinを技術的に理解する
Bitcoinを技術的に理解するKenji Urushima
 
Cloud Foundryで学ぶ、PaaSのしくみ講座
Cloud Foundryで学ぶ、PaaSのしくみ講座Cloud Foundryで学ぶ、PaaSのしくみ講座
Cloud Foundryで学ぶ、PaaSのしくみ講座Kazuto Kusama
 
Bosh - Configuring Services
Bosh - Configuring ServicesBosh - Configuring Services
Bosh - Configuring ServicesAndrew Shafer
 

Viewers also liked (11)

When containers fail
When containers failWhen containers fail
When containers fail
 
Building a PaaS for Government @ Cloud expo Europe
Building a PaaS for Government @ Cloud expo EuropeBuilding a PaaS for Government @ Cloud expo Europe
Building a PaaS for Government @ Cloud expo Europe
 
Myfirst cloudfoundry intro_20161201
Myfirst cloudfoundry intro_20161201Myfirst cloudfoundry intro_20161201
Myfirst cloudfoundry intro_20161201
 
Bosh 2-0-reloaded
Bosh 2-0-reloadedBosh 2-0-reloaded
Bosh 2-0-reloaded
 
Install Concourse CI with BOSH
Install Concourse CI with BOSHInstall Concourse CI with BOSH
Install Concourse CI with BOSH
 
Cloud Foundry V2 | Intermediate Deep Dive
Cloud Foundry V2 | Intermediate Deep DiveCloud Foundry V2 | Intermediate Deep Dive
Cloud Foundry V2 | Intermediate Deep Dive
 
Introduction to Cloud Foundry #JJUG
Introduction to Cloud Foundry #JJUGIntroduction to Cloud Foundry #JJUG
Introduction to Cloud Foundry #JJUG
 
Cloud Foundry | How it works
Cloud Foundry | How it worksCloud Foundry | How it works
Cloud Foundry | How it works
 
Bitcoinを技術的に理解する
Bitcoinを技術的に理解するBitcoinを技術的に理解する
Bitcoinを技術的に理解する
 
Cloud Foundryで学ぶ、PaaSのしくみ講座
Cloud Foundryで学ぶ、PaaSのしくみ講座Cloud Foundryで学ぶ、PaaSのしくみ講座
Cloud Foundryで学ぶ、PaaSのしくみ講座
 
Bosh - Configuring Services
Bosh - Configuring ServicesBosh - Configuring Services
Bosh - Configuring Services
 

Similar to BOSH deploys distributed systems, and Diego runs any containers

Node.js basics
Node.js basicsNode.js basics
Node.js basicsBen Lin
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python toolsQuintagroup
 
Splunk n-box-splunk conf-2017
Splunk n-box-splunk conf-2017Splunk n-box-splunk conf-2017
Splunk n-box-splunk conf-2017Mohamad Hassan
 
Bash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageBash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageRené Ribaud
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux SystemJian-Hong Pan
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsGergely Szabó
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)Soshi Nemoto
 
What is-a-computer-process-os
What is-a-computer-process-osWhat is-a-computer-process-os
What is-a-computer-process-osManish Singh
 
Goroutine stack and local variable allocation in Go
Goroutine stack and local variable allocation in GoGoroutine stack and local variable allocation in Go
Goroutine stack and local variable allocation in GoYu-Shuan Hsieh
 
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsnullowaspmumbai
 
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh Naik
 
Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Workhorse Computing
 
TYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkTYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkChristian Trabold
 
Getting started with Burst – Unite Copenhagen 2019
Getting started with Burst – Unite Copenhagen 2019Getting started with Burst – Unite Copenhagen 2019
Getting started with Burst – Unite Copenhagen 2019Unity Technologies
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTJoshua Thijssen
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemLinaro
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETMaarten Balliauw
 
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)ngotogenome
 

Similar to BOSH deploys distributed systems, and Diego runs any containers (20)

Node.js basics
Node.js basicsNode.js basics
Node.js basics
 
6202942
62029426202942
6202942
 
Releasing and deploying python tools
Releasing and deploying python toolsReleasing and deploying python tools
Releasing and deploying python tools
 
Splunk n-box-splunk conf-2017
Splunk n-box-splunk conf-2017Splunk n-box-splunk conf-2017
Splunk n-box-splunk conf-2017
 
Bash is not a second zone citizen programming language
Bash is not a second zone citizen programming languageBash is not a second zone citizen programming language
Bash is not a second zone citizen programming language
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 
Efficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native EnvironmentsEfficient System Monitoring in Cloud Native Environments
Efficient System Monitoring in Cloud Native Environments
 
DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)DevOps(4) : Ansible(2) - (MOSG)
DevOps(4) : Ansible(2) - (MOSG)
 
What is-a-computer-process-os
What is-a-computer-process-osWhat is-a-computer-process-os
What is-a-computer-process-os
 
Goroutine stack and local variable allocation in Go
Goroutine stack and local variable allocation in GoGoroutine stack and local variable allocation in Go
Goroutine stack and local variable allocation in Go
 
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh naik linux_kernel_internals
Ganesh naik linux_kernel_internals
 
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internalsGanesh naik linux_kernel_internals
Ganesh naik linux_kernel_internals
 
Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.Shared Object images in Docker: What you need is what you want.
Shared Object images in Docker: What you need is what you want.
 
TYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase frameworkTYPO3 Extension development using new Extbase framework
TYPO3 Extension development using new Extbase framework
 
Getting started with Burst – Unite Copenhagen 2019
Getting started with Burst – Unite Copenhagen 2019Getting started with Burst – Unite Copenhagen 2019
Getting started with Burst – Unite Copenhagen 2019
 
Deploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APTDeploying and maintaining your software with RPM/APT
Deploying and maintaining your software with RPM/APT
 
An Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating SystemAn Overview of the IHK/McKernel Multi-kernel Operating System
An Overview of the IHK/McKernel Multi-kernel Operating System
 
DotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NETDotNetFest - Let’s refresh our memory! Memory management in .NET
DotNetFest - Let’s refresh our memory! Memory management in .NET
 
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
Running Ruby on Solaris (RubyKaigi 2015, 12/Dec/2015)
 
HPC_MPI_CICID_OA.pptx
HPC_MPI_CICID_OA.pptxHPC_MPI_CICID_OA.pptx
HPC_MPI_CICID_OA.pptx
 

Recently uploaded

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Recently uploaded (20)

"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

BOSH deploys distributed systems, and Diego runs any containers

  • 2. @BenjGa Founder & CEO @ Gstack.io Formerly: CTO @ Alvarum.com Benjamin Gandon BOSH At: We do: And:
  • 3. BOSH Deploys Distributed Systems Argh! It’s again those Americans! Don’t worry, Herr General, we will find out soon!
  • 4. What is BOSH BOSH is a flexible and resilient technology that ……………………… complete ecosystems of distributed software. 1. Package 2. Deploy 3. Monitor 4. Manage (start/stop, scale, resurrect, update, …) 5. Upgrade
  • 5. Instance in a BOSH Deployment Container (or VM) Filesystem + BOSH Agent NginxHAproxy Pcre HAproxy Nginx Stemcell Packages Jobs Instance Stemcell + Jobs + Packages = Instance Equation /var/vcap/jobs/* /var/vcap/packages/*
  • 6. Availability Zone #3 AZ2AZ1 What we do with those “instances” HAproxy Stemcell Pkg1 Pkg2 Nginx Stemcell Pkg3 Pkg2 HAproxy Stemcell Pkg1 Pkg2 Nginx Stemcell Pkg3 Pkg2 Nginx Stemcell Pkg3 Pkg2
  • 7. ● Garden containers (in a VitrualBox VM) ● Docker (experimental) ● AWS ● OpenStack ● CloudStack ● Azure ● vSphere BOSH secret? → Use abstract Cloud Provider Interfaces (CPIs) Deploy where ?
  • 9. Try at home! Because… ● BOSH ● Cloud Foundry ● Diego Open Source
  • 10. Why “diego”? ● Since 2019, intuition for stateless “not-yet-containers” → the Droplets ● Their engine: the Droplet Execution Agent → DEA ● When rewritten in Go: DEA-GO → Diego!
  • 11. Diego architecture (logs) (controller) (http routes) Source: https://github.com/cloudfoundry-incubator/diego-design-notes
  • 12. Not just about containers ● Long Running Processes → LRPs ● Tasks → Servers → Cron jobs
  • 13. Two ways to use Diego ● Multi-tenant Diego → as Cloud Foundry central container engine ● Single-tenant Diego → as Lattice, a single-tenant Diego cluster Dude, go to http://lattice.cf
  • 14. Lattice is definitely cool ● Containerized workloads ○ Long running, or temporary tasks ○ Dynamically scaled ○ Dynamically balanced across cells (but no live re-balancing) ● Cluster scheduler ● HTTP load balancing ● Log aggregation ● Health management
  • 16. Diego Auctions Scoring // See: github.com/cloudfoundry-incubator/rep/…/resources.go#L15-L24 type CellState struct { RootFSProviders RootFSProviders AvailableResources Resources TotalResources Resources LRPs []LRP Tasks []Task StartingContainerCount int Zone string Evacuating bool VolumeDrivers []string } // See: github.com/cloudfoundry-incubator/rep/…/resources.go#L74-L79 func (c CellState) ComputeScore(res *Resource, startingContainerWeight float64) float64 { remainingResources := c.AvailableResources.Copy() remainingResources.Subtract(res) startingContainerScore := float64(c.StartingContainerCount) * startingContainerWeight return remainingResources.ComputeScore(&c.TotalResources) + startingContainerScore } // See: github.com/cloudfoundry-incubator/rep/…/resources.go#L90-L93 type Resources struct { MemoryMB int32 DiskMB int32 Containers int } // See: github.com/cloudfoundry-incubator/rep/…/resources.go#L110-L115 func (r *Resources) ComputeScore(total *Resources) float64 { fractionUsedMemory := 1.0 - float64(r.MemoryMB)/float64(total.MemoryMB) fractionUsedDisk := 1.0 - float64(r.DiskMB)/float64(total.DiskMB) fractionUsedContainers := 1.0 - float64(r.Containers)/float64(total.Containers) return (fractionUsedMemory + fractionUsedDisk + fractionUsedContainers) / 3.0 }
  • 17. // See: github.com/cloudfoundry-incubator/auction/…/auctionrunner/scheduler.go#L206-L258 func (s *Scheduler) scheduleLRPAuction(lrpAuction *auctiontypes.LRPAuction) (*auctiontypes.LRPAuction, error) { var winnerCell *Cell winnerScore := 1e20 // Lists all zones, and count how many times the LRP is already in each of them zones := accumulateZonesByInstances(s.zones, lrpAuction.ProcessGuid) // Retain only zones with compatible filesystem (e.g. Linux or Windows) filteredZones := filterZones(zones, lrpAuction) if len(filteredZones) == 0 { return nil, auctiontypes.ErrorCellMismatch } sortedZones := sortZonesByInstances(filteredZones) // … } Diego Auctions Evaluation (1/3)
  • 18. // See: github.com/cloudfoundry-incubator/auction/…/auctionrunner/scheduler.go#L206-L258 func (s *Scheduler) scheduleLRPAuction(lrpAuction *auctiontypes.LRPAuction) (*auctiontypes.LRPAuction, error) { // … for zoneIndex, lrpByZone := range sortedZones { for _, cell := range lrpByZone.zone { score, err := cell.ScoreForLRP(&lrpAuction.LRP, s.startingContainerWeight) if err != nil { continue } // Look for the Diego cell with minimal overall utilization if score < winnerScore { winnerScore = score winnerCell = cell } } // if (not last zone) && (this zone has the same # of instances as the next sorted zone) // acts as a tie breaker if zoneIndex+1 < len(sortedZones) && lrpByZone.instances == sortedZones[zoneIndex+1].instances { continue } if winnerCell != nil { break } } // … } Diego Auctions Evaluation (2/3)
  • 19. // See: github.com/cloudfoundry-incubator/auction/…/auctionrunner/scheduler.go#L206-L258 func (s *Scheduler) scheduleLRPAuction(lrpAuction *auctiontypes.LRPAuction) (*auctiontypes.LRPAuction, error) { // … if winnerCell == nil { return nil, rep.ErrorInsufficientResources } err := winnerCell.ReserveLRP(&lrpAuction.LRP) if err != nil { s.logger.Error("lrp-failed-to-reserve-cell", err, lager.Data{"cell-guid": winnerCell.Guid, "lrp-guid": lrpAuction.Identifier()}) return nil, err } winningAuction := lrpAuction.Copy() // Return a copy of the auction containing the winning cell winningAuction.Winner = winnerCell.Guid return &winningAuction, nil } Diego Auctions Evaluation (3/3) → Simple as that!
  • 21. www.gstack.io (not yet in Google) www.bosh.io www.lattice.cf www.cloudfoundry.org Questions? ↘ ↙ → @BenjGa ← ↗ ↖