Skip to content

jeffcaten/microGoat

 
 

Repository files navigation

Dunder Mifflen Infrastructure Deployment

Image Alt Text

This repository contains an AWS CloudFormation template for deploying Dunder Mifflen's infrastructure. The template provisions resources such as serverless functions, a VPC network, and an ECS cluster for your application. Follow the instructions below to deploy this template.

This Cloud Application is inherently misconfigured and vulnerable to attack and privilege escalation.

1. Set up for Application Deployment for Github Actions

  1. Fork this repository.
  2. Launch Stack using the Launch Stack button below. This will create 5 AWS ECR Image repositories, an OIDC provider for GH, and an IAM Role.
  3. Wait for the stack to complete before proceeding.
  4. Once complete, click the outputs tab and copy down the two output values.

Stack Parameters Needed:

  • GitHubOrg: Name of GitHub organization/user (case sensitive)
  • OIDCAudience: Audience supplied to configure-aws-credentials. Just leave the default.
  • OIDCProviderArn: Arn for the GitHub OIDC Provider. Just Ignore, leave it blank.
  • RepositoryName: Name of GitHub repository (case sensitive)
  • RepositoryNames: Comma-separated list of repository names. Just leave the deafult.

Launch Stack

cft-outputs


2. Configure github repo setting.

  1. With this repo forked, click the Settings tab > Secrets and variables > Actions.
  2. Create the following secrets.
  • AWS_GH_ROLE_ARN - Check the Cloudformation OutPuts for the IAM Role ARN for GH to assume.
  • V1_API_KEY - How to Generate Vision One API Key
  • C1_API_KEY - How to Generate Cloud One API Key
  • ECR - Check the Cloudformation OutPuts for the ECR Value. Example "1234567890.dkr.ecr.us-east-1.amazonaws.com"
  • IP_ADDRESS - Add your own IP. It needs to be in CIDR format. Example: [1.2.3.4/32].
  • LAUNCH_TYPE - ECS Launch Type. Either 'FARGATE' or 'EC2'.

gh-secrets


3. Trigger Action Workflow to deploy in AWS

  1. Click the Actions tab.
  2. On the left menu, click CI/CD Pipeline.
  3. On the Right, click Run Workflow > Run Workflow.

How To Run Locally

This is a guide on how to build and run the frontend and backend services of my web application using Docker Compose.

Prerequisites

Before you begin, ensure you have met the following requirements:


Run Application Locally

  1. Clone this repository to your local machine:

    git clone https://github.com/JustinDPerkins/AirGoatMan.git
    cd AirGoatMan
  2. Return to the project root directory:

    cd deployment
  3. Run the application using Docker Compose:

    docker-compose up --build

    This command will start both the frontend and backend services and connect them to a shared network.

  4. Access the web application in your web browser:

    • Frontend: http://localhost:8080
    • Backend: Your backend API is now accessible via its respective endpoints.

Stopping the Application

To stop the running containers and remove the associated resources, use the following command:

docker-compose down

AWS Architecture

architecture


Contributors ✨


Felipe Costa

💻

Yan Pinheiro

💻

Jacob Lake

💻

Justin Perkins

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Thanks also to these wonderful people (emoji key):

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 60.8%
  • Go 18.7%
  • HCL 6.9%
  • Shell 5.0%
  • JavaScript 3.3%
  • Python 2.8%
  • Dockerfile 2.5%