PROJECT NOT UNDER ACTIVE MANAGEMENT
This project will no longer be maintained by Intel.
Intel has ceased development and contributions including, but not limited to, maintenance, bug fixes, new releases, or updates, to this project.
Intel no longer accepts patches to this project.
If you have an ongoing need to use this project, are interested in independently developing it, or would like to maintain patches for the open source software community, please create your own fork of this project.
Contact: [email protected]
UI and API repo. This repo will contain content external accessible.
-
Node.js v0.10.x
-
grunt-cli
- npm install grunt-cli
-
NGINX up and running.
- Install latest version from http://wiki.nginx.org/Install
-
Install Build Essential
- sudo apt-get install build-essential
-
Postgresql server, version >= 9.4, installed and running on default port 5432
- Install latest version from http://www.postgresql.org/download/
-
Git
-
Cloud Foundry CLI and Trusted Analytics Platform account (https://github.com/trustedanalytics)
Execute the following:
cd ./dashboard/public-interface/nginx
./install.sh
This script overwrites /nginx/default.conf by /etc/nginx/conf.d/default.conf to activate configuration. Then it creates sym link from /dashboard/public-interface/dashboard/public to /opt/dashboard/iotkit-dashboard/dashboard/public to make NGINX serves static resources as CDN. Finally it will restart nginx and make some curls for testing that everything is ok.
When using NGINX to access UI or API instead of using por 4001 you should port 80.
- If nginx is not working properly (not taking our configuration) empty the folder:
- /etc/nginx/sites-enabled/
We are using grunt in order to perform build activities, such static code analysis validation, running unit tests, packaging, etc.
For running unit tests you can:
cd ./dashboard/public-interface
NODE_ENV=local grunt
All UI labels are defined in file - public-interface/dashboard/public/locale/resourceBundle.json. You can edit resourceBoundle.json in order to modify some UI labels.
-
Generate a pair RSA keys and put your private and public keys in public-interface/keys/ as private.pem and public.pem
-
Register your domain in Google ReCaptcha at http://www.google.com/recaptcha and set generated values in cloud foundry user-provided service:
cf cups recaptcha-ups -p "{\"siteKey\":\"${SITE_KEY}\",\"secretKey\":\"${SECRET_KEY}\"}"
On Trusted Analytics Platform (https://github.com/trustedanalytics)
Before installation, make sure that you are logged into Trusted Analytics Platform with command:
cf login
-
Create instances with specified name for each of required services from marketplace:
- PostgreSQL 9.3 or newer with name mypostgres
- Redis 2.8 or newer with name myredis
- Smtp service with name mysmtp
-
Create following user-provided services with properties filled with real values:
cf cups dashboard-endpoint-ups -p "{\"host\":\"${ADDRESS}\"}" cf cups backend-ups -p "{\"host\":\"${ADDRESS}\"}" cf cups websocket-ups -p "{\"username\":\"${USER}\",\"password\":\"${PASSWORD}\"}" cf cups rule-engine-credentials-ups -p "{\"username\":\"${USER}\",\"password\":\"${PASSWORD}\"}" cf cups mail-ups -p "{\"sender\":\"${SENDER}\"}" cf cups recaptcha-ups -p "{\"siteKey\":\"${SITE_KEY}\",\"secretKey\":\"${SECRET_KEY}\"}" cf cups dashboard-security-ups -p "{\"private_pem_path\":${PRIVATE_PEM_PATH},\"public_pem_path\":${PUBLIC_PEM_PATH},\"captcha_test_code\":${CAPTCHA_TEST_CODE},\"interaction_token_permision_key\":${INTERACTION_TOKEN_PERMISSION_KEY}}" cf cups gateway-credentials-ups -p "{\"username\":\"${USER}\",\"password\":\"${PASSWORD}\"}"
-
Executing ./cf-deploy.sh in main repository catalog builds package and pushes it to CF as an app with name {SPACE}-dashboard where space is currently selected space by cf t -s "SPACE"
-
Check logs and wait for application start.