The purpose of the Deployments
directory is to deploy new projects.
GitHub Actions is used as the CI/CD deployment tool. GitHub Actions is connected to the remote
git repo hosted in client git repo. There are automated pipelines configured in .github/workflows that watch for changes in the different deployments directories.
Note: Filters for all pipelines have been configured to only watch for changes in the
envrionment/deployments/{application}/env
directory, specifically changes totfvars
files.
- Clone repo from GitHub
git clone lsst/idf_deploy.git
- Change freshly cloned repo and change to non master branch
git checkout -b simple-project
- Create a new folder in the deployments directory
mkdir envrionment\deployments\example-project
- Start by creating the
main.tf
,variables.tf
,outputs.tf
,readme.md
, and an\env
subdirectory.Note: Environment specifics will go under the
\env
folder in a{environment}.tfvars
file name. - Create the desired infrastructure using the pre-build modules in the modules directory.
- Copy desired modules from the
modules\
directory into the appropriate.tf
files.Note: New modules normally go into the
main.tf
file. Variables go into thevariables.tf
file. - Update the
terraform.tfvars
file in the\env
folder with values for your environment. - Commit changes with
git add .
andgit commit -m 'Your message'
Pipeline: Build a new pipeline to go along with the new project.
- Push your non master branch to trigger a plan
git push --set-upstream origin simple-project
- Merge the changes to master with
git checkout -b master
andgit push origin master
- Delete the branch