GithubHelp home page GithubHelp logo

isabella232 / vdb-lite-aws-launcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from makerdao/vdb-lite-aws-launcher

0.0 0.0 0.0 78 KB

License: GNU Affero General Public License v3.0

Shell 15.53% Python 84.47%

vdb-lite-aws-launcher's Introduction

vdb-aws-launcher

AWS CDK based project for launching a VDB lite environment. Resources created:

  • VPC
  • RDS instance
  • ECS cluster with services running vdb header sync, execute and postgraphile (accessible through an application load balancer)

Deployment diagram

Prerequisite

For deploying to AWS, this project uses cdk and python (see https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html).
Install AWS CDK running npm install -g aws-cdk.

Installation

Clone repo and switch into its directory then run ./install.sh

Configuration

Edit config/vdb-lite.json and specify desired values.

Parameter Description
AWS_REGION AWS region to be used for deploying vdb lite
DATABASE_USER PostgreSQL database user
DATABASE_PASSWORD PostgreSQL database password
DATABASE_NAME vdb lite database name
CLIENT_IPCPATH RPC URL to be used by vdb lite (tested with geth light node)
VDB_EXECUTE_IMAGE Docker image used for vdb lite transformer execute service
VDB_HEADER_SYNC_IMAGE Docker image used for vdb lite header sync service
VDB_POSTGRAPHILE_IMAGE Docker image used for vdb lite postgraphile service

Deploy

Use ./deploy.sh script to deploy vdb-lite in AWS and accept deployment steps.
To tear down environment run ./destroy.sh

Test deployment

Last deployment step will print out URL to load balancer, e.g.

โœ…  VdbPostgraphileEcsStack

Outputs:
VdbPostgraphileEcsStack.VdbPostgraphileAlbServiceLoadBalancerDNSE1507D40 = VdbPo-VdbPo-170291ZOJZ9Y7-1863118136.eu-west-2.elb.amazonaws.com
VdbPostgraphileEcsStack.VdbPostgraphileAlbServiceServiceURLFC37D1D2 = http://VdbPo-VdbPo-170291ZOJZ9Y7-1863118136.eu-west-2.elb.amazonaws.com

Use this query to validate deployment (replace URL with URL to load balancer)

curl -s \
-X POST \
-H 'Content-Type: application/json' \
-H 'Accept-Encoding:gzip' \
--data-binary '{"query":"query q { allEventLogs(last: 10) { nodes { headerByHeaderId { blockNumber } } } }"}' \
--compressed \
'http://VdbPo-VdbPo-170291ZOJZ9Y7-1863118136.eu-west-2.elb.amazonaws.com/graphql' |jq

vdb-lite-aws-launcher's People

Contributors

grandizzy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.