ryanwold.net

A civic-minded citizen seeking the singularity

Back to Entries

Moving a Heroku App to Pivotal Cloud Foundry

draft
Date: 2016-01-22
Tags: ruby devops deployment

Background

Recently, I've moved many applications from Dreamhost to Heroku, and it has been great to alleviate some of the deployment workarounds I had to do on Dreamhost that disappeared with Heroku. However, what did appear was an increasingly large monthly bill for web services. Quickly peaking $100/month for personal and side apps; I traded one convenience for another.

More recently, I've heard about Pivotal's Cloud Foundry or Pivotal Web Services, and wanted to give it a try.

Moving a Rails app from Heroku to PWS took a little getting used to. But once going through a time or two, it felt just as easy, and felt a bit more performant for my starter app.

My Experience

Logging into PWS the first time; the web UI has a modern, enterprisey feel. Dropped onto the Welcome screen, I'm instructed to download and install the command-line tool (CLI). Clicking through to "Getting Started..." reiterates the first steps and ends with a link on how to get started deploying your first app (which was a little awkward, but...). Clickety click.

Setup

Create an "environment" inside Pivotal Web Services. An environment consists of Organizations Org; the highest level. Orgs have 1 or more Spaces. Spaces Space, are subdivisions. Maybe like departments. Spaces have one or more Applications App.

When it came time to deploy, I had a bit of trouble finding out how to get an app deployed. Fortunately, it was easy once I figured it out (the cost is finding information). To deploy a Rails app to Pivotal Web Services, use cf push.

cf push pushes the whole current directory (NOT a branch, like Heroku does)

So beware of tmp files, logs, uploads, and other things you may have accumulated in a local development branch.

Resources

In PWS

Provision and Bind a Service (like Postgres)

My Rails app on Pivotal Web Services uses a manifest.yml configuration file, which is new to me, coming from Heroku.

By Ryan Wold · © 2016–2026 Ryan Wold

Licensed CC BY-NC 4.0. AI training requires a license — machine-readable terms.

Enjoyed this? — any BSV wallet, HandCash, or plain old dollars.

Leave a tip

Tips go directly to a Bitcoin SV address I control — peer to peer, no platform in between. A few thousand satoshis is a fraction of a cent; it's the gesture that counts.

From any BSV wallet

Scan the QR code with your wallet's camera, or copy the address.

177DwUfSTW8RkFBJzYYcgr1YB8ngbhTYAc

With HandCash or any paymail wallet

Paymail is an email-style address for Bitcoin wallets. Send any amount to afomi@handcash.io

First time using Bitcoin? Yours Wallet is an open-source browser extension wallet, and HandCash is an easy mobile wallet — either takes a minute to set up.

Prefer regular money? Support via OpenCollective.