Giter Club home page Giter Club logo

amo-connector-legacy's Introduction

AMO Connector

  • Receive file creation event from AWS SQS
    • AMO connector supposes events are created by AWS Lambda triggered by S3.
    • Message from SQS must contains bucket and key in responsePayload.
  • Download file contents from AWS S3
  • Upload parcel to AMO storage
    • AMO connector encrypts data from above step with custody.
  • Register parcel to AMO blockchain

Configuration

AMO connector uses yaml for configuration. Permissions of config file must be 600 for security.

amo-connector.yml

amo:
    blockchain_endpoint: <AMO_BLOCKCHAIN_RPC_ENDPOINT>
    stroage_endpoint: <AMO_STORAGE_ENDPOINT>
    private_key: <HEX_ENCODED_32_BYTES>
aws:
    credential:
      aws_access_key_id: <ACCESS_KEY>
      aws_secret_access_key: <SERECT_KEY>
      region_name: <REGION>
    sqs:
      url: <QUEUE_URL>
db:
    host: mysql+pymysql://<USER>:<PASSWORD>@localhost:3306/amo-storage

AMO connector needs these permissions:

  • S3, Full access
  • SQS, Full: Read

Run

Standalone

$ python3 amo_connector.py --config_dir <Directory of config file>

Run with AMO storage

$ sudo sh ./run.sh

If you execute this command, it will download AMO storage and run docker-compose

Your config directory should be like

├── config
│   ├── amo-connector.yml
│   ├── config.ini
│   └── key.json

config.ini and key.json are config files of AMO storage. Check out this page.

Also, you need to export below environment values. Or you can create .env file in same path of AMO connector's docker-compose.yml.

PORT=5000
CONFIG_DIR=config

MYSQL_ROOT_PASSWORD=<ROOT_PASSWORD>
MYSQL_USER=<USER>
MYSQL_PASSWORD=<PASSOWRD>

amo-connector-legacy's People

Contributors

sedyn avatar

Watchers

James Cloos avatar

amo-connector-legacy's Issues

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.