Skip to content

Lambdas for topology related data management from GitHub and AWS

Notifications You must be signed in to change notification settings

ContributaryCommunity/lambda-topology

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lambda-topology

GitHub release CircleCI branch GitHub issues GitHub issues GitHub license

Overview

Lambda for topology ingestion of the topology in GitHub to the Contributary website. The Lambda is run on a cron to update topology once a day.

Workflow

Changes submitted to src/*.js are uploaded manually to the AWS Lambda function console. Currently there are two Lambdas used

  • ingest - Copies data/topology.json from GitHub once a day and copies it into an S3 bucket
  • read - Responds to api/topology requests in API Gateway with the contents of the topology file in S3

Development

For contributing to this project and testing the output locally, you will need

  1. NodeJS 8.x
  2. Yarn 1.x
  3. Create tmp/ directory in the root of the project
  4. Set envrionment variable for devleopment: export NODE_ENV=development
  • yarn lint - Validatse all JS and JSON passes linting
  • yarn ingest - Run src/ingeest.js and by default output the file in tmp/
  • yarn read - Run src/read.js and by default output the file in tmp/

With the appropriate AWS credentials exported locally, testing against the live endpoints can be done by running export NODE_ENV=production before the relevant task.

Release Procedure

  1. Merge all changes into master
  2. Bump package.json, git tag and push everything to master
  3. Upload the contents of src/index.js to Lambda
  4. Create Release Notes in GitHub

About

Lambdas for topology related data management from GitHub and AWS

Resources

Stars

Watchers

Forks

Packages

No packages published