Skip to content

Commit

Permalink
Updated manifest.yml and README for cf v6.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottfrederick committed May 29, 2014
1 parent b4948a4 commit 6524808
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 29 deletions.
92 changes: 70 additions & 22 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,84 @@ This sample has been modified to run on Cloud Foundry. The `cf-autoconfig` gem w
After installing in the 'cf' [command-line interface for Cloud Foundry](http://docs.cloudfoundry.com/docs/using/managing-apps/cf/),
targeting a Cloud Foundry instance, and logging in, the application can be pushed using these commands:

First, view a list of services and plans available in your Cloud Foundry instance:

~~~
$ cf marketplace
Getting services from marketplace
OK
service plans description
blazemeter free-tier, basic1kmr, pro5kmr, pp10kmr, hv40kmr The JMeter Load Testing Cloud
cleardb spark, boost, amp, shock Highly available MySQL for your Apps.
cloudamqp lemur, tiger, bunny, rabbit, panda Managed HA RabbitMQ servers in the cloud
cloudforge free, standard, pro Development Tools In The Cloud
elephantsql turtle, panda, hippo, elephant PostgreSQL as a Service
ironmq pro_platinum, pro_gold, large, medium, small, pro_silver Powerful Durable Message Queueing Service
ironworker large, pro_gold, pro_platinum, pro_silver, small, medium Scalable Background and Async Processing
loadimpact lifree, li100, li500, li1000 Automated and on-demand performance testing
memcachedcloud 25mb, 100mb, 250mb, 500mb, 1gb, 2-5gb, 5gb Enterprise-Class Memcached for Developers
mongolab sandbox Fully-managed MongoDB-as-a-Service
newrelic standard Manage and monitor your apps
rediscloud 25mb, 100mb, 250mb, 500mb, 1gb, 2-5gb, 5gb, 10gb, 50gb Enterprise-Class Redis for Developers
searchify small, plus, pro Custom search you control
searchly small, micro, professional, advanced, starter, business, enterprise Search Made Simple. Powered-by ElasticSearch
sendgrid free, bronze, silver, gold, platinum Email Delivery. Simplified.
~~~

Choose a PostgreSQL service from the list and create a service instance named `rails-postgres` using a PostgreSQL service and plan:

~~~
$ cf push
$ cf create-service SERVICE PLAN rails-postgres
Creating service rails-postgres
OK
~~~

Now push the application:

~~~
$ cf push --random-route
Using manifest file manifest.yml
Creating rails-sample... OK
Updating app rails-sample
OK
Creating route rails-sample_aa552.cfapps.io... OK
Binding rails-sample_aa552.cfapps.io to rails-sample... OK
Creating service rails-postgres... OK
Binding rails-postgres to rails-sample... OK
Uploading rails-sample... OK
Creating route rails-sample-desiccative-acetylizer.cfapps.io...
OK
Starting rails-sample... OK
...
Checking rails-sample...
Staging in progress...
Binding rails-sample-desiccative-acetylizer.cfapps.io to rails-sample...
OK
Uploading rails-sample...
Uploading app files from: rails_sample_app
Uploading 41.1M, 6349 files
OK
Binding service rails-postgres to app rails-sample
OK
Starting app rails-sample
OK
...
1/1 instances: 1 running
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
0 of 1 instances running, 1 starting
1 of 1 instances running
App started
Showing health and status for app rails-sample
OK
$ cf app
Using manifest file manifest.yml
requested state: started
instances: 1/1
usage: 256M x 1 instances
urls: rails-sample-desiccative-acetylizer.cfapps.io
rails-sample: running
usage: 256M × 1 instance
urls: rails-sample-e3605.cfapps.io
services: rails-postgres
state since cpu memory disk
#0 running 2014-05-29 03:34:22 PM 0.0% 50.3M of 256M 80.2M of 1G
~~~

The application will be pushed using settings in the provided `manifest.yml` file. The settings include some random
characters in the host to make sure the URL for the app is unique in the Cloud Foundry environment. The output of the
`cf app` command shows the URL that was assigned. Using the provided URL in the `urls` field displayed, you can browse
to the running application.
The application will be pushed using settings in the provided `manifest.yml` file. The `--random-route` option adds random
words in the host to make sure the URL for the app is unique in the Cloud Foundry environment. The output of the
`cf push` command shows the URL that was assigned. Using the provided URL you can browse to the running application.
8 changes: 1 addition & 7 deletions manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,7 @@ applications:
- name: rails-sample
memory: 256M
instances: 1
host: rails-sample-${random-word}
domain: cfapps.io
path: .
command: bundle exec rake db:migrate && bundle exec rails s -p $PORT
services:
rails-postgres:
label: elephantsql
provider: elephantsql
version: n/a
plan: turtle
- rails-postgres

0 comments on commit 6524808

Please sign in to comment.