Lifthub #2 Lift Platform as a Service  Kazuo KASHIMA @k4200 (English) @kaigaiengineer (Japanese) d.hatena.ne.jp/k4200
Table of Contents Introduction Demo Architecture Program Future
INTRODUCTION
What is Lifthub? (rpscala 26) In short, Lift version of Heroku. http:// heroku.com / Users can host Lift based apps. No complicated settings Access via web and git Experimental project, at this moment. http:// www.lifthub.net /
What is Lift? “ The most powerful, most secure web framework” Has lots of cutting edge features. Seamless Ajax support “ Designer friendly templates” (CSS selectors) Security implemented by default (and behind the scene) Next Rails?
How to use Lifthub?  Sign up and register your SSH public key. Create a project. Choose a template (NEW) Choose a database (Currently, only MySQL) Development git pull git push Deploy the app using the UI. Run & have fun!
DEMO
ARCHITECTURE
Old (rpscala 26) nginx MySQL Server Manager : : User applications Management application jetty Lifthub Port 80 Port 9000 Port 9001 Port 9xxx Port 8080 deploy start/stop requests create jetty a.war jetty b.war jetty x.war
New MySQL nginx MySQL Server Manager : User apps Management app Port 80 127.0.m.n deploy create/start/stop requests FreeBSD jail Process : GitRepo Manager 127.0.x.y Gitorious (ngix+passenger) create jetty a.war jetty x.war jetty Lifthub Scala Remote actor
Environment User applications Lift 2.2 and 2.3 based templates Jetty 6 (7 will be supported soon.) FreeBSD jail (FreeBSD 8.2) Amazon EC2 Management application Lift 2.2 Jetty 6 Ubuntu 10.04.2 LTS Sakura VPS
Reverse proxy Each user app Runs in a jail (isolated environment). Has a local IP address (127.0.x.y). *.lifthub.net -> 111.171.209.16 Nginx works as a reverse proxy. http://appfoo.lifthub.net/  -> 127.0.m.n:8080 http://appbar.lifthub.net/  -> 127.0.x.y:8080
Development cycle Lifthub Gitorious jetty MySQL ssh key Create user & Register ssh key Register Create project git pull Create Create git push Build & deploy a.war sbt package  etc. proj-a proj-a proj-a sbt
PROGRAM
Components Web UI Lift native features MegaProtoUser CRUDify CSS Selectors External library JGit Akka Server Manager (Akka Remote Actor) Calls “sbt” command
Components (cont’d) GitRepoManager (Akka Remote Actor) Calls ruby scripts to access Gitorious https://github.com/k4200/gitorious-script
Other programs and libraries Gitorious Github clone (?) More features than gitosis. Setup isn’t easy. http://gitorious.org/gitorious JGit Java implementation of git http://www.jgit.org/ Commons Exec http:// commons.apache.org /exec/
Tips sbt sub projects (rpscala 26) http://d.hatena.ne.jp/k4200/20110211/1297416108 Akka Remote Actors (coming soon?) JGit http://d.hatena.ne.jp/k4200/20110304/1299244614 http://d.hatena.ne.jp/k4200/20110321/1300691773
FUTURE
Schedule Date Plan ~  Apr Development (alpha) 2~3 users May Closed beta ~ 20 users June Beta ~ 100 users July Release
TODO Create more templates Different scenarios Different components More components PostgreSQL KVS Document DBs Media servers etc.
TODO (cont’d) Resource management Memory (-Xmx) Disk (quota ?) CPU Best effort for non-paid users  Allocate separate EC2 instances to paid users? Nice UI! Documents and tutorials
Help needed! Testers Developers Anyone interested in Scala and/or Lift Designer

Lifthub (rpscala #31)

  • 1.
    Lifthub #2 LiftPlatform as a Service Kazuo KASHIMA @k4200 (English) @kaigaiengineer (Japanese) d.hatena.ne.jp/k4200
  • 2.
    Table of ContentsIntroduction Demo Architecture Program Future
  • 3.
  • 4.
    What is Lifthub?(rpscala 26) In short, Lift version of Heroku. http:// heroku.com / Users can host Lift based apps. No complicated settings Access via web and git Experimental project, at this moment. http:// www.lifthub.net /
  • 5.
    What is Lift?“ The most powerful, most secure web framework” Has lots of cutting edge features. Seamless Ajax support “ Designer friendly templates” (CSS selectors) Security implemented by default (and behind the scene) Next Rails?
  • 6.
    How to useLifthub? Sign up and register your SSH public key. Create a project. Choose a template (NEW) Choose a database (Currently, only MySQL) Development git pull git push Deploy the app using the UI. Run & have fun!
  • 7.
  • 8.
  • 9.
    Old (rpscala 26)nginx MySQL Server Manager : : User applications Management application jetty Lifthub Port 80 Port 9000 Port 9001 Port 9xxx Port 8080 deploy start/stop requests create jetty a.war jetty b.war jetty x.war
  • 10.
    New MySQL nginxMySQL Server Manager : User apps Management app Port 80 127.0.m.n deploy create/start/stop requests FreeBSD jail Process : GitRepo Manager 127.0.x.y Gitorious (ngix+passenger) create jetty a.war jetty x.war jetty Lifthub Scala Remote actor
  • 11.
    Environment User applicationsLift 2.2 and 2.3 based templates Jetty 6 (7 will be supported soon.) FreeBSD jail (FreeBSD 8.2) Amazon EC2 Management application Lift 2.2 Jetty 6 Ubuntu 10.04.2 LTS Sakura VPS
  • 12.
    Reverse proxy Eachuser app Runs in a jail (isolated environment). Has a local IP address (127.0.x.y). *.lifthub.net -> 111.171.209.16 Nginx works as a reverse proxy. http://appfoo.lifthub.net/ -> 127.0.m.n:8080 http://appbar.lifthub.net/ -> 127.0.x.y:8080
  • 13.
    Development cycle LifthubGitorious jetty MySQL ssh key Create user & Register ssh key Register Create project git pull Create Create git push Build & deploy a.war sbt package etc. proj-a proj-a proj-a sbt
  • 14.
  • 15.
    Components Web UILift native features MegaProtoUser CRUDify CSS Selectors External library JGit Akka Server Manager (Akka Remote Actor) Calls “sbt” command
  • 16.
    Components (cont’d) GitRepoManager(Akka Remote Actor) Calls ruby scripts to access Gitorious https://github.com/k4200/gitorious-script
  • 17.
    Other programs andlibraries Gitorious Github clone (?) More features than gitosis. Setup isn’t easy. http://gitorious.org/gitorious JGit Java implementation of git http://www.jgit.org/ Commons Exec http:// commons.apache.org /exec/
  • 18.
    Tips sbt subprojects (rpscala 26) http://d.hatena.ne.jp/k4200/20110211/1297416108 Akka Remote Actors (coming soon?) JGit http://d.hatena.ne.jp/k4200/20110304/1299244614 http://d.hatena.ne.jp/k4200/20110321/1300691773
  • 19.
  • 20.
    Schedule Date Plan~ Apr Development (alpha) 2~3 users May Closed beta ~ 20 users June Beta ~ 100 users July Release
  • 21.
    TODO Create moretemplates Different scenarios Different components More components PostgreSQL KVS Document DBs Media servers etc.
  • 22.
    TODO (cont’d) Resourcemanagement Memory (-Xmx) Disk (quota ?) CPU Best effort for non-paid users Allocate separate EC2 instances to paid users? Nice UI! Documents and tutorials
  • 23.
    Help needed! TestersDevelopers Anyone interested in Scala and/or Lift Designer