-
Notifications
You must be signed in to change notification settings - Fork 5
/
using.html.md.erb
80 lines (64 loc) · 4.23 KB
/
using.html.md.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
title: Using Aerospike EE Managed Service for PCF
owner: Partners
---
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](http://www.aerospike.com/docs/operations) an example Spring Boot application.
##<a id="apps-man"></a> 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.
1. Click **Marketplace** in the left navigation.
1. Click **Aerospike Enterprise Edition** from the displayed tiles and click to view the available plans.
1. Click on the appropriate **Select this plan** button to select the required **Aerospike Service Plan**.
1. In the **Instance Name** field, enter a name for this specific Aerospike service instance.
1. 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**.
1. 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.
1. Click **Add**.
1. 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.
1. Restage the application.
##<a id='cf-cli'></a>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.
<pre class="terminal">
$ cf api api.YOUR-SYSTEM-DOMAIN
Setting api endpoint to api.YOUR-SYSTEM-DOMAIN...
OK
API endpoint: <span>https</span>://api.YOUR-SYSTEM-DOMAIN (API version: 2.59.0)
Not logged in. Use 'cf login' to log in.
</pre>
1. Log in to your deployment and select an org and a space.
<pre class="terminal">
$ cf login
API endpoint: <span>https</span>://api.YOUR-SYSTEM-DOMAIN
Email> user<span>@</span>example.com
Password>
</pre>
1. List the Marketplace services and locate the Aerospike service. The service plans match the namespaces that have been configured on the Aerospike database.
<pre class="terminal">
$ 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.
</pre>
1. Create an instance of the Aerospike service, specifying both the name of the service plan and the name of the service instance.
<pre class="terminal">
$ cf create-service aerospike YOUR-SERVICE-PLAN YOUR-SERVICE-INSTANCE
</pre>
1. 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.
<pre class="terminal">
$ 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
</pre>
1. Restage the application for the binding to take effect.
<pre class="terminal">
$ cf restage YOUR-APP
</pre>