Marketplace & Service Instances
We never run production code against H2 Database, We need some NoSql/RDBMS Solutions like Cassndra/MongoDB/Oracle/Mysql/Postgres etc...
The Problem Statement
How do I provision a service to my space.
- On the terminal , type in
- You will get the listing of all the services that you would be able to create.
I'm interested in a postgres instance
postgres shared, shared-nr Reliable PostgrSQL Service
To get more details about a service type in
cf marketplace -s <SERVICE_NAME>, For example
cf marketplace -s postgres
Getting service plan information for service postgres as *******@**.com... OK service plan description free or paid shared A Reliable PostgreSQL database on a shared server. free shared-nr A PostgreSQL database with no replication on a shared server. free
So how do I go about creating an Postgres instance
cf cs postgres shared-nr database
- Time to bind the Postgres instance to our
- Create some entity and RestResource, Check this commit for details
- So as to follow the 12factor Admin process, I'm using flyway to make migrations easier, Check this commit for details
- Time for
mvn clean install && cf push
- For help on any command in cf-cli, type in
cf help <COMMAND>, for eg:
cf help cs,
cf help m
- If a service is bound to an application, you need to restage the application using
cf restage <APP_NAME>command
- Flyway is not database agnostic
- Make sure that you turn off any ddl operation by hibenate by setting
- Checkout Hibernate Licensing to make sure you don't get into trouble later.