Installing DreamFactory on Pivotal Web Services

September 25, 2014 Eli Aleyner

featured-pws-dreamfactoryThe DreamFactory open source REST API platform can now be installed on Pivotal Web Services (PWS) as an application. DreamFactory enables developers to 1) build the front-end application on their local machines and then 2) push the required mobile back-end infrastructure services on Pivotal Web Services for reliable, scalable, and affordable PaaS hosting.

We choose PWS, as this integration results in the ideal experience for our customers. Not only can our customers now benefit from a set of RESTful data-services powered by DreamFactory, but also the simplicity in operations and deployment of PWS.

As with all apps, it is very easy to scale DreamFactory apps on Pivotal Web Services. You just specify the total number of application instances and this controls the maximum number of REST API transactions per second that the platform can handle. The cost model is quite low and easy to predict at only 3 cents per GB/hour. As an application becomes more popular, you can rely on PWS to help you scale without breaking the bank.

This blog post provides all of the information you need for installing DreamFactory on PWS. We also include an example HTML5 application so that you can see data hosted on PWS from any mobile device. We have included a few short movies that show an overview of the installation process, and some other helpful links, below. If you have any feedback or ideas on how we can improve this product or our integration with Pivotal, please send us an email to

Helpful Links:

Pivotal Web Services website

Pivotal Web Services documentation

DreamFactory website

DreamFactory Forum

DreamFactory Documentation

Overview Movies:

Overview of DreamFactory on PWS

Installation Details For DreamFactory On PWS

Customizing the DreamFactory image for PWS

Setting Up DreamFactory

On PaaS systems like PWS there is no persistent storage on the server side. Because of this, your application must be bound to an external SQL database, and PWS provides a number of options for this. You also cannot edit web application files or server-side scripts in the cloud. In this case, you would just be editing the file in temporary local storage.

There are two ways to handle this issue. If you don’t need local web files or server-side scripting, then just grab the DreamFactory source code from GitHub and push that. You can run the DreamFactory Admin Console on PWS and configure your platform from there. Your modifications are saved in the SQL database.

Or you can run DreamFactory on the local desktop, and develop and debug your applications from there. DreamFactory has Bitnami installers for Linux, OS X, and Windows. When you push the desktop folder your local web application files and server-side scripts will be included in the PWS image. Both of these methods are covered in the instructions, below.


Push To Pivotal Web Services

There are some “one time” tasks setting up your development environment that need to happen before you can push to PWS. These are outlined in detail below, but here are the major items:

  • Get an account with Pivotal Web Services
  • Install the Cloud Foundry command line tools
  • Move a database configuration file in your DreamFactory directory
  • Edit the application manifest file in your DreamFactory directory
  • Push the DreamFactory image to PWS
  • Connect a MySQL database to the application

After this, you can develop applications locally and update any changes with the “cf push” command. You can edit your application with desktop tools, and push the image to PWS with one command!


Detailed Instructions


Get a Pivotal Web Services account.

Read the Pivotal documentation.

Install the Pivotal CLI tool on your local machine.


Get the DreamFactory source code,

Or the desktop installer.

Run the installer or unpack the source in a desktop folder.


Locate the root folder for the DreamFactory source code:

For the GitHub repository, this will just be the “dsp-core-master” folder

For the desktop install, this will be the “…/apps/dreamfactory/htdocs” folder

Make the following changes:

1) Copy config/databases/database.pivotal.config.php-dist to config/databases/database.config.php

2) Copy config/manifests/manifest.pivotal.yml-dist to manifest.yml in the root folder

3) Edit manifest.yml and change [app-name] and [host-name] to your app name


Navigate to the source code folder with the Command Prompt and type the following:

1) cf api

This will point the CloudFoundry command-line interface to the PWS APIs. Note: that you can also install DreamFactory to your own hosted version of CloudFoundry, by simply pointing to your instance’s API end-point

2) cf login

This will ask you for credentials to login to PWS.

3) cf push

This will push all the code based in this directory, build and deploy it to PWS.

Note: in this stage your app will be deployed to PWS, but it won’t yet function as we need to add a database binding (which we’ll do in the next step)


DreamFactory needs a database to store user, role, and service information.

Next we are going to set up the ClearDB MySQL database for this purpose.

Log into your PWS account.

Create a new ClearDB service and bind it to your app using the PWS user interface.

Restart your application by clicking in the green circle next to your application name.

In the future, you just have to do the login and push to update your application.


We have a demo application that can be used to edit the SQL data in your PWS account.

Navigate to the Apps tab of the DreamFactory Admin Console.

Click the “Import” button at upper right, and enter the URL below.

A new application named “Data Manager” will appear in the list to the left.

Open this application from the Admin Console or a mobile device to create and edit data on PWS.

Deliver and update applications at velocity and scale

By installing DreamFactory on PWS, can get the benefit of easier access to their data and the scalability and operational benefits of PWS. We are excited to see what applications you will build with this powerful combination.

Bill_Appleton About the Author: Bill Appleton is a leading expert on the use of web services for smart client applications. He has designed and written approximately three dozen professional software publications, including the rich media authoring tool SuperCard in 1989, the worldwide best selling CD-ROM Titanic in 1996, and the first AppExchange application DreamTeam in 2005. Bill previously served as the President of the gaming company CyberFlix. Currently he is the President of DreamFactory Software, which develops an open source REST API for HTML5 and native mobile applications.

About the Author

Eli Aleyner

Eli is a senior product and alliances leader at Pivotal, currently leading Pivotal's alliance with Microsoft. Previously Eli lead product and engineering teams at Pivotal, Microsoft, Amazon and funded startups.

Follow on Twitter
Synapse LLC: Providing Mobile and Web Solutions for Customers with Pivotal Web Services
Synapse LLC: Providing Mobile and Web Solutions for Customers with Pivotal Web Services

In this post, Sureel Bhurat, co-founder of Synapse LLC, a young Boston based company that builds SaaS web a...

An Introduction to the Pivotal CF Mobile Suite API Gateway
An Introduction to the Pivotal CF Mobile Suite API Gateway

The API Gateway is one of the products available on the Pivotal CF Mobile Services. It allows developers to...