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 with Jenkins
Search
Vinod Kone
July 23, 2015
Technology
0
84
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
43
Mesos 1.0
vinodkone
1
55
Fault Tolerance In Mesos
vinodkone
0
87
The Future Data Center
vinodkone
0
32
Mesos Framework API v1
vinodkone
0
38
Other Decks in Technology
See All in Technology
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
320
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
14
35k
「手動オペレーションに定評がある」と言われた私が心がけていること / phpcon_odawara2024
blue_goheimochi
2
320
LLM とプロンプトエンジニアリング/チューターをビルドする / LLM and Prompt Engineering and Building Tutors
ks91
PRO
0
220
WebアプリケーションにおけるPDOの使い方入門 / phpcon odawara 2024
meihei3
2
420
2024/4/26 コンピュータ歴史博物館解説告知
toshi_atsumi
0
190
人間の尊厳、幸福、アクセシビリティ / 第116回「WEB TOUCH MEETING」アクセシビリティSP
nulabinc
PRO
2
180
Next'24 事例セッションの紹介とクラウド資格を活用したキャリア形成について語りMuscle
yasumuusan
1
310
"好き"との生活/Regularly update profile with GitHub Actions
judeeeee
0
150
オーナーシップを持つ領域を明確にする
konifar
10
2.1k
A (short) History of AI
harishpillay
0
110
Oracle Cloud Infrastructure:2024年4月度サービス・アップデート
oracle4engineer
PRO
1
110
Featured
See All Featured
Music & Morning Musume
bryan
41
5.6k
No one is an island. Learnings from fostering a developers community.
thoeni
14
2.1k
Building a Scalable Design System with Sketch
lauravandoore
455
32k
Optimizing for Happiness
mojombo
370
69k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
13
1.5k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
658
120k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
60
14k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
9
8.3k
4 Signs Your Business is Dying
shpigford
175
21k
Pencils Down: Stop Designing & Start Developing
hursman
117
11k
We Have a Design System, Now What?
morganepeng
42
6.7k
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