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
DIY: your own PaaS using Python
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
SysFera
October 17, 2012
Programming
1
410
DIY: your own PaaS using Python
Talk presented during OSDC.fr 2012 (OpenWorld Forum).
Don't do that, just use an existing PaaS ;)
SysFera
October 17, 2012
Tweet
Share
More Decks by SysFera
See All by SysFera
SysFera-DS @ ROMEO-CRIHAN
sysfera
0
73
Le développement SaaSvite fait, bien fait
sysfera
2
120
API : point-clé du succès de votre application en SaaS
sysfera
2
97
Comment bien mettre en place son Business Model SaaS
sysfera
1
720
Webinar : Développement d'Applications, les enjeux technologiques du SaaS #2
sysfera
0
170
Webinar : Développement d'Applications, les enjeux technologiques du SaaS
sysfera
0
58
SysFera-DS: Platform for HPCaaS
sysfera
1
140
ZeroMQ: Scale Up !
sysfera
1
430
The Decrypthon Project : Helping Cure Muscular Distrophy Through Grid And Volunteer Computing
sysfera
0
71
Other Decks in Programming
See All in Programming
CSC307 Lecture 11
javiergs
PRO
0
580
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
190
Ruby x Terminal
a_matsuda
5
570
メタプログラミングで実現する「コードを仕様にする」仕組み/nikkei-tech-talk43
nikkei_engineer_recruiting
0
150
CopilotKit + AG-UIを学ぶ
nearme_tech
PRO
1
120
「やめとこ」がなくなった — 1月にZennを始めて22本書いた AI共創開発のリアル
atani14
0
340
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
12
7.4k
AHC061解説
shun_pi
0
300
AI時代のソフトウェア開発でも「人が仕様を書く」から始めよう-医療IT現場での実践とこれから
koukimiura
0
130
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
190
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
940
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
200
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
85
Building an army of robots
kneath
306
46k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Utilizing Notion as your number one productivity tool
mfonobong
4
240
The Cost Of JavaScript in 2023
addyosmani
55
9.7k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
59
50k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Embracing the Ebb and Flow
colly
88
5k
30 Presentation Tips
portentint
PRO
1
250
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
230
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Transcript
Do It Yourself: Your Own PaaS in Python whoami
Wuts teh PaaS ting ?
Dis ar teh Clown Computin U sign ? U haz
providerz ?
Y mak ur pwn PaaS ? self-hosting ! better understanding
of PaaS platforms It's fun !
PaaS architecture Teh devlopment workflow 1. write code 2. test
code 3. commit code 4. push code 5. QA test 6. tag release (production)
Y U LIE ? Points 2. & 5. from previous
slides are obvious lies because it looks good and it pleases managers ! Wat do u ned ? machines applicative stack DNS server orchestration framework SCM API
Git Ur Toolbox RDY !
DNS Server Bind dynamic DNS nsupdate update delete <my_app>.<my_domain> A
update add <my_app>.<my_domain> 180 A <node_ip>
SCM git gitolite Gitolite ? SSH proxy no real user,
no shell access fine-grained control access to repository
Applicative stack virtualenv pip WSGI ! virtualenv --no-site-packages <my_app> source
bin/activate pip -r requirements.txt gunicorn <my_app>:app
Orchestration install/remove/update packages edit configuration files upload/download files start/stop/monitor services
etc ... many choices CFEngine/Puppet/Chef/Salt/Ansible etc. Fabric !
Fabric Wut Wut ? Python module command-line tool: fab SSH-based
Principels tasks hosts
I CAN HAZ ? from fabric.api import * def update():
""" update machine using yum """ with settings(hide('running', 'stdout', 'stderr', 'warnings'), warn_only=True): sudo("yum -y update") fab -H <use>@<my_node> update
RLY Thaz all ? Awsome ! can be used with
command-line (auto-documented !) can be used in Python code Web API !
Web API ! REST CRUD Twisted event-based network engine Easy
to create web services ! a sample CRUD application
a sample CRUD application import sys from twisted.internet import reactor,
server, resource, http class Persona(resource.Resource): def __init__(): pass def render_GET(self, request): # request contains all parameters # you crunch it and return res return res def render_PUT(self, request): pass a sample CRUD application def render_DELETE(self, request): pass def render_POST(self, request): pass def render_UPDATE(self, request): pass if __name__ == "__main___"": root = resource.Resource() persona = Persona() root.putChild('persona', persona) reactor.listenTCP(80, server.Site(root) U no machines ?
U no machines ? erm ... IaaS is in da
place Boto fire new cloud instances very eazy
very eazy import boto import boto.ec2 conn = boto.conn_ec2() reservations
= conn.run_instances(**<dict_of_conf>) conn.terminate_instances(<list_of_ids>) Conclusion