Giter Club home page Giter Club logo

medusa's Introduction

medusa

What

This script finds the internal IP addresses of multiple AWS datastores and uses credentials supplied by you to connect from your local machine. The point is to avoid having to manually connect to a jump host to reach your data. The script also provides hints for datastore names, usernames and database names, generated from the supplied credentials.

The supported datastores are:

  • Redshift
  • RDS postgresql
  • RDS mysql
  • ElastiCache redis (single node, replication group, clustered)
  • InfluxDB

Requirements

The script assumes it has access to the internal IPs of the clusters/datastores, which means you have to be in the same VPN.

The script assumes you have configured awscli for your account. Also needs dig, psql (postgresql client), mysql (mysql client), influx (influxdb client), redis-cli (redis client).

Installation

Create a virtualenv with the libs in requirements.txt.

Configuration

Create ~/.medusarc with entries like


settings:
  dns_servers:
    us_prod: 172.17.0.2

datastores:
  mysql-auxdb-example:
    aliases:
    - auxdb-example
    aws_identifier: prod-rds-auxdb-example
    aws_type: rds-mysql
    databases:
    - example
    users:
      admin: password

  postgres-portal-e:
    aliases:
    - portal-e
    aws_identifier: prod-rds-portal-e
    aws_type: rds-postgres
    databases:
    - example
    users:
      example: example


  redshift-example:
    aliases:
    - redshift-example
    - re
    aws_identifier: prod-redshift-example
    aws_type: redshift
    databases:
    - exampledb1
    - exampledb2
    users:
      user1: pass1
      user2: pass2


  redis-example:
    aliases:
      - redis-example
    aws_identifier: redis-example-0001-001
    aws_type: elasticache-redis
    cache_node_ids:
      - '0001'
    databases:
      - 0

  influx-example:
    aliases:
      - influx-example
    aws_identifier: influxdb.example.com
    aws_type: influxdb
    databases:
      - exampledb1
      - exampledb2
    users:
      user1: pass1
      user2: pass2




Usage

medusa <datastore name> <user name> <db name>

medusa redshift-example user1 exampledb1

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.