Skip to content

How to deploy Etherpad Lite on Cloudfoundry.com

rozcietrzewiacz edited this page Mar 4, 2012 · 4 revisions

In case you're not familiar with Cloud Foundry, it's an opensource platform as a service (PaaS) project sponsored by VMware. https://github.com/cloudfoundry

Register Cloud Foundry account

  • Register an account at http://www.cloudfoundry.com/signup
  • Install cloud foundry command line tool using gem gem install vmc
  • Login using your cf account vmc login you_email_address

Get the code and configure

  • Get etherpad code with cf support: git clone git://github.com/rozcietrzewiacz/etherpad-lite.git; cd etherpad-lite
  • Install node, npm and other dependencies as usual.
  • Copy/rename settings.json.template to settings.json and adjust the settings to your liking.

Upload Etherpad to CloudFoundry and bind a MySQL database service to it.

  • Create a MySQL service (replace myDatabase with a name of your choice) : vmc create-service mysql myDatabase
  • [crucial step] Make sure you're in the etherpad-lite folder and upload your Etherpad to the cloud with (replace myEtherpad with any name you want) : vmc push myEtherpad --mem=128 --runtime node06. You'll be asked a few questions at this point - for most of them, you can just press Enter, but make sure to answer y to the following two:
  • Would you like to bind any services to 'myEtherpad'?
  • Would you like to use an existing provisioned service? - at this point, you'll be asked to select the service - choose the database service you've just created. Also, note the URL at which your Etherpad-Lite installation will be available.
  • If all went well, you should now be able to point your browser to the url of your new Etherpad and start a new pad. Enjoy!

Notes

  • The --runtime node06 option is currently necessary, since vmc does not properly recognize needed version of node. If omitted, a 0.4.* version would be used by default, which does not work with current Etherpad-Lite due to missing zlib dependency.
  • One can also skip creating a mysql service before pushing, and create it when prompted by the push command.