Pivotal Cloud Foundry

How to deploy alf.io on Pivotal™ Cloud Foundry

Account setup

In order to proceed, you must create and activate an account on Pivotal Cloud Foundry.

After that you must download and install the Pivotal cli tools

Push (deploy) the application

First of all run the following command to log yourself in:

$ cf login -a https://api.run.pivotal.io

enter your e-mail and password when requested. After that, you’re ready to deploy your new application:

$ cf push *YOUR_APP_NAME* -p /path/to/alf.io-{VERSION}-boot.war --no-start

Please note that the application name will be part of the url (e.g. YOUR_APP_NAME.cfapps.io). That’s it!

Database configuration

Since the database is not yet configured, we cannot start the application. But don’t worry, we’re about to fix that.

Create new database instance

Open the Dashboard, and click on “Add Service”

add service to your application

Select the database from marketplace

select “ElephantSQL”

select ElephantSQL service

Select the plan

ElephantSQL offers multiple plans. Just pick up the one that would fit your needs.

If you want to do a test-drive, you can easily select their free plan, otherwise we strongly suggest you to pick up one of their paid plans (Simple Spider should be fine)

select ElephantSQL plan

Connect the database to the Application

give a name to your database and bind it to your application

bind database to application

(Re)start your application

After adding the database, either (re)start the application from the console or run the following command:

$ cf restart YOUR_APP_NAME

restart application from the console

Retrieve admin password

check the logs

$ cf logs YOUR_APP_NAME --recent

and find the auto-generated password. Then you can access the admin under https://YOUR_APP_NAME.cfapps.io/admin/

find password on log