From bd540d2d1a52d3c7617a8abf5cf20ce86eaa0112 Mon Sep 17 00:00:00 2001 From: arnol377 Date: Thu, 17 Apr 2025 16:28:22 -0400 Subject: [PATCH 1/3] updating readme --- README.md | 55 ------------------------------------------------------- 1 file changed, 55 deletions(-) diff --git a/README.md b/README.md index 454f6c3a..e69de29b 100644 --- a/README.md +++ b/README.md @@ -1,55 +0,0 @@ -## How to setup and run terragrunt scripts for EKS related modules in a LAB account - -### Lab Account request and setup: - - Open a REMEDY ticket for creating an account in LAB environment, preferably with t3-admin role. - - LAB account url:https://pssvlab.tco.census.gov/PSS/ - - Make a note that the LAB account password is different from laptop password - - Once you have successful log proceed to next steps below - -### Access LAB jumphost (bromine): - Refer this page for additional help on sso credentials: https://github.e.it.census.gov/terraform/support/tree/master/docs/how-to/aws-sso - - 1. Goto LAB workspace:https://clients.amazonworkspaces.com/ - 2. Hit the web access login on the top right corner - 3. Enter the following registration code: FRosu+FMEXNZ and click Register - 4. Use your jbid and password (use lab password) - 5. Open reflection client and ssh connect to bromine.cto.census.gov - 6. On bromine, sso login to lab-gov as: - $ aws-sso-login.sh lab-gov - 7. On a browser goto auth-dev.census.gov - 8. Use PIV card option to login - 9. Copy the link from step 6 and paste it on the portal and authenticate - 10. Go back to bromine and doubleclick at an empty space, you should get successful login lab env - -### Environment Setup: - - Set your profile as a default profile by exporting AWS_PROFILE variable - $ export AWS_PROFILE="224384469011-lab-dev-gov.inf-admin-t3" - $ aws sts get-caller-identity - - Run any aws commands to make sure you are getting responses from the account your profile is set to: - $ aws s3 ls - -### Terraform/Terragrunt binaries and versions: - The following binaries used: - - Terraform version: v1.7.5 - - Terragrunt version: v0.55.21 - These versions can be found on bromine.cto.census.gov host at: - /app/terraform/bin/terr* folder - -### Run the Terragrunt script: - - Cd to specifc folder (example: cd eks) and Run terragrunt plan - $ terragrunt plan - - Verify the plan output and make sure there are no errors - - Run terragrunt apply - $ terragrunt apply - - Verify apply completes successfully and verify the resources on AWS Console. - -### Accessing the cluster: - $ aws eks --region us-gov-east-1 update-kubeconfig --name platform-eng-eks-test - $ kubectl config use-context arn:aws-us-gov:eks:us-gov-east-1:224384469011:cluster/platform-eng-eks-test - $ kubectl config get-contexts - -### Run few kubectl commands to verify you are accessing the cluster - $ kubectl cluster-info - $ kubectl get pods -A - $ kubectl get ns - From 5d2d7cb53c034b4302fa65098c6498c69c64e83a Mon Sep 17 00:00:00 2001 From: arnol377 Date: Thu, 17 Apr 2025 16:33:34 -0400 Subject: [PATCH 2/3] Add initial README.md with project overview, structure, and usage instructions --- README.md | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/README.md b/README.md index e69de29b..43f9bca9 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,115 @@ +# Platform Infrastructure with Terragrunt + +This repository contains Terragrunt configurations for deploying and managing cloud infrastructure for platform engineering needs. It uses a modular approach with Terragrunt to manage infrastructure as code across multiple environments. + +## Repository Structure + +- `/configs` - Configuration files for infrastructure components such as node groups and resource quotas +- `/docs` - Comprehensive documentation including architecture, standards, and security guidelines +- `/lab` - Lab environment configurations for development and testing +- `/monitoring` - Monitoring and observability stack components +- `/tests` - Testing frameworks and test cases for infrastructure validation + +## Documentation + +The repository contains extensive documentation in the `/docs` directory: + +- [Architecture](docs/ARCHITECTURE.md) - System architecture and component relationships +- [Documentation Standards](docs/DOCUMENTATION_STANDARDS.md) - Guidelines for documentation +- [Infrastructure Standards](docs/INFRASTRUCTURE_STANDARDS.md) - Standards for infrastructure implementation +- [Module Dependencies](docs/MODULE_DEPENDENCIES.md) - Dependencies between modules +- [Module Standards](docs/MODULE_STANDARDS.md) - Standards for module development +- [Observability Standards](docs/OBSERVABILITY_STANDARDS.md) - Guidelines for monitoring and observability +- [Security Audit Checklist](docs/SECURITY_AUDIT_CHECKLIST.md) - Security compliance checklist +- [Security Baseline](docs/SECURITY_BASELINE.md) - Security baseline requirements +- [Testing Standards](docs/TESTING_STANDARDS.md) - Standards for testing infrastructure code +- [Version Control](docs/VERSION_CONTROL.md) - Version control practices + +## Prerequisites + +- Terraform v1.0.0+ +- Terragrunt v0.36.0+ +- AWS CLI configured with appropriate access +- Appropriate AWS permissions for the resources being deployed + +## Quick Start + +### Using the Makefile + +This repository includes a Makefile with several helpful targets: + +```bash +make help # Show available commands +make init # Initialize Terragrunt configurations +make validate # Validate Terragrunt configurations +make plan # Run plan in dry-run mode +make fmt # Format HCL files +make check # Run all checks (format, validate, plan) +make clean # Clean Terragrunt cache +``` + +### Manual Terragrunt Commands + +Navigate to the directory containing the Terragrunt configuration you want to work with: + +```bash +cd lab/environment/component + +# Initialize Terragrunt +terragrunt init + +# Plan changes +terragrunt plan + +# Apply changes +terragrunt apply + +# Destroy resources +terragrunt destroy +``` + +### Running All Configurations + +You can run commands across all Terragrunt configurations: + +```bash +# Initialize all configurations +terragrunt run-all init + +# Plan all configurations +terragrunt run-all plan + +# Apply all configurations +terragrunt run-all apply +``` + +## Configuration + +Terragrunt configurations are organized hierarchically: + +1. Root-level configuration in each environment directory +2. Component-specific configurations inheriting from the root +3. Environment-specific overrides where needed + +See specific environment directories for more details on the configuration structure. + +## Testing + +The `/tests` directory contains test frameworks and test cases for validating infrastructure code. To run tests: + +```bash +cd tests +./run_tests.sh +``` + +## Contributing + +1. Fork the repository +2. Create a feature branch +3. Make your changes +4. Run `make check` to validate your changes +5. Submit a pull request + +## License + +Copyright © 2025 Your Organization. All rights reserved. From 0720912503637975ccf7af549b56064857aafe29 Mon Sep 17 00:00:00 2001 From: arnol377 Date: Thu, 17 Apr 2025 16:35:35 -0400 Subject: [PATCH 3/3] Revise README.md for clarity and organization, enhancing descriptions of repository contents and usage instructions. --- README.md | 102 +++++++++++++++++++++++++++--------------------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 43f9bca9..248d122a 100644 --- a/README.md +++ b/README.md @@ -1,113 +1,113 @@ # Platform Infrastructure with Terragrunt -This repository contains Terragrunt configurations for deploying and managing cloud infrastructure for platform engineering needs. It uses a modular approach with Terragrunt to manage infrastructure as code across multiple environments. +This repository helps manage cloud infrastructure using Terragrunt. It is designed to make managing infrastructure easier and more organized. Terragrunt is used to handle infrastructure as code for different environments. -## Repository Structure +## What's in This Repository -- `/configs` - Configuration files for infrastructure components such as node groups and resource quotas -- `/docs` - Comprehensive documentation including architecture, standards, and security guidelines -- `/lab` - Lab environment configurations for development and testing -- `/monitoring` - Monitoring and observability stack components -- `/tests` - Testing frameworks and test cases for infrastructure validation +- `/configs` - Files for setting up things like node groups and resource limits +- `/docs` - Guides and rules for how to set up and manage the infrastructure +- `/lab` - Settings for testing and development environments +- `/monitoring` - Tools for keeping an eye on the system +- `/tests` - Tests to make sure everything works as expected ## Documentation -The repository contains extensive documentation in the `/docs` directory: +You can find detailed guides in the `/docs` folder: -- [Architecture](docs/ARCHITECTURE.md) - System architecture and component relationships -- [Documentation Standards](docs/DOCUMENTATION_STANDARDS.md) - Guidelines for documentation -- [Infrastructure Standards](docs/INFRASTRUCTURE_STANDARDS.md) - Standards for infrastructure implementation -- [Module Dependencies](docs/MODULE_DEPENDENCIES.md) - Dependencies between modules -- [Module Standards](docs/MODULE_STANDARDS.md) - Standards for module development -- [Observability Standards](docs/OBSERVABILITY_STANDARDS.md) - Guidelines for monitoring and observability -- [Security Audit Checklist](docs/SECURITY_AUDIT_CHECKLIST.md) - Security compliance checklist -- [Security Baseline](docs/SECURITY_BASELINE.md) - Security baseline requirements -- [Testing Standards](docs/TESTING_STANDARDS.md) - Standards for testing infrastructure code -- [Version Control](docs/VERSION_CONTROL.md) - Version control practices +- [Architecture](docs/ARCHITECTURE.md) - How the system is built +- [Documentation Standards](docs/DOCUMENTATION_STANDARDS.md) - How to write good documentation +- [Infrastructure Standards](docs/INFRASTRUCTURE_STANDARDS.md) - Rules for setting up infrastructure +- [Module Dependencies](docs/MODULE_DEPENDENCIES.md) - How different parts depend on each other +- [Module Standards](docs/MODULE_STANDARDS.md) - Rules for creating modules +- [Observability Standards](docs/OBSERVABILITY_STANDARDS.md) - How to monitor the system +- [Security Audit Checklist](docs/SECURITY_AUDIT_CHECKLIST.md) - Steps to check for security issues +- [Security Baseline](docs/SECURITY_BASELINE.md) - Basic security requirements +- [Testing Standards](docs/TESTING_STANDARDS.md) - Rules for testing +- [Version Control](docs/VERSION_CONTROL.md) - How to manage code versions -## Prerequisites +## What You Need -- Terraform v1.0.0+ -- Terragrunt v0.36.0+ -- AWS CLI configured with appropriate access -- Appropriate AWS permissions for the resources being deployed +- Terraform v1.0.0 or newer +- Terragrunt v0.36.0 or newer +- AWS CLI set up with the right permissions +- Access to AWS resources -## Quick Start +## How to Get Started ### Using the Makefile -This repository includes a Makefile with several helpful targets: +This repository has a Makefile with helpful commands: ```bash -make help # Show available commands -make init # Initialize Terragrunt configurations -make validate # Validate Terragrunt configurations -make plan # Run plan in dry-run mode -make fmt # Format HCL files -make check # Run all checks (format, validate, plan) -make clean # Clean Terragrunt cache +make help # See available commands +make init # Set up Terragrunt +make validate # Check if everything is set up correctly +make plan # Preview changes +make fmt # Format files +make check # Run all checks +make clean # Clean up temporary files ``` ### Manual Terragrunt Commands -Navigate to the directory containing the Terragrunt configuration you want to work with: +Go to the folder with the Terragrunt configuration you want to use: ```bash cd lab/environment/component -# Initialize Terragrunt +# Set up Terragrunt terragrunt init -# Plan changes +# Preview changes terragrunt plan # Apply changes terragrunt apply -# Destroy resources +# Remove resources terragrunt destroy ``` ### Running All Configurations -You can run commands across all Terragrunt configurations: +Run commands for all Terragrunt configurations: ```bash -# Initialize all configurations +# Set up everything terragrunt run-all init -# Plan all configurations +# Preview all changes terragrunt run-all plan -# Apply all configurations +# Apply all changes terragrunt run-all apply ``` ## Configuration -Terragrunt configurations are organized hierarchically: +Terragrunt configurations are organized like this: -1. Root-level configuration in each environment directory -2. Component-specific configurations inheriting from the root -3. Environment-specific overrides where needed +1. Main settings for each environment +2. Specific settings for different parts of the system +3. Overrides for special cases -See specific environment directories for more details on the configuration structure. +Check the environment folders for more details. ## Testing -The `/tests` directory contains test frameworks and test cases for validating infrastructure code. To run tests: +The `/tests` folder has tools to check if everything works. To run tests: ```bash cd tests ./run_tests.sh ``` -## Contributing +## How to Contribute -1. Fork the repository -2. Create a feature branch -3. Make your changes -4. Run `make check` to validate your changes +1. Make a copy of this repository +2. Create a new branch for your changes +3. Make your updates +4. Run `make check` to ensure everything is correct 5. Submit a pull request ## License