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}/envdirectory, specifically changes totfvarsfiles.
- 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\envsubdirectory.Note: Environment specifics will go under the
\envfolder in a{environment}.tfvarsfile name. - Create the desired infrastructure using the pre-build modules in the modules directory.
- Copy desired modules from the
modules\directory into the appropriate.tffiles.Note: New modules normally go into the
main.tffile. Variables go into thevariables.tffile. - Update the
terraform.tfvarsfile in the\envfolder 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 masterandgit push origin master - Delete the branch