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
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
94
Comment bien mettre en place son Business Model SaaS
sysfera
1
710
Webinar : Développement d'Applications, les enjeux technologiques du SaaS #2
sysfera
0
160
Webinar : Développement d'Applications, les enjeux technologiques du SaaS
sysfera
0
54
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
70
Other Decks in Programming
See All in Programming
開発に寄りそう自動テストの実現
goyoki
2
1.7k
re:Invent 2025 のイケてるサービスを紹介する
maroon1st
0
160
Graviton と Nitro と私
maroon1st
0
160
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
570
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
450
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
440
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
3.3k
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
5
1.5k
マスタデータ問題、マイクロサービスでどう解くか
kts
0
170
LLM Çağında Backend Olmak: 10 Milyon Prompt'u Milisaniyede Sorgulamak
selcukusta
0
140
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
1
200
大規模Cloud Native環境におけるFalcoの運用
owlinux1000
0
230
Featured
See All Featured
Building AI with AI
inesmontani
PRO
1
600
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Chasing Engaging Ingredients in Design
codingconduct
0
93
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
260
4 Signs Your Business is Dying
shpigford
187
22k
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
200
Crafting Experiences
bethany
0
25
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
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