Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building a framework on Mesos: A case study wit...
Search
Vinod Kone
July 23, 2015
Technology
0
99
Building a framework on Mesos: A case study with Jenkins
Vinod Kone
July 23, 2015
Tweet
Share
More Decks by Vinod Kone
See All by Vinod Kone
Nested Containers & Task Groups
vinodkone
0
55
Mesos 1.0
vinodkone
1
60
Fault Tolerance In Mesos
vinodkone
0
98
The Future Data Center
vinodkone
0
37
Mesos Framework API v1
vinodkone
0
45
Other Decks in Technology
See All in Technology
PostgreSQL 18 cancel request key長の変更とRailsへの関連
yahonda
0
120
Navigation3でViewModelにデータを渡す方法
mikanichinose
0
220
解析の定理証明実践@Lean 4
dec9ue
0
180
Amazon ECS & AWS Fargate 運用アーキテクチャ2025 / Amazon ECS and AWS Fargate Ops Architecture 2025
iselegant
16
5.6k
製造業からパッケージ製品まで、あらゆる領域をカバー!生成AIを利用したテストシナリオ生成 / 20250627 Suguru Ishii
shift_evolve
PRO
1
140
セキュリティの民主化は何故必要なのか_AWS WAF 運用の 10 の苦悩から学ぶ
yoh
1
170
【TiDB GAME DAY 2025】Shadowverse: Worlds Beyond にみる TiDB 活用術
cygames
0
1.1k
Fabric + Databricks 2025.6 の最新情報ピックアップ
ryomaru0825
1
140
2025-06-26_Lightning_Talk_for_Lightning_Talks
_hashimo2
2
100
SalesforceArchitectGroupOsaka#20_CNX'25_Report
atomica7sei
0
170
エンジニア向け技術スタック情報
kauche
1
260
Tech-Verse 2025 Keynote
lycorptech_jp
PRO
0
120
Featured
See All Featured
Thoughts on Productivity
jonyablonski
69
4.7k
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
How STYLIGHT went responsive
nonsquared
100
5.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
For a Future-Friendly Web
brad_frost
179
9.8k
Making the Leap to Tech Lead
cromwellryan
134
9.3k
Mobile First: as difficult as doing things right
swwweet
223
9.7k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Transcript
Building a framework on Mesos: A case study with Jenkins
@vinodkone
Architecture Master (leader) Spark Scheduler Hadoop Scheduler Jenkins Scheduler Master
(standby) Master (standby) ZooKeeper Slave Hadoop Executor Task1 Spark Executor Task1 Slave Hadoop Executor Task1 Task2 Slave Jenkins Executor Task1
• Scheduler • receives resource offers • launches tasks •
Executor * • executes tasks • launched by the slave • * optional (Command Executor) Slave cpus: 10, mem: 2GB Anatomy of a Framework Scheduler Master Offer cpus:10 mem: 2GB Executor Task cpus: 2 mem: 1GB
Writing a Framework • APIs and drivers • C++, Java,
Python • see example frameworks (src/examples) • Open Source frameworks • Scala: Chronos, Spark • Java: Hadoop, Jenkins, Storm • Python: dpark
Scheduler Callbacks registered(frameworkId, masterInfo) resourceOffers(offers) statusUpdate(taskStatus) ...more Actions launchTasks(offerId, taskInfos,
filters) killTask(taskId) declineOffer(offerId, filters) ...more
Resource offers @override public void resourceOffers(SchedulerDriver driver, List<Offer> offers) {
for (Offer offer : offers) { bool matched = false; for (Request request : requests) { if (matches(offer, request) { matched = true; createMesosTask(offer, request); requests.remove(request); break; } } } } driver.launchTasks(offer.getId(), tasks, filters)
Executor Callbacks registered(executorInfo, frameworkInfo, slaveInfo) launchTask(taskInfo) killTask(taskId) ...more Actions sendStatusUpdate(taskStatus)
sendFrameworkMessage(data) ...more
Status Updates • Executor to inform task state to scheduler
• non-terminal updates (e.g., TASK_RUNNING) • terminal updates (e.g., TASK_FINISHED) • TASK_LOST: (e.g., slave terminated) • Status updates are crucial! • e.g., terminal update frees up resources
Things to keep in mind • Callbacks are single threaded
• i.e., one callback at a time • should not block in a callback! • Actions are asynchronous • e.g., sendStatusUpdate() enqueues the update
Jenkins on Mesos +
Motivation • Jenkins clusters are statically allocated • order of
magnitude smaller than compute cluster • Over utilized • very high build times • Under utilized • wastage of resources source: builds.apache.org
Goals • Make Jenkins elastic • auto scale based on
workload • Harness the compute cluster • already spent $$$ on it • Resource isolation • helps with capacity planning
Jenkins Framework • Jenkins Scheduler • implemented as a Jenkins
plugin • launches Jenkins slaves based on workload • kills idle Jenkins slaves • Command Executor
Slave Architecture Jenkins Master Job Queue Mesos Plugin Jenkins Scheduler
Mesos Master Cloud Command Executor Jenkins Slave JN LP Jenkins
Installing the plugin • Getting the plugin • source code
in mesos repo (git.apache.org/mesos) • build yourself : $ make jenkins • download directly from Jenkins repo (soon) • Installing the plugin • from Jenkins Web UI •$ cp mesos.hpi ${JENKINS_HOME}/plugins
Configuring the plugin • Go to /configure on Jenkins •
add a new Mesos Cloud • give the address of Mesos master • Label the jobs as “mesos” • Caveat: experimental release!
Demo
Questions? @ApacheMesos http://mesos.apache.org