From a2af10d435ca5affe778c369a173a374abe67883 Mon Sep 17 00:00:00 2001 From: arnol377 Date: Fri, 7 Feb 2025 19:08:56 -0500 Subject: [PATCH] Refactor README.md to enhance project structure overview and streamline repository setup instructions --- README.md | 94 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 56 insertions(+), 38 deletions(-) diff --git a/README.md b/README.md index 8b8d1a2..c738278 100644 --- a/README.md +++ b/README.md @@ -1,43 +1,61 @@ # AWS Image Pipeline -This repository is part of a larger project that involves multiple repos, each serving a specific purpose in the image pipeline process. Below is an overview of each directory and its role in the pipeline. - -Using VS Code you can open the linux- -## Directories - -### [aws-image-pipeline](.) -This is the main directory for the AWS Image Pipeline. It contains the core scripts and configurations required to manage the image pipeline process. - -### [ansible/ansible-playbooks](../image-pipeline-ansible-playbooks) -This directory contains Ansible playbooks used for provisioning and configuring the images. These playbooks automate the setup and configuration of the images to ensure they meet the required specifications. - -### [packer/linux-image-pipeline](../linux-image-pipeline) -This directory contains Packer templates and scripts used to build the Linux images. Packer is used to create machine images for multiple platforms from a single source configuration. - -### [modules/terraform-aws-image-pipeline](../terraform-aws-image-pipeline) -This directory contains Terraform modules used to manage the infrastructure for the image pipeline on AWS. Terraform is used to provision and manage the AWS resources required for the image pipeline. - -### [test/goss-testing](../image-pipeline-goss-testing) -This directory contains Goss tests used to validate the images. Goss is a YAML-based tool for validating server configurations, ensuring that the images meet the required standards before they are deployed. - -## Repositories -- [aws-image-pipeline](https://git.e.it.census.gov/csvd/aws-image-pipeline) -- [ansible/ansible-playbooks](https://git.e.it.census.gov/csvd/image-pipeline-ansible-playbooks) -- [packer/linux-image-pipeline](https://git.e.it.census.gov/csvd/linux-image-pipeline) -- [modules/terraform-aws-image-pipeline](https://git.e.it.census.gov/csvd/terraform-aws-image-pipeline) -- [test/goss-testing](https://git.e.it.census.gov/csvd/image-pipeline-goss-testing) +An automated solution for building, configuring, and testing AMIs using AWS services and open-source tools. + +## Project Structure + +### 1. terraform-aws-image-pipeline +Infrastructure management module: +- AWS CodePipeline for orchestration +- CodeBuild projects for AMI creation +- IAM roles and policies +- S3 buckets for artifacts +- KMS keys for encryption + +### 2. linux-image-pipeline +Packer configuration repository: +- Packer templates (morpheus-build.pkr.hcl) +- AMI build specifications +- Volume mapping configurations +- Integration points with Ansible +- Post-build automation + +### 3. image-pipeline-ansible-playbooks +Configuration management: +- Base configuration playbooks +- Role-based configurations + - morpheus: Application installation + - satellite: Registration management + - pip: Python dependencies +- Integration with Packer builds + +### 4. image-pipeline-goss-testing +Testing framework: +- Goss test specifications +- AMI validation rules +- Integration with pipeline + +## Pipeline Flow +1. Terraform creates/updates infrastructure +2. CodePipeline triggers on repository changes +3. CodeBuild executes Packer +4. Packer launches EC2 instance +5. Ansible configures instance +6. Packer creates AMI +7. Goss validates AMI +8. Pipeline reports success/failure + +## Repository Setup ```bash -# - [ansible/ansible-playbooks](https://git.e.it.census.gov/csvd/image-pipeline-ansible-playbooks) -git clone https://git.e.it.census.gov/csvd/image-pipeline-ansible-playbooks ../image-pipeline-ansible-playbooks - -# - [packer/linux-image-pipeline](https://git.e.it.census.gov/csvd/linux-image-pipeline) -git clone https://git.e.it.census.gov/csvd/linux-image-pipeline ../linux-image-pipeline - -# - [modules/terraform-aws-image-pipeline](https://github.com/HappyPathway/terraform-aws-image-pipeline) -git clone https://github.com/HappyPathway/terraform-aws-image-pipeline ../terraform-aws-image-pipeline - -# - [test/goss-testing](https://git.e.it.census.gov/csvd/image-pipeline-goss-testing) -git clone https://git.e.it.census.gov/csvd/image-pipeline-goss-testing ../image-pipeline-goss-testing +# Clone required repositories +git clone https://git.e.it.census.gov/csvd/image-pipeline-ansible-playbooks +git clone https://git.e.it.census.gov/csvd/linux-image-pipeline +git clone https://git.e.it.census.gov/csvd/terraform-aws-image-pipeline +git clone https://git.e.it.census.gov/csvd/image-pipeline-goss-testing ``` -Each repository is integral to the overall image pipeline process, ensuring that images are built, configured, validated, and deployed efficiently and reliably. \ No newline at end of file +## Development +Open the workspace in VS Code: +```bash +code aws-image-pipeline.code-workspace +``` \ No newline at end of file