Skip to content

Cosmo-Tech/terraform-webapp

Repository files navigation

Static Badge Static Badge

Cosmo Tech webapp deployment

Requirements

  • working Kubernetes cluster (with admin access)
  • Linux (Debian/Ubuntu) workstation with:
  • if Azure: azure-cli installed and ready to use
  • if AWS: aws-cli installed and ready to use

How to

  • Clone & open the repository
    git clone https://github.com/Cosmo-Tech/terraform-webapp.git
    
    cd terraform-webapp
    
  • Deploy
    • Fill terraform-cluster/terraform.tfvars variables according to your needs
    • run pre-configured script

      ℹ️ comment/uncomment the terraform apply line at the end to get a plan without deploy anything

      • Linux
        ./_run-terraform.sh
      • Windows
        ./_run-terraform.ps1
    • Backend target notes
      • Azure
        • The run script generates a target.tf file from targets/azure.target.tf
        • Terraform uses the azurerm backend for the remote state
      • KOB / On-premise
        • The run script generates a target.tf file from targets/kob.target.tf
          • Set state_host in terraform.tfvars
          • Before running Terraform, export the HTTP backend credentials as environment variables:
            • Linux:
              export TF_HTTP_USERNAME="your-username"
              export TF_HTTP_PASSWORD="your-password"
            • Windows (PowerShell):
              $env:TF_HTTP_USERNAME = "your-username"
              $env:TF_HTTP_PASSWORD = "your-password"
          • If you don't have the credentials, request them from the DevOps team.
      • AWS
        • Not yet implemented
      • GCP
        • Not yet implemented

Developpers

  • modules
    • terraform-webapp
      • install Cosmo Tech webapp in a tenant created from terraform-tenant

Note

There is a module that can deploy a Power BI App Registration if you are using Power BI.
However, by default, Superset is configured instead, so the Power BI app is not deployed unless explicitly enabled.

In terraform.tfvars, the variable controlling this feature is set to false by default:

powerbi_app_deploy = false



Made with ❤️ by Cosmo Tech DevOps team