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

  1. Go to PWS and log in. If you do not have an account, sign up.

    Pws landing page

  2. 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.

  3. 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):

    1. development
    2. staging
    3. 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

  1. Download the latest etherpad-lite-cf release ZIP file from Github.

    Download etherpad lite

  2. Extract the contents of the etherpad-lite-cf.zip file to the deployment directory for your application.

Push Your Application to PWS

  1. Use cf push YOURAPPNAME to push Etherpad Lite to PWS, as the example below shows. Ensure that you do the following when you run cf 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
    
  2. 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

  1. Return to the PWS Apps Manager.

  2. Select your org and click your space.

    Org space

  3. Click your application.

    Your application

  4. Select the Services tab and click Bind a Service.

    Bind service

  5. Click or add from Marketplace.

    Add marketplace

  6. Click ClearDB MySQL Database.

    Services marketplace

  7. Select Spark DB and click Select this plan.

    Cleardb

  8. 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.

    Cleardb configure instance

  9. 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.

Create a pull request or raise an issue on the source for this page in GitHub