Get Started with Predix Search
Predix Search Service Setup
Before you can use Predix Search, you must create an instance of the service, bind the instance to your application, and enable authentication and authorization of the service instance.
Authentication and authorization are controlled by the User Account and Authentication (UAA) web service. You must set up a UAA service instance as a designated trusted issuer before creating your Predix Search service instance. For information about authentication and authorization in Predix services, see the UAA Service Overview.
Task Roadmap
Task | References | |
---|---|---|
1 | Configure your proxy settings. | Depending on your location and network configuration, you may need to configure your proxy settings to access remote resources. See t_defining_proxy_connections_to_remote_resources.html#task_97cc6304-e168-459d-9952-a45708ff8361. |
2 | Deploy your application to Cloud Foundry. | See Creating and Deploying a Simple Web App to Cloud Foundry. |
3 | Create a UAA service instance. | See Creating a UAA Service Instance. |
4 | Create a Predix Search service instance. | |
5 | Bind your application to the Predix Search service instance. | See Bind an Application to a Predix Search Service Instance. See also Unbind a Predix Search Service Instance. |
6 | Create an OAuth2 client for the Predix Search service instance. | The OAuth2 client enables the Predix Search service to make protected resource requests on behalf of the resource owner with the authorization of the resource owner. |
7 | Use the Predix Search service instance. | See Index and Query the Predix Search Cluster. |
Create a Predix Search Service Instance
A Predix Search service instance gives your application indexing and search capabilities.
Before You Begin
You must have a Predix account. See Registering for a Predix Account.
Procedure
What To Do Next
Bind the Predix Search service instance to your application, after which you can retrieve service instance details from the VCAP_SERVICES
environment variable for your application. See Bind an Application to a Predix Search Service Instance.
Use the cf CLI to Create a Predix Search Service Instance
The Cloud Foundry command line interface (cf CLI) enables you to create a Predix Search service instance and examine its settings.
Before You Begin
The binding enables you to obtain the UAA service instance details, including issuerId
, from the VCAP_SERVICES
environment variable for your application.
About This Task
create-service
, or cs
, command, run the command cf help cs
.Procedure
What To Do Next
Bind the Predix Search service instance to your application, after which you can retrieve service instance details from the VCAP_SERVICES
environment variable for your application. See Bind an Application to a Predix Search Service Instance below.
Bind an Application to a Predix Search Service Instance
Binding your application to a Predix Search service instance adds the service connection details to the VCAP_SERVICES
environment variable.
About This Task
VCAP_SERVICES
environment variable to communicate with a deployed application about its environment. You can retrieve the following Predix Search service instance details from the VCAP_SERVICES
environment variable: - Authorization credentials
- HTTP header information for the service instance
- URI of the service instance
Before You Begin
Your application must be available in Cloud Foundry. To learn about deploying your application to Cloud Foundry, see t_Deploying_an_App_to_Cloud_Foundry.html#task_xwn_lvb_vx.
Procedure
Unbind a Predix Search Service Instance
Unbind a Predix Search service instance to dissociate it from your application.
Procedure
cf unbind-service <app-name> <instance-name>
Update a Predix Search Service Instance
Update a Predix Search service instance to modify the specifications for the dedicated master cluster, availability zones, and number of data nodes.
Procedure
Delete a Predix Search Service Instance
Delete a Predix Search service instance when it is no longer needed.
Procedure
cf delete-service <instance-name>
Authorities and Scopes Required for Predix Search
The OAuth2 client for your Predix Search service instance requires special parameters, including authorities and scopes, to enable the client to access the Predix Search cluster.
- Authorized Grant Types —
refresh_token, client_credentials, password
- Scopes —
uaa.none
- Authorities —
uaa.none, predix-search.zones.<zone_id>.user
<zone_id>
— Provide the value ofpredix-search[0].credentials.zone_id
from theVCAP_SERVICES
environment variable for your application. See Bind an Application to a Predix Search Service Instance.
- Allowed Providers —
uaa