Giter Club home page Giter Club logo

roster's Introduction

Demo: roster

Setting up roster :

1. Granting Permissions to access AWS using IAM Roles

Create an IAM role and attach the below policies to the IAM Role. Attach this IAM role to the EC2 instances that is running roster-api

AWS IAM Role and Policy

JSON

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "cloudwatch:DescribeAlarms",
                "cloudwatch:GetMetricWidgetImage",
                "elasticloadbalancing:DescribeLoadBalancers",
                "ce:GetCostAndUsage",
                "ce:GetCostForecast",
                "ec2:DescribeInstances",
                "ec2:DescribeVpcs",
                "ec2:DescribeRegions",
                "ec2:DescribeSubnets",
                "ec2:DescribeInstanceStatus",
                "elasticmapreduce:ListClusters",
                "elasticmapreduce:DescribeCluster",
                "kafka:ListClusters",
                "rds:DescribeDBInstances",
                "sts:GetCallerIdentity"
            ],
           
            "Resource": "*"
        }
    ]
}

Alternatively, you can use AWS Secret Key and ID as well and declare them when running roster-api docker container

2. Running roster-api Docker Container

cd roster-api && docker build -t roster-api:latest .

If you are using IAM role

docker run --name roster-api -p 8082:5000 --env CREDS="password" --env AWS_DEFAULT_REGION="default region name" -d roster-api:latest

If you are using AWS aws_access_key_id and aws_secret_access_keys

docker run --name roster-api -p 8082:5000 --env CREDS="password" --env AWS_DEFAULT_REGION="default region name" --env AWS_ACCESS_KEY_ID="Enter your KEY_ID" --env AWS_SECRET_ACCESS_KEY="Enter your ACCESS_KEY" -d roster-api:latest

PS: Env variable CREDS will required to access COST SUMMARY page, If you enter wrong credentials while accessing the COST SUMMARY page, try opening it in a new tab

3. Running roster-ui Docker Container

Before building roster-ui, edit a variable "awsbaseURL" in config.js. Enter your hostname or server-ip where roster-api is running.

cd roster/roster-ui/src 

config.js:

export const appConfig = {
    awsbaseURL: "http://enter-your-ip-or-hostname-here/api/aws/",
};
cd roster-ui && docker build -t roster-ui:latest .
docker run --name roster -p 80:80 -d roster-ui:latest

To setup without using docker container

cd roster/roster-ui
npm start
http://localhost:3000
cd roster/roster-api
python3 app.py
http://localhost:5000/api/
http://localhost:5000/api/ping/

To populate Environment columns in the table

Please make sure to create tags with key name "env" with value of the environment

roster's People

Contributors

chetanku 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.