https://github.com/cdcgov/dibbs-aws

https://github.com/cdcgov/dibbs-aws

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.8%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: CDCgov
  • License: cc0-1.0
  • Language: HCL
  • Default Branch: main
  • Size: 1.47 MB
Statistics
  • Stars: 4
  • Watchers: 5
  • Forks: 2
  • Open Issues: 4
  • Releases: 0
Created about 2 years ago · Last pushed 10 months ago
Metadata Files
Readme Contributing License Code of conduct

README.md

Table of Contents

1. Overview

The Data Integration Building Blocks (DIBBs) project is an effort to help state, local, territorial, and tribal public health departments better make sense of and utilize their data. You can read more about the project on the main DIBBs eCR Viewer repository.

This repository is specifically to develop an AWS "starter kit" for the DIBBs project. This will enable our jurisdictional partners to build from this repository to provision their own AWS infrastructure.

This repository is actively used by the DIBBs eCR Viewer team to deploy and test their application in AWS.

2. Notices

2.1 Public Domain Standard Notice

This repository constitutes a work of the United States Government and is not subject to domestic copyright protection under 17 USC § 105. This repository is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication. All contributions to this repository will be released under the CC0 dedication. By submitting a pull request you are agreeing to comply with this waiver of copyright interest.

2.2 License Standard Notice

The repository utilizes code licensed under the terms of the Apache Software License and therefore is licensed under ASL v2 or later.

This source code in this repository is free: you can redistribute it and/or modify it under the terms of the Apache Software License version 2, or (at your option) any later version.

This source code in this repository is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache Software License for more details.

You should have received a copy of the Apache Software License along with this program. If not, see http://www.apache.org/licenses/LICENSE-2.0.html.

The source code forked from other open source projects will inherit its license.

2.3 Privacy Standard Notice

This repository contains only non-sensitive, publicly available data and information. All material and community participation is covered by the Disclaimer and Code of Conduct. For more information about CDC's privacy policy, please visit http://www.cdc.gov/other/privacy.html.

2.4 Contributing Standard Notice

Anyone is encouraged to contribute to the repository by forking and submitting a pull request. (If you are new to GitHub, you might start with a basic tutorial.) By contributing to this project, you grant a world-wide, royalty-free, perpetual, irrevocable, non-exclusive, transferable license to all users under the terms of the Apache Software License v2 or later.

All comments, messages, pull requests, and other submissions received through CDC including this GitHub page may be subject to applicable federal law, including but not limited to the Federal Records Act, and may be archived. Learn more at http://www.cdc.gov/other/privacy.html.

2.5 Records Management Standard Notice

This repository is not a source of government records, but is a copy to increase collaboration and collaborative potential. All government records will be published through the CDC web site.

2.6 Additional Standard Notices

Please refer to CDC's Template Repository for more information about contributing to this repository, public domain notices and disclaimers, and code of conduct.

3. Architectural Design

The current architectural design for dibbs-aws is as follows:

Current DIBBS Architecture as of 6-24-2024

4. Getting Started

This section will assist engineers with executing Infrastructure as Code (IaC) found in the dibbs-aws repository utilizing Terraform.

Return to Table of Contents

4.1.0 Requirements

Engineers will need following tools installed on their local machine: * Terraform version 1.0.0+ Hashicorp installation Guide * Terraform Documentation * AWS CLI version 2+ AWS CLI Installation Guide * AWS Profile Access

Note: Engineers must have access and permissions to create AWS resources

4.1.1 Terraform documentation

  • If you havn't used terraform before, and have the will to learn, please visit these resources before continuing.
    • Terraform Documentation: The official Terraform documentation is an exhaustive resource that covers everything from installation to advanced topics. https://developer.hashicorp.com/terraform/docs
    • Terraform/AWS Intro: HashiCorp provides an official tutorial that covers the basics of Terraform and helps you get started with deploying infrastructure into AWS. https://developer.hashicorp.com/terraform/tutorials/aws-get-started
    • Terraform AWS Provider Documentation: If you're using Terraform with AWS, this documentation provides detailed information on the available resources and data sources. https://registry.terraform.io/providers/hashicorp/aws/latest/docs
    • Terraform module published by the dibbs-ecr-viewer DevOps teams this repo uses: https://registry.terraform.io/modules/CDCgov/dibbs-ecr-viewer/aws/latest

Return to Table of Contents

4.2 Helper Scripts

If you are familiar with terraform, have setup a backend, understand terraform deployment workflows, know how to validate terraform, or are otherwise opinionated about how you want to run things, feel free to skip this section - We have several helper scripts that will assist you with setting up your AWS backend and deploying your AWS resources. - These scripts are located in the terraform/utilities folder, the terraform/implementation/setup folder and the terraform/implementation/ecs folder. - The utilities folder contains scripts that will assist in generating terraform docs, formatting and linting terraform code. - The setup.sh script will assist you with creating the terraform state and .env files to be used later, also sets up OIDC for your GitHub workflows. - The deploy.sh script will assist you with deploying your ECS module from your development machine.

Note: It is not recommended to run these scripts without reviewing them and understanding their limitations.

Note: It is not recommended to use these scripts to automate your terraform deployments, please see the GitHub workflows for examples on how to do that.

Terraform validation and docs with ./utils.sh * In your terminal, navigate to the /terraform/utilities folder. * cd /terraform/utilities * Run ./tfdocs.sh to generate terraform documentation. * Run ./tffmt.sh to validate your terraform code. * Run ./tflint.sh to lint your terraform code. * Run ./utils.sh to run all utilities.

Update And Setup Your AWS Backend with ./setup.sh * In your terminal, navigate to the /terraform/implementation/setup folder. * cd /terraform/implementation/setup
* Run ./setup.sh

Note: You will be prompted to set your variable values (i.e. Region, Owner, Project, etc.). For example, the default value for Owner is Skylight. You can change this value to one that represents your organization or department. Keep these short and sweet to prevent running into character limits when provisioning AWS resources. The Owner name must be less than 13 characters.

The setup.sh scripts will assist you with creating the terraform state and tfvars files, as well as check to ensure the necessary arguments or variables were created. See setup.sh file. Also see Inputs.

The setup.sh script will create the following files:

  • tfstate.tfvars
  • .env
  • terraform.state

Deploy Your ECS Module with ./deploy * It is highly recommended to create a new directory per environment that is launched, to do so run cp terraform/implementation/ecs terraform/implementation/<ENVIRONMENT>. * The benefits of doing this reduces the likelyhood of conflicts and allows each environment to run different versions of the same module. * To run your ECS Module Changes in your local terminal, navigate to your working directory, cd terraform/implementation/ecs/ or cd terraform/implementation/<ENVIRONMENT> * In your terminal run the deploy script for your designated environment ./deploy.sh -e <ENVIRONMENT>.

Note: The -e tag stands for environment and you can specify dev, test, prod, this can match your <ENVIRONMENT> naming convention. or whatever environment your team desires.

4.3 Modules used in this repository

Modules pulled from the Terraform Registry - terraform-aws-dibbs-ecr-viewer - This module is used to deploy the eCR Viewer application to AWS. - vpc - This module is used to deploy the VPC for the ECS module.

Local modules - oidc - OIDC module, used to setup OIDC for GitHub workflows - tfstate - TFState module, used to setup the terraform state backend and lock table - db - Database module, used to setup the database for the ECS module

4.4 Development Workflow

Use the dibbs-aws repository

  1. Select to create your own repo from this template, or fork it to your own repository.
  2. Clone the repository to your local machine.
  3. Make a new branch for your changes: git checkout -b <BRANCH>.
  4. Make any changes required by your team to the terraform configurations.
  5. Add and commit changes to your working branch: git add . && git commit -m "Your message here".
  6. Push your changes to your github repository: git push origin <BRANCH>.
  7. Open a Pull Request so that your team can review your changes and testing can be done.
  8. Go back to step 4 until your changes are approved.
  9. Once your changes are approved, merge your changes into the main branch.

Terrform Commands

Owner

  • Name: Centers for Disease Control and Prevention
  • Login: CDCgov
  • Kind: organization
  • Email: data@cdc.gov
  • Location: Atlanta, GA

CDC's collaborative software projects to protect America from health, safety, and security threats, both foreign and in the U.S.

GitHub Events

Total
  • Create event: 23
  • Issues event: 44
  • Watch event: 1
  • Delete event: 14
  • Issue comment event: 16
  • Push event: 206
  • Pull request review event: 40
  • Pull request review comment event: 31
  • Pull request event: 41
  • Gollum event: 11
  • Fork event: 2
Last Year
  • Create event: 23
  • Issues event: 44
  • Watch event: 1
  • Delete event: 14
  • Issue comment event: 16
  • Push event: 206
  • Pull request review event: 40
  • Pull request review comment event: 31
  • Pull request event: 41
  • Gollum event: 11
  • Fork event: 2

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 37
  • Total pull requests: 60
  • Average time to close issues: 26 days
  • Average time to close pull requests: 13 days
  • Total issue authors: 8
  • Total pull request authors: 5
  • Average comments per issue: 0.41
  • Average comments per pull request: 0.17
  • Merged pull requests: 37
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 30
  • Pull requests: 42
  • Average time to close issues: 20 days
  • Average time to close pull requests: 9 days
  • Issue authors: 8
  • Pull request authors: 4
  • Average comments per issue: 0.43
  • Average comments per pull request: 0.07
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • alismx (25)
  • ashton-skylight (3)
  • akasper (3)
  • douglasnaphas (2)
  • J-Prichard-PHL (1)
  • BobanL (1)
  • emmastephenson (1)
  • gordonfarrell (1)
Pull Request Authors
  • alismx (44)
  • marycrawford (6)
  • BobanL (4)
  • shanice-skylight (4)
  • douglasnaphas (2)
Top Labels
Issue Labels
Cloud Enablement (23) Streamline eCR (22) aws (15) enhancement (8) documentation (3) bug (2)
Pull Request Labels
aws (2) documentation (2) Cloud Enablement (1) Streamline eCR (1)

Dependencies

.github/workflows/deployment.yaml actions
  • actions/checkout v4 composite
  • aws-actions/configure-aws-credentials v4 composite
  • hashicorp/setup-terraform v3 composite
.github/workflows/destroy.yaml actions
  • actions/checkout v4 composite
  • aws-actions/configure-aws-credentials v4 composite
  • hashicorp/setup-terraform v3 composite
.github/workflows/trivy.yaml actions
  • actions/checkout v4 composite
  • aquasecurity/trivy-action 0.23.0 composite