Creating an Enterprise Connect Service Instance
Create a service instance for the Enterprise Connect service in the Predix environment.
Before you Begin ...
Before creating a service instance for Enterprise Connect you must have the base URLs for UAA instances that the Enterprise Connect service instance will trust. See Enterprise Connect Service Setup.
Procedure
- Sign into your Predix account at https://www.predix.io.
- Navigate to Catalog > Services tab, and click the Enterprise Connect service tile.
- Click Subscribe on the required plan.
- On the new Service Instance page, enter the following information:
Field Description Org Select your org. Space Select the space for your application. User Account & Authentication (UAA) Choose an existing UAA instance or create a new instance of UAA. For more information, see t_creating_predix_uaa_instance.html#task_y1l_vms_2s Service instance name Specify a unique name for your instance. Service Plan Select a plan.
Using Cloud Foundry Commands to Create your Enterprise Connect Service Instance
Procedure
- List the services in the Cloud Foundry marketplace.
cf marketplace
The Enterprise Connect service,
enterprise-connect-service
, is listed as an available service. - Create an Enterprise Connect service instance.
cf create-service enterprise_connect <plan> <my_service-enterprise_connect_instance> -c '{"trustedIssuerIds":["https://<predix-uaa-instance-uri>/oauth/token"]}'
where:
<plan>
is the plan associated with a service. - Bind your Enterprise Connect gateway service instance to your application to provision connection details for your service instance in the VCAP environment variables. Cloud Foundry runtime uses VCAP_SERVICES environment variables to communicate with a deployed application about its environment.Use the Cloud Foundry CLI to log into Cloud Foundry:
cf login
Note: If you are a GE employee, you must use thecf login --sso
command to log into Cloud Foundry. After you enter your SSO, you will receive a one-time passcode URL. Copy this URL and paste it in a browser to retrieve your one-time passcode. Use this code with thecf
command to complete the CF login process. - Bind your application to the service instance you created.
cf bind-service <application_name> <my_enterprise_connect_instance>
- Restage your application to ensure that environment variable changes take effect:
cf restage <application_name>
- View the environment variables for your application:
cf env <application_name>
The environment variables which contain your basic authorization credentials are shown:client ID and the endpoint URI:"VCAP_SERVICES": { "enterprise-connect": [ { "credentials": { "admin-token": " YWRtaW46ZUVEMTkxdFBPOTgzMjZjMYMtNXIwOS00OGIzLTg2YzMtNDL1YTk5M2U0BzJj" "ec-info": { "ids": { "<random_string>”, "<random_string>" ], "trustedIssuerIds": [ "https://UAA-Instance-URL.predix-uaa.run.aws-usw02-pr.ice.predix.io/oauth/token" ] }, "service-uri": "https://<Predix-Zone-Id>.run.asv-pr.ice.predix.io" "usage-doc": "https://github.com/Enterprise-connect/ec-sdk/wiki", "zone": { "http-header-name": "Predix-Zone-Id", "http-header-value": "<Predix-Zone-Id>", "oauth-scope": "enterprise-connect.zones.<Predix-Zone-Id>.user" } }, "label": "enterprise-connect", "name": "hello-world-app-1", "plan": "<plan>", "provider": null, "syslog_drain_url": null, "tags": [], "volume_mounts": [] } ] }
- Add the
oath-scope
to your client or user in the UAA Authority. - Add the Enterprise Connect scope to the UAA instance.