Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sebastianroming/predix-timeseries-example
https://github.com/sebastianroming/predix-timeseries-example
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sebastianroming/predix-timeseries-example
- Owner: sebastianroming
- Created: 2016-10-14T13:04:43.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2016-04-15T13:12:44.000Z (over 8 years ago)
- Last Synced: 2024-12-10T15:37:32.773Z (about 1 month ago)
- Language: Java
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
Before running this example predix services should be set up.
Example of services setup below is described for windows based dev environment with cf and uaa cli installed. The only windows specific command is `findstr`, which is analog to unix command `grep`.
#####Services setup example:
1. Log into cloud foundry
* `cf login`
1. Create UAA instance if you have not yet:
* `cf cs predix-uaa Tiered demo-uaa -c "{\"adminClientSecret\":\"demo@pass\"}"`
1. Grab UAA instance guid
* `cf curl /v2/service_instances?q=name:demo-uaa | findstr /R \"guid\"`
1. Create Timeseries service
* `cf cs predix-timeseries Bronze demo-ts -c "{\"trustedIssuerIds\":[\"https://74dbb0f8-fcbd-4434-9c59-eb2022bbd02c.predix-uaa.run.aws-usw02-pr.ice.predix.io/oauth/token\"]}"`
1. Grab timeseries instance guid
* `cf curl /v2/service_instances?q=name:demo-ts | findstr /R \"guid\"`
1. Connect uaac to new UAA instance
* `uaac target https://74dbb0f8-fcbd-4434-9c59-eb2022bbd02c.predix-uaa.run.aws-usw02-pr.ice.predix.io`
1. Log into uaa
* `uaac token client get admin -s demo@pass`
1. Create client
* `uaac client add demo-ts-client-id --secret client@pass --authorized_grant_types "authorization_code,client_credentials,refresh_token,password" --authorities "openid,uaa.none,uaa.resource" --scope "uaa.none,openid" --autoapprove openid`
1. Create user
* `uaac user add demo-ts-user-id --emails demo-ts-user@mail --password user@pass`
1. Add client authorities for accessing timeseries instance
* `uaac client update demo-ts-client-id --authorities "openid,uaa.none,uaa.resource,timeseries.zones.a50c2e0a-ec09-4d7e-8551-64a31deddc48.user,timeseries.zones.a50c2e0a-ec09-4d7e-8551-64a31deddc48.ingest,timeseries.zones.a50c2e0a-ec09-4d7e-8551-64a31deddc48.query"`Example can be run by
```
mvn spring-boot:run
```