Skip to Content

Create a Service Instance and Bind It to Your App

test
0 %
Create a Service Instance and Bind It to Your App
Details
// Explore More Tutorials

Create a Service Instance and Bind It to Your App

12/02/2018

Create an instance of the PostgreSQL service and bind it to your app, as a way to explore how SAP Cloud Platform Cloud Foundry services and apps are connected.

You will learn

  • How apps and services are related
  • How to bind a service to an app

In the Cloud Foundry environment there are apps and there are services. In many cases, apps are what you write, and services are what are available for your app to make use of.

PostgreSQL is a service that is available and to make use of it you create an instance of that service and bind it to your app. You can manage the availability of services, and the instances thereof, in the SAP Cloud Platform cockpit.


Step 1: Open service bindings for your app

In the SAP Cloud Platform Cockpit, navigate to the page for your app, as you learned to do in the Deploy an App to SAP Cloud Platform Cloud Foundry Environment tutorial.

Choose Service Bindings in the navigation area.

Screenshot of Service Bindings area
Log on to answer question
Step 2: Bind an instance of the PostgreSQL service to your app
  1. Choose Bind Service.
    Button Bind Service
  2. Choose Service from the catalog and choose Next. Service wizard
  3. Choose the PostgreSQL tile and choose Next. PostgreSQL tile
  4. Choose the Create new instance option, select a service plan from the Plan field, and then choose Next. Service Plan for PostgreSQL
  5. Skip specifying parameters by choosing Next. Parameters
  6. Enter a name for the service instance and choose Finish.
    Instance name
    The binding is created and added to the list of service bindings.
    Screenshot of list of service bindings after creation

In the text area below, enter the name of the service used in the service bindings of your application. HINT: The name appears in the Service column in the list of service bindings.

×
Step 3: Explore your binding
  1. In the navigation area of the cockpit, choose Overview.
  2. Choose Restart to restart your application. Restart button
  3. In the Application Routes section, choose the URL to open the application.

A new tab opens that displays the app information.

CF application information

In the app, you can see the additional information about the service binding.

Log on to answer question

Next Steps

Back to top