Initial import of files without removing existing files#82
Open
peterwwillis wants to merge 1 commit intoGreenstand:masterfrom
Open
Initial import of files without removing existing files#82peterwwillis wants to merge 1 commit intoGreenstand:masterfrom
peterwwillis wants to merge 1 commit intoGreenstand:masterfrom
Conversation
This is the same as branch reorganize-proposal-1, but using the latest master branch code, and without removing any existing files.
Author
|
This PR should be safe to be merged, as it no longer deletes or moves any files, and only modifies .gitignore and a README. |
ZavenArra
approved these changes
May 10, 2022
Contributor
|
@ZavenArra if we merge this we can start the Tf code from here. Sorry for the late reply. I see is safe to merge though. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the same as branch reorganize-proposal-1, but using the latest
master branch code, and without removing any existing files.
These changes are a proposal for how to manage infrastructure as code.
The basic idea is as follows:
env/directory contains configuraiton specific to an environment. An 'environment' is any logical grouping of infrastructure that is specific to one particular use case, or location, or account, etc. Environments inherit configuration hierarchically. A component 'airflow' in a directory 'dev' in a directory 'sfo2' in a directory 'docean' will allow that 'airflow' component to inherit the configuration of those parent directories, so configuration never needs to be duplicated across environments. It also allows for simple perusal of configuration to find configuration values specific to an environment, or more global configuration.A
terraform/directory contains arootdirectory, where root modules are kept. These modules are passedterraform.sh.tfvarsconfiguration files from anenv/. The module is designed to absorb configuration and apply changes the same way in all accounts, with some logic embedded in the Terraform code to work around differences in different environments. In this way, the same root module can be used for multiple environments, keeping the code DRY.A
terraform/directory also contains asubdirectory, which are sub-modules. Think of these as "libraries" of Terraform code. These are not always necessary, but sometimes the extra layer of abstraction is convenient. A well-designed root module is often enough for small projects without the need for sub-modules.Purpose-built deployment scripts are used to pass the
env/configuration to the components being deployed, which may live in other directories for example theterraform/modules directories). In some cases, symlinking to anenv/directory can prevent the need to write a custom deployment script.This proposal is not yet complete. Still to be completed:
Finish taking some existing Terraform modules and adapting them with new variables, and filling in the
env/directories with new.tfvarsfiles to carry the variables.Sample of actually planning, importing, and applying existing infrastructure to use this new setup.
A guide to developing with this model
A guide to deploying with this model
Docker, GitHub Actions, and other code/configuration to execute deployment scripts using this model