Using Altoros Spark for PCF

This topic describes how developers create and bind instances of the Altoros Spark for Pivotal Cloud Foundry (PCF).

After deploying the Apache Spark for PCF tile, the Apache Spark service appears in the Marketplace. Developers can use either the Cloud Foundry Command Line Interface (cf CLI) or Apps Manager to create a service instance and bind it to apps. Binding instances is the process of creating unique credentials for each app to access the database.

Create and Bind a Service Instance Using the CF CLI

To create and bind an instance of the Altoros Spark for PCF using the CF CLI, perform the following steps:

  1. Set 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 choose the Altoros Spark for PCF.

    $ cf marketplace
    Getting services from marketplace in org system / space administrators as user@example.com...
    OK

    service plans description spark-odb standalone Apache Spark Service

  4. Create an instance of the Altoros Spark for PCF.

    $ cf create-service spark-odb standalone YOUR-SERVICE-INSTANCE
    Creating service instance YOUR-SERVICE-INSTANCE in org system / space administrators as user@example.com...
    OK
    

  5. Before binding the app, first check that the service has been created. You can do this by using cf service INSTANCE_NAME.

    $ cf service YOUR-SERVICE-INSTANCE

    Service instance: YOUR-SERVICE-INSTANCE Service: spark-odb Bound apps: Tags: Plan: standalone Description: Apache Spark Documentation url: Dashboard:

    Last Operation Status: create succeeded Message: Instance provisioning completed Started: 2017-09-15T12:39:14Z Updated: 2017-09-15T12:45:19Z

  6. Bind the instance to an app.

    $ cf bind-service YOUR-APP YOUR-SERVICE-INSTANCE
    Binding service YOUR-SERVICE-INSTANCE to app YOUR-APP in org system / space administrators as user@example.com...
    OK
    TIP: Use 'cf restage YOUR-APP' to ensure your env variable changes take effect
    

  7. Restage the app for the binding to take effect.

    $ cf restage YOUR-APP
    

Create and Bind a Service Instance Using Apps Manager

To create and bind an instance of the Altoros Spark for PCF using Apps Manager, perform the following steps:

  1. Navigate to apps.YOUR-SYSTEM-DOMAIN in a browser and log in.
  2. Click Marketplace in the left navigation.
  3. Click Apache Spark.
  4. Select the standalone service plan.
  5. Enter an Instance Name and select a space under Add to Space. To bind the service instance to an app, select an app under Bind to App.
  6. Click Add. You can also bind an app to a service instance by navigating to the app page, clicking Services, then clicking Bind a Service.
  7. Select a service instance to bind to the app and click Bind.
Create a pull request or raise an issue on the source for this page in GitHub