Using Aerospike EE Managed Service for PCF

This topic describes how developers can use Aerospike EE Managed Service for PCF.

After installing and configuring the Aerospike EE Managed Service for PCF tile, developers can create service instances of Aerospike service plans and bind them to their applications using either Apps Manager or the cf CLI. Binding an Aerospike service instance to an application provides the application with information it can use to store and retrieve information in an Aerospike database.

To learn more about how applications can consume information from a service instance to access an Aerospike database, download an example Spring Boot application.

Create and Bind a Service Instance in Apps Manager

To create and bind an Aerospike service instance using Apps Manager, perform the following steps:

  1. Navigate to apps.YOUR-SYSTEM-DOMAIN in a browser and log in to Apps Manager.
  2. Click Marketplace in the left navigation.
  3. Click Aerospike Enterprise Edition from the displayed tiles and click to view the available plans.
  4. Click on the appropriate Select this plan button to select the required Aerospike Service Plan.
  5. In the Instance Name field, enter a name for this specific Aerospike service instance.
  6. From the Add to Space drop-down list, select the space where you or other users will deploy the applications that will bind to the service instance. To bind the service instance to an application, select an application under Bind to App.
  7. Click Show Advanced Options. In the Add Parameters section, add a parameter with name of setname and set the value to the name of the set in the Aerospike database that this application should use to store its data.
  8. Click Add.
  9. You can also bind an application to a service instance by navigating to the application page, clicking Services, and then clicking Bind a Service. You must configure Show Advanced Options as above.
  10. Restage the application.

Create and Bind a Service Instance Using the cf CLI

To create an Aerospike service instance using the cf CLI, perform the following steps:

  1. Set your API endpoint to the Cloud Controller of your deployment.

    $ cf api api.YOUR-SYSTEM-DOMAIN
    Setting api endpoint to api.YOUR-SYSTEM-DOMAIN...
    OK
    API endpoint:  https://api.YOUR-SYSTEM-DOMAIN (API version: 2.59.0)
    Not logged in. Use 'cf login' to log in.
    

  2. Log in to your deployment and select an org and a space.

    $ cf login
    API endpoint: https://api.YOUR-SYSTEM-DOMAIN
    Email> user@example.com
    Password>
    

  3. List the Marketplace services and locate the Aerospike service. The service plans match the namespaces that have been configured on the Aerospike database.

    $ cf marketplace
    Getting services from marketplace in org system / space apps-manager as admin...
    OK

    service plans description aerospike PLAN1, PLAN2, ... Service Broker implementation for an Aerospike database

    TIP: Use 'cf marketplace -s SERVICE' to view descriptions of individual plans of a given service.

  4. Create an instance of the Aerospike service, specifying both the name of the service plan and the name of the service instance.

    $ cf create-service aerospike YOUR-SERVICE-PLAN YOUR-SERVICE-INSTANCE
    

  5. Bind the instance to an application, adding a parameter with name setname and set the value to the name of the set in the Aerospike database that this application should use to store its data.

    $ cf bind-service YOUR-APP YOUR-SERVICE-INSTANCE -c {"setname":"YOUR-SET"}
    Binding service YOUR-SERVICE-INSTANCE to app YOUR-APP in org example / space development as user@example.com...
    OK
    TIP: Use 'cf restage YOUR-APP' to ensure your env variable changes take effect
    

  6. Restage the application for the binding to take effect.

    $ cf restage YOUR-APP
    

Create a pull request or raise an issue on the source for this page in GitHub