iot-sitewise-datasource

module
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2021 License: Apache-2.0

README

AWS IoT Sitewise Datasource Development Guide

Please add feedback to the issues folder, and we will follow up shortly. Be sure to include version information for both grafana and the installed plugin.

The production plugins can be downloaded from the IoT sitewise plugin page.

For configuration options, see: src/README.md

Development builds

To get the latest build artifacts for a branch:

  1. find the green checkbox after a build
  2. click link to the "package" details link
  3. open the "Artifacts" tab
  4. Pick the appropriate download for your platform

Developer Guide

Build
Getting started
  1. Install dependencies
yarn install
  1. Build plugin in development mode or run in watch mode
yarn dev

or

yarn watch
  1. Build plugin in production mode
yarn build
  1. Build backend for all platforms
mage buildAll
  1. Run tests
mage test
Install

Instructions to install grafana server locally can be found, here:

To install the plugin locally, copy the built plugin to the Grafana plugin directory (usually: /var/lib/grafana/plugins)

Docker development setup
  1. Create AWS credentials file:
cat << EOF >> ~/.aws/credentials
[DEFAULT]

[default]
aws_access_key_id=<your aws access key id>
aws_secret_access_key=<your aws secret access key>
EOF
  1. Start Grafana docker
# Run from directory containing iot-sitewise-datasource clone
cd /Workspace/iot-sitewise-datasource
docker run -e GF_DEFAULT_APP_MODE=development -e AWS_SHARED_CREDENTIALS_FILE="/Users/grafana/.aws/credentials" -d -p 3000:3000 -v ~/.aws/:/Users/grafana/.aws/ -v "$(pwd)"/dist:/var/lib/grafana/plugins --name=grafana grafana/grafana:latest
  1. Reload plugin
docker restart grafana

Access from http://localhost:3000. First time login will be user:admin password:admin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL