galaxyops

DevOps Architecture for AWS Workloads

OTHER License

Downloads
2.1K
Stars
12
Committers
7

@galaxyops 🌌

@galaxyops: Empowering Efficient Project Management and Accelerated Domain-Driven DevOps on AWS.

Overview

Running numerous applications on AWS without a clear architectural pattern risks inviting chaos and uncertainty into your environment. @galaxyops is a cloud architecture emphasizing modern DevOps best practices on AWS. It lays the groundwork for the enterprise software landscape, ensuring scalability and maintainability across projects.

Features

  • Universal Language: Leveraging TypeScript for microservices, enhancing performance, readability, and maintenance. Other languages can be used for specific tasks, such as Python for data science.

  • Simple Setup: Turn-key deployment on bare metal systems, specially designed for compatibility with MacOS silicon environments and without a Docker dependency.

  • Monorepo Architecture: Centralizes development, streamlining code sharing, versioning, and dependency management with tools like Nx and PNPM.

  • CI/CD Pipeline: Autonomous pipeline for deploying auditable artifacts to AWS using IaC, ensuring consistency and scalability.

  • Event-Driven Microservices: Fault-tolerant communication via queues, with event data archived in a data lake for analytics.

  • Schema Contracts: Automatic mocking and validation for seamless inter-service communication and data integrity.

  • Ephemeral Environments: Provisioning of TLS certificates and email services using AWS Org Formation.

  • User Authentication: Integration of Cognito for user registration and authentication.

  • SPA Frontend with BFF: Single-page application with frontend hosted on S3 and deployed via CloudFront, with middleware for backend operations.

Getting Started

Install package manager, jq, build all packages, and hydrate dotenv files:

corepack enable pnpm # install PNPM
brew install jq # install jq on MacOS, which is used for lambda layer builder
pnpm install # install dependencies
pnpm nx run galaxyops:init # ready for use

Run any script using Nx by specifying the package name followed by the script name, e.g.

pnpm nx run admin-client:dev

Common Commands

pnpm update                     # Update workspace files.
pnpm add @a/b                   # Add a new package to the app.
pnpm up -r --workspace --interactive # Make package versions consistent.
pnpm nx run-many -t [command] --all # Run a command in bulk.
pnpm nx run package:[command]    # Run a command in the current package.
pnpm nx run package:build        # Build projects.
pnpm nx run package:watch        # Watch for changes and compile.
pnpm nx run package:lint         # Perform ESLint static analysis.
pnpm nx run package:test         # Test a package.
pnpm nx run package:test:cov     # Run tests with coverage.
pnpm nx run package:docs         # Generate documentation from code.
pnpm nx run package:cdk:bootstrap # Bootstrap the CDK project.
pnpm nx run package:cdk:synth    # Show synthesized CloudFormation template.
pnpm nx run package:cdk:diff     # Compare deployed stack with current state.
pnpm nx run package:cdk:deploy   # Deploy apps using AWS CDK.
pnpm nx run package:cdk deploy --hotswap # Speed up dev deployment.
pnpm nx run package:cdk watch    # Hotswap on changes.
pnpm nx run package:cdk doctor    # Check CDK project for issues.
pnpm nx release                   # Create a release for all package changes.
pnpm nx dep-graph                 # Visualize dependencies.

Target Architecture Diagram

AWS Multi-Account Architecture Initial Setup

These steps are required once by the platform team to initialize the IaaS.

  1. Setup AWS Org Formation.

  2. Set an environmental variable in the shell configuration file to establish a default AWS CLI profile for seamless authentication and resource access.

    echo 'export AWS_PROFILE=DeveloperSandbox' >> ~/.zshrc
    
  3. Login via SSO and bootstrap deployments. Deploy platform, services, and then clients in that order.

     aws configure sso
     pnpm nx run galaxyops:cdk:deploy:sandbox
    
  4. Login via SSO to tools account and then deploy tools.

    pnpm nx run galaxyops:cdk:deploy:tools-account
    

Documentation

Comprehensive documentation is essential for understanding and maintaining this project. Each project and folder structure should feature a README.md files containing documentation following RFC 2119 standards.

Contributing

Pull requests and bug reports are welcome on GitHub at https://github.com/hxtree/galaxyops. Please follow the code of conduct when contributing.

Acknowledgements

License

All packages available NPM are MIT licensed.

Package Rankings
Top 23.91% on Npmjs.org
Badges
Extracted from project README's
CI Codacy Badge Codacy Badge
Related Projects