Giter Club home page Giter Club logo

Comments (6)

mdepedrof avatar mdepedrof commented on July 1, 2024 1

Hi! @DCMattyG. Reviewing the latest changes in the repo, I have seen that you no longer use Docker compose in the WebApp but you use a docker image directly. By applying these changes in Terraform, I was able to make it work again.

resource "azurerm_linux_web_app" "ipam" {
  count = local.enable_ipam ? 1 : 0

  name                            = replace(module.naming.compute_app_service_plan, "asp-management", "asp-ipam")
  location                        = azurerm_resource_group.this["rg-ipam"].location
  resource_group_name             = azurerm_resource_group.this["rg-ipam"].name
  service_plan_id                 = azurerm_service_plan.ipam[0].id
  key_vault_reference_identity_id = azurerm_user_assigned_identity.ipam[0].id

  https_only = true

  identity {
    type         = "UserAssigned"
    identity_ids = [azurerm_user_assigned_identity.ipam[0].id]

  }
  site_config {
    container_registry_use_managed_identity       = true
    container_registry_managed_identity_client_id = azurerm_user_assigned_identity.ipam[0].client_id
    always_on                                     = true
    app_command_line                              = "init.sh 8000"
    health_check_path                             = "/api/status"

    application_stack {
      docker_registry_url = "https://azureipam.azurecr.io"
      docker_image_name   = "ipam:latest"
    }
  }

  app_settings = {
    APPLICATIONINSIGHTS_CONNECTION_STRING           = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault.ipam[0].vault_uri}secrets/APPINSIGHT-CONN-STRING/)"
    APPINSIGHTS_PROFILERFEATURE_VERSION             = "1.0.0"
    APPINSIGHTS_SNAPSHOTFEATURE_VERSION             = ""
    APPLICATIONINSIGHTS_CONFIGURATION_CONTENT       = ""
    ApplicationInsightsAgent_EXTENSION_VERSION      = "~3"
    DiagnosticServices_EXTENSION_VERSION            = "~3"
    InstrumentationEngine_EXTENSION_VERSION         = "disabled"
    SnapshotDebugger_EXTENSION_VERSION              = "disabled"
    XDT_MicrosoftApplicationInsights_BaseExtensions = "disabled"
    XDT_MicrosoftApplicationInsights_Mode           = "recommended"
    XDT_MicrosoftApplicationInsights_PreemptSdk     = "disabled"
    AZURE_ENV                                       = "AZURE_PUBLIC"
    COSMOS_URL                                      = azurerm_cosmosdb_account.ipam[0].endpoint
    COSMOS_KEY                                      = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault.ipam[0].vault_uri}secrets/COSMOS-KEY/)"
    DATABASE_NAME                                   = azurerm_cosmosdb_sql_database.ipam[0].name
    CONTAINER_NAME                                  = azurerm_cosmosdb_sql_container.ipam[0].name
    UI_APP_ID                                       = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault.ipam[0].vault_uri}secrets/UI-ID/)"
    ENGINE_APP_ID                                   = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault.ipam[0].vault_uri}secrets/ENGINE-ID/)"
    ENGINE_APP_SECRET                               = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault.ipam[0].vault_uri}secrets/ENGINE-SECRET/)"
    TENANT_ID                                       = "@Microsoft.KeyVault(SecretUri=${azurerm_key_vault.ipam[0].vault_uri}secrets/TENANT-ID/)"
    KEYVAULT_URL                                    = azurerm_key_vault.ipam[0].vault_uri
    WEBSITE_ENABLE_SYNC_UPDATE_SITE                 = "true"
  }

  logs {
    detailed_error_messages = true
    failed_request_tracing  = false

    application_logs {
      file_system_level = "Information"
    }

    http_logs {
      file_system {
        retention_in_days = 7
        retention_in_mb   = 35
      }
    }
  }
}

from ipam.

DCMattyG avatar DCMattyG commented on July 1, 2024 1

Great news @crower19, and thank you so much for sharing the Terraform. I'm sure others will find it very useful in the future!

I'll go ahead and close this issue now, but please feel free to reach out with any other needs you may have. Happy to help however we can!

from ipam.

DCMattyG avatar DCMattyG commented on July 1, 2024

Hi @crower19, I'm so sorry you are running into this issue, but I'm happy to help!

My first question is did you pull the latest code from the main branch of the Azure IPAM GitHub repo before you recompiled your containers?

The reason this is important is that over the last few months, I've addressed many breaking changes in packages like FastAPI and Pydantic and if you have an older version of the code without those updates your containers could be building without those fixes and could explain the crashing that you are seeing.

So if you're copy of the codebase is older, I'd suggest pulling the latest code down and rebuilding your containers from that, otherwise if you're already running from the latest codebase we can start exploring some other possibilities together.

from ipam.

mdepedrof avatar mdepedrof commented on July 1, 2024

Hi!!! thanks for your quickly answer. I downloaded the repo and build the docker images from the engine, lb and ui folders. I have check and the branch is main and its on latest commit.

In order to discard failures on my build automated process, I have clone the repo on new folder and then i run this command inside of the folders engine, lb and ui:

az acr build  --registry “xxxxxx"  --image "ipam-engine:latest"  --file "Dockerfile.deb" .

from ipam.

mdepedrof avatar mdepedrof commented on July 1, 2024

Any idea?

thanks!

from ipam.

DCMattyG avatar DCMattyG commented on July 1, 2024

Hi @crower19, it's really hard to determine what is going on here given that I'm not seeing this in any of my environments.

Could we perhaps have a live call to work through this together sometime this week or next?

Please drop me an email at [email protected] and let's setup some time to figure out what's going on here.

from ipam.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.