Dashboard Seed is an application that uses Px Web Components inside a Polymer web application. It runs on the Express web server.
Make a directory for your project. Clone or download and extract the seed in that directory.
git clone https://github.com/PredixDev/predix-seed.git
If you don't have them already, you'll need node, bower and gulp to be installed globally on your machine.
npm install bower -g
npm install gulp -g
Change directory into the new project you just cloned, then install dependencies.
npm install
bower install
The default gulp task will start a local web server. Just run this command:
gulp
Browse to http://localhost:5000. Initially, the app will use mock data for the views service, asset service, and time series service. Later you can connect your app to real instances of these services.
With a few commands you can build a distribution version of the app, and deploy it to the cloud.
Use gulp to create a distribution version of your app. You will need to run this command during development every time before you cf push to make the latest dist.
gulp compile:all
First make sure you're logged in to the Predix Cloud using the cf login
command.
Then deploy your app using this command:
cf push my-seed-app
You can give the app any unique name you like. "my-seed-app" is just an example.
cf create-service predix-uaa Tiered xlpuser04-uaa -c '{"adminClientSecret":"clientsecret"}'
xlpuser-04-uaa
to manifest.yml
cf push
cf env xlp-polymer
to extract uaac target <uaa-URI>
uaac token client get admin
uaac client add xlpuser04-uaa-client -i
:
echo -n xlpuser04-uaa-client:clientsecret | base64
- save in manifest.yml under base64ClientCredential
clientId
in manifest.ymluaac user add <my-user> --emails <my_user>@domain.com --password <my_password>
uaac group add uaa.user
uaac member add uaa.user user
cf env xlp-polymer
- grab issuer id from uaacf create-service predix-timeseries Tiered xlpuser04-timeseries -c '{"trustedIssuerIds":["https://xxx.run.aws-usw02-pr.ice.predix.io/oauth/token"]}'
cf push
cf env xlp-polymer
- grab zone iduaac client update xlpuser04-uaa-client -i
add
timeseries.zones.<zone-id>.user timeseries.zones.<zone-id>.query timeseries.zones.<zone-id>.ingest
timeseries.zones.<zone-id>.user timeseries.zones.<zone-id>.query timeseries.zones.<zone-id>.ingest
/predix-api/predix-timeseries/v1/tags..
cookie_name
from your browser and curl --cookie "cookie_name=xxxx" http://localhost:5000/predix-api/predix-timeseries/v1/tags
On the Pis, update the following:
~/PredixMachine/configuration/machine/com.ge.dspmicro.predixcloud.identity.config
with UAA detailscom.ge.dspmicro.websocketriver.send-0.config
with Zone ID for TScom.ge.dspmicro.hoover.spillway-0.config
updated com.ge.dspmicro.hoover.spillway.destination="WS Sender Service"
Copyright © 2015 GE Global Research. All rights reserved.
The copyright to the computer software herein is the property of GE Global Research. The software may be used and/or copied only with the written permission of GE Global Research or in accordance with the terms and conditions stipulated in the agreement/contract under which the software has been supplied.