Using Etherpad Lite with PWS
Page last updated:
Etherpad Lite is a powerful online collaboration platform that multiple open source projects such as OpenStack Etherpad use. This topic provides step-by-step instructions for setting up Etherpad Lite on Pivotal Web Services (PWS), powered by Cloud Foundry.
Log in to PWS
Go to PWS and log in. If you do not have an account, sign up.
If you already have the Cloud Foundry Command Line Interface (cf CLI) installed, skip this step. If you do not have it, follow the instructions in Installing the cf CLI.
Log in to PWS using the cf CLI, as the example below shows. Select “development” when you are prompted to choose a space.
$ cf login -a https://api.run.pivotal.io API endpoint: https://api.run.pivotal.io
Email> email@example.com
Password> Authenticating... OK
Targeted org sandbox
Select a space (or press enter to skip):
- development
- staging
- production
Space> 1 Targeted space development
API endpoint: https://api.run.pivotal.io (API version: 2.22.0) User: email@example.com Org: sandbox Space: development
$
Download Etherpad Lite
Download the latest etherpad-lite-cf release ZIP file from Github.
Extract the contents of the etherpad-lite-cf.zip file to the deployment directory for your application.
Push Your Application to PWS
Use
cf push YOURAPPNAME
to push Etherpad Lite to PWS, as the example below shows. Ensure that you do the following when you runcf push YOURAPPNAME
from your application directory:- Enter a unique name for your application. This name will also be used as the host in the URL to your application.
- Choose a different application name if you get an error stating that the host is taken.
$ cf push test Creating app test in org sandbox / space development as email@example.com... OK ...snip... 1 of 1 instances running App started OK App test was started using this command `node node_modules/ep_etherpad-lite/node/server.js` Showing health and status for app test in org sandbox / space development as email@example.com... OK requested state: started instances: 1/1 usage: 1G x 1 instances urls: test.cfapps.io last uploaded: Fri Feb 20 18:36:32 UTC 2015 state since cpu memory disk #0 running 2015-02-20 10:37:48 AM 0.0% 129.6M of 1G 240.6M of 1G
To see your Etherpad Lite application, browse to
http://YOURAPPNAME.cfapps.io/
.
By default, the etherpad-lite-cf application deploys with a built-in database, suitable for testing. To use a production database, see the next section.
Create and Bind a Database to Your Application
Return to the PWS Apps Manager.
Select your org and click your space.
Click your application.
Select the Services tab and click Bind a Service.
Click or add from Marketplace.
Click ClearDB MySQL Database.
Select Spark DB and click Select this plan.
In the Configure Instance section, configure the fields as follows:
- Instance Name: Name your instance
cleardb-etherpad
. - Add to Space: Keep the default value.
- Bind to App: Use the dropdown menu to select your application.
Click Add.
- Instance Name: Name your instance
In the terminal, run
cf restage YOURAPPNAME
to ensure that your service binding is available to your application.
SSL Configuration
PWS provides SSL out of the box for your app. To use SSL, access your application over HTTPS at https://YOURAPPNAME.cfapps.io/
. See Setting Up SSL-Enabled Custom Domains Using CloudFlare for instructions on how to use SSL with your own domain name.