Ei kuvausta

Chris Mague 3a88441c02 switch to fog-aws gem 7 vuotta sitten
lib 3a88441c02 switch to fog-aws gem 7 vuotta sitten
models 44a96f6c56 cleanup with rubocop 7 vuotta sitten
spec f904c7b0ef setup som ebasic tests 7 vuotta sitten
tasks 787d123f97 rake tasks into distinct rake namespaces and files 7 vuotta sitten
web 3b914d3014 vpcs are unhappy 7 vuotta sitten
.gitignore 7f23df781e change to a config file 7 vuotta sitten
.rubocop.yml 44a96f6c56 cleanup with rubocop 7 vuotta sitten
.ruby-gemset 5f8e706a20 match name 7 vuotta sitten
.ruby-version 84e953accb initial add 7 vuotta sitten
Gemfile 3a88441c02 switch to fog-aws gem 7 vuotta sitten
Rakefile 787d123f97 rake tasks into distinct rake namespaces and files 7 vuotta sitten
Readme.md 2f37bf4e1e add in node tagging audit 7 vuotta sitten
config.ru 398a91cb41 get accounts loaded 7 vuotta sitten
config.yaml.example 7de898a7fe show multiple accounts 7 vuotta sitten

Readme.md

neo-infra

Auditing

To audit resources to ensure that they are properly tagged run

rake audit_all

See the tag_policy section of the config.yaml.example file for ideas

Running

1) Download and run neo4j container

docker run --rm \
    --publish=7474:7474 --publish=7687:7687 \
    --volume=$HOME/tmp/neo4j/data:/data \
    --volume=$HOME/tmp/neo4j/logs:/logs \
    -e NEO4J_AUTH='none' \
    neo4j:3.1.4

2) Copy the config.yaml.example file to config.yaml and add in account information

cp config.yaml.example config.yaml

3) Run bunder

bundle install

4) Run the data loader

rake load_all

5) Point your web browswer at http://localhost:7474

Example Queries

All S3 buckets by size

MATCH (n:Bucket)-[o:owner]-(a:AwsAccount) RETURN n.name, n.size, a.name ORDER by n.size DESC

List out all subnets by instance count

MATCH (i: Node)-[r:subnet]-(s:Subnet)-[q:subnet]-(v:Vpc)-[o:owned]-(a:AwsAccount) WITH s, v, a, count(i) as nc RETURN s.cidr, v.name, a.name, nc ORDER by nc DESC