Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hxtree/galaxyops
DevOps Architecture for AWS Workloads
https://github.com/hxtree/galaxyops
aws-cdk-v2 co-op cqrs-pattern devops event-driven monorepo nestjs nx platform-engineering reactjs rpg-game serverless typescript
Last synced: 6 days ago
JSON representation
DevOps Architecture for AWS Workloads
- Host: GitHub
- URL: https://github.com/hxtree/galaxyops
- Owner: hxtree
- License: other
- Created: 2021-12-16T04:06:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-26T20:25:00.000Z (11 days ago)
- Last Synced: 2024-10-27T05:47:50.070Z (11 days ago)
- Topics: aws-cdk-v2, co-op, cqrs-pattern, devops, event-driven, monorepo, nestjs, nx, platform-engineering, reactjs, rpg-game, serverless, typescript
- Language: JavaScript
- Homepage: https://design.sandbox.nekosgate.com/
- Size: 395 MB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# @galaxyops :milky_way:
@galaxyops: Empowering Efficient Project Management and Accelerated
Domain-Driven DevOps on AWS.[![CI](https://github.com/hxtree/galaxyops/actions/workflows/on-merge.yml/badge.svg)](https://github.com/hxtree/galaxyops/actions/workflows/on-merge.yml)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/8024531285164025aef972fcb059ea74)](https://app.codacy.com/gh/hxtree/galaxyops/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/8024531285164025aef972fcb059ea74)](https://app.codacy.com/gh/hxtree/galaxyops/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)## 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:
```bash
corepack enable pnpm # install PNPM
brew install jq # install jq for lambda layer builder on MacOS
pnpm install # install dependencies
pnpm nx run galaxyops:hydrate # hydrate env files
```Run any script using Nx by specifying the package name followed by the script
name, e.g.```bash
pnpm nx run admin-client:dev
```### Common Commands
```bash
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 # hot swap 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
![Flow Chart](docs/flow-chart.drawio.svg)
### AWS Multi-Account Architecture Initial Setup
These steps are required once by the platform team to initialize the IaaS.
1. Setup [AWS Org Formation](/platform/aws-org-formation/README.md).
2. Set an environmental variable in the shell configuration file to establish a
default AWS CLI profile for seamless authentication and resource access.```bash
echo 'export AWS_PROFILE=DeveloperSandbox' >> ~/.zshrc
```3. Login via SSO and bootstrap deployments. Deploy platform, services, and then
clients in that order.```bash
aws configure sso
pnpm nx run galaxyops:cdk:bootstrap:sandbox
pnpm nx run galaxyops:cdk:deploy:sandbox
```4. Login via SSO to tools account and then deploy tools.
```bash
pnpm nx run galaxyops:cdk:bootstrap:tools-account
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.Third Party Documentation
- [NX Package Based Repo](https://nx.dev/getting-started/tutorials/package-based-repo-tutorial)
- [AWS CLI](https://docs.aws.amazon.com/cdk/v2/guide/cli.html)
- [Typescript](https://www.typescriptlang.org/docs/)
- [Jest](https://jestjs.io/)
- [Automatically Version with Conventional Commits](https://nx.dev/recipes/nx-release/automatically-version-with-conventional-commits)## Contributing
Pull requests and bug reports are welcome on GitHub at
. Please follow the
[code of conduct](docs/CODE_OF_CONDUCT.md) when contributing.### Acknowledgements
## License
All packages available [NPM](https://www.npmjs.com/search?q=%40cats-cradle) are
MIT licensed.