Search This Blog

Thursday, 1 October 2015

IBM Bluemix - Triggerring backing service creation from "Deploy to Bluemix" button

I recently posted about the "Deploy to Bluemix" button which will automatically deploy an application into IBM Bluemix from a single click.

http://theblasfrompas.blogspot.com.au/2015/09/adding-deploy-to-bluemix-button-to-my.html

If the application requires backing services they can automatically be created using the"declared-services" tag as shown below. Declared services are a manifest extension, which creates or looks for the required or optional services that are expected to be set up before the app is deployed, such as a data cache service. You can find a list of the eligible Bluemix services, labels, and plans by using the CF Command Line Interface and running cf marketplace

manifest.yml

declared-services:
  redis-session:
    label: rediscloud
    plan: 30mb
applications:
 - name: pas-sbsessions
   memory: 512M
   instances: 2
   path: ./target/SpringBootHTTPSession-0.0.1-SNAPSHOT.jar
   host: pas-sbsessions
   domain: mybluemix.net
   buildpack: java_buildpack
   services:
    - redis-session


Note: Declared services is an IBM extension of the standard Cloud Foundry manifest format. This extension might be revised in a future release as the feature evolves and improves.

No comments: