1.2.0-beta.0 • Published 4 years ago

zeus-lightning v1.2.0-beta.0

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
4 years ago

Zeus lightning

Read new lightning images from bucket, process them and save to lightning table.

Dependencies

Setup

git clone git@bitbucket.org:modclima/zeus-lightning.git
cd zeus-lightning
yarn install

Run

This script uses the same environment variables as libpq to connect to a PostgreSQL server and NODE_ENV=<STAGE> to run config file.

You can add custom environment variables in an .env file in the root of the project.

To list all command line options:

yarn start --help

To run

yarn start [OPTIONS] | bunyan

Deploy

The spark-lightning project need to be deployed at AWS container registry before you deploy this project. This is a dependency as the spark-lightning is the project that create the lightning points from the netCDF4 files.

To deploy create .env file and insert the environment variables below:

  • AWS Environment variables. The keys are stored on Google Drive.

  • Environment variables of database PostgreSQL server. The keys are stored on Google Drive.

  • NODE_ENV with the stage witch the deploy will be executed.

  • Stage that will run.

Example:

PGHOST=database....
PGDATABASE=cy..
PGUSER=mod...
PGPASSWORD=...
PGPORT=6432
NODE_ENV=dev
STAGE=...
AWS_REGION=..
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...

Now, execute the follow command using Scheduler Tasks environment variables of database:

yarn run deploy --stage STAGE

Development

Full tests and test coverage

yarn test

Unit tests and watch for changes

yarn run unit-test

License

© 2019 CYAN AGROANALYTICS ALL RIGHTS RESERVED