Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploy from the command line using a single script and argument #147

Merged
merged 20 commits into from
Apr 8, 2021

Conversation

glennmusa
Copy link
Contributor

@glennmusa glennmusa commented Apr 8, 2021

Description

This change updates terraform variables in src/core to use well-known defaults and introduces two new scripts that make it easier to deploy an instance of MissionLZ and clean-up afterwards. This change also fixes #100 and allows for deployments into other clouds.

TL;DR: an end user can now deploy MissionLZ with just these three commands (given that they are using the .devcontainer or have Azure CLI and Terraform CLI installed):

az login
git clone https://github.com/Azure/missionlz.git
src/deploy.sh -s {my_subscription_id}

and when the deployment is complete, they can run this to remove all resources and clean it all up:

src/clean.sh -z {mlz_env_name}

See the docs for the full argument list and how to deploy into another cloud.

  1. deploy.sh

    • creates an MLZ configuration file using inputs or defaults
    • creates a global terraform variables .tfvars file using inputs or defaults
    • calls src/build/apply.tf with this generated MLZ configuration and generated terraform .tfvars
  2. clean.sh

    • accepts an MLZ environment name as input and tries to source the generated MLZ configuration and terraform variables (future work could be done to regenerate these files if they are not found)
    • calls src/build/destroy.tf if the generated configuration and tfvars are found
    • removes all MLZ configuration resources (rgs, storage accounts)
    • deletes the MLZ service principal associated with that deployment

Issue reference

The issue this PR will close: #100, #146

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles or validates correctly
  • BASH scripts have been validated using shellcheck
  • All tests pass (manual and automated)
  • The documentation is updated to cover any new or changed features
  • Markdown files have been linted using the recommended linter. (See .vscode/extensions.json.)
  • Relevant issues are linked to this PR

@glennmusa glennmusa merged commit d04c383 into main Apr 8, 2021
@glennmusa glennmusa deleted the glennmusa/deploywithdefaults branch April 8, 2021 19:09
jwaltireland pushed a commit to ARPA-H/AzureMissionLZ that referenced this pull request Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

missing metadata host URL on backend configurations
2 participants