diff --git a/azure.yaml b/azure.yaml index c483ddedd..b6a896bd5 100644 --- a/azure.yaml +++ b/azure.yaml @@ -40,28 +40,24 @@ hooks: Yellow='\033[1;33m' NC='\033[0m' - echo "" - echo "${Yellow}===============================================================" - echo "${Green} POST-DEPLOYMENT STEPS (Bash) " - echo "${Yellow}===============================================================${NC}" - echo "" + printf "\n" + printf "${Yellow}===============================================================\n" + printf "${Green} POST-DEPLOYMENT STEPS (Bash)\n" + printf "${Yellow}===============================================================${NC}\n\n" - echo " STEP 1: Upload Team Configurations to Cosmos DB" - echo " 👉 Run the following command in Bash:" - echo " ${Blue}bash infra/scripts/upload_team_config.sh${NC}" - echo "" + printf " STEP 1: Upload Team Configurations to Cosmos DB\n" + printf " 👉 Run the following command in Bash:\n" + printf " ${Blue}bash infra/scripts/upload_team_config.sh${NC}\n\n" - echo " STEP 2: Index Sample Data into Azure Search" - echo " 👉 Run the following command in Bash:" - echo " ${Blue}bash infra/scripts/process_sample_data.sh${NC}" - echo "" + printf " STEP 2: Index Sample Data into Azure Search\n" + printf " 👉 Run the following command in Bash:\n" + printf " ${Blue}bash infra/scripts/process_sample_data.sh${NC}\n\n" - echo "💡 Alternatively, you can run above BOTH steps together using:" - echo " ${Blue}bash infra/scripts/team_config_and_data.sh${NC}" - echo "" + printf "💡 Alternatively, you can run above BOTH steps together using:\n" + printf " ${Blue}bash infra/scripts/team_config_and_data.sh${NC}\n\n" - echo "🌐 Access your deployed Frontend application at:" - echo " ${Blue}https://$webSiteDefaultHostname${NC}" - echo "" + printf "🌐 Access your deployed Frontend application at:\n" + printf " ${Blue}https://%s${NC}\n\n" "$webSiteDefaultHostname" + shell: sh interactive: true diff --git a/azure_custom.yaml b/azure_custom.yaml index c6cfd8be8..4335a9e52 100644 --- a/azure_custom.yaml +++ b/azure_custom.yaml @@ -77,28 +77,23 @@ hooks: Yellow='\033[1;33m' NC='\033[0m' - echo "" - echo "${Yellow}===============================================================" - echo "${Green} POST-DEPLOYMENT STEPS (Bash) " - echo "${Yellow}===============================================================${NC}" - echo "" + printf "\n" + printf "${Yellow}===============================================================\n" + printf "${Green} POST-DEPLOYMENT STEPS (Bash)\n" + printf "${Yellow}===============================================================${NC}\n\n" - echo " STEP 1: Upload Team Configurations to Cosmos DB" - echo " 👉 Run the following command in Bash:" - echo " ${Blue}bash infra/scripts/upload_team_config.sh${NC}" - echo "" + printf " STEP 1: Upload Team Configurations to Cosmos DB\n" + printf " 👉 Run the following command in Bash:\n" + printf " ${Blue}bash infra/scripts/upload_team_config.sh${NC}\n\n" - echo " STEP 2: Index Sample Data into Azure Search" - echo " 👉 Run the following command in Bash:" - echo " ${Blue}bash infra/scripts/process_sample_data.sh${NC}" - echo "" + printf " STEP 2: Index Sample Data into Azure Search\n" + printf " 👉 Run the following command in Bash:\n" + printf " ${Blue}bash infra/scripts/process_sample_data.sh${NC}\n\n" - echo "💡 Alternatively, you can run above BOTH steps together using:" - echo " ${Blue}bash infra/scripts/team_config_and_data.sh${NC}" - echo "" + printf "💡 Alternatively, you can run above BOTH steps together using:\n" + printf " ${Blue}bash infra/scripts/team_config_and_data.sh${NC}\n\n" - echo "🌐 Access your deployed Frontend application at:" - echo " ${Blue}https://$webSiteDefaultHostname${NC}" - echo "" + printf "🌐 Access your deployed Frontend application at:\n" + printf " ${Blue}https://%s${NC}\n\n" "$webSiteDefaultHostname" shell: sh interactive: true \ No newline at end of file diff --git a/infra/main.bicep b/infra/main.bicep index c16f622e8..c268b51f6 100644 --- a/infra/main.bicep +++ b/infra/main.bicep @@ -123,11 +123,11 @@ param enablePrivateNetworking bool = false @secure() @description('Optional. The user name for the administrator account of the virtual machine. Allows to customize credentials if `enablePrivateNetworking` is set to true.') -param virtualMachineAdminUsername string = take(newGuid(), 20) +param virtualMachineAdminUsername string? @description('Optional. The password for the administrator account of the virtual machine. Allows to customize credentials if `enablePrivateNetworking` is set to true.') @secure() -param virtualMachineAdminPassword string = newGuid() +param virtualMachineAdminPassword string? // These parameters are changed for testing - please reset as part of publication @@ -608,8 +608,8 @@ module virtualMachine 'br/public:avm/res/compute/virtual-machine:0.17.0' = if (e computerName: take(virtualMachineResourceName, 15) osType: 'Windows' vmSize: virtualMachineSize - adminUsername: virtualMachineAdminUsername - adminPassword: virtualMachineAdminPassword + adminUsername: virtualMachineAdminUsername ?? 'JumpboxAdminUser' + adminPassword: virtualMachineAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!' patchMode: 'AutomaticByPlatform' bypassPlatformSafetyChecksOnUserSchedule: true maintenanceConfigurationResourceId: maintenanceConfiguration!.outputs.resourceId @@ -1339,8 +1339,19 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = { name: 'AZURE_AI_MODEL_DEPLOYMENT_NAME' value: aiFoundryAiServicesModelDeployment.name } + { + name: 'AZURE_BASIC_LOGGING_LEVEL' + value: 'INFO' + } + { + name: 'AZURE_PACKAGE_LOGGING_LEVEL' + value: 'WARNING' + } + { + name: 'AZURE_LOGGING_PACKAGES' + value: '' + } ] - } ] secrets: [ @@ -1500,9 +1511,6 @@ module webSite 'modules/web-sites.bicep' = { WEBSITES_CONTAINER_START_TIME_LIMIT: '1800' // 30 minutes, adjust as needed BACKEND_API_URL: 'https://${containerApp.outputs.fqdn}' AUTH_ENABLED: 'false' - AZURE_BASIC_LOGGING_LEVEL: 'INFO' - AZURE_PACKAGE_LOGGING_LEVEL: 'WARNING' - AZURE_LOGGING_PACKAGES: '' } // WAF aligned configuration for Monitoring applicationInsightResourceId: enableMonitoring ? applicationInsights!.outputs.resourceId : null diff --git a/infra/main_custom.bicep b/infra/main_custom.bicep index faf327e4f..8612b9012 100644 --- a/infra/main_custom.bicep +++ b/infra/main_custom.bicep @@ -124,12 +124,11 @@ param enablePrivateNetworking bool = false @secure() @description('Optional. The user name for the administrator account of the virtual machine. Allows to customize credentials if `enablePrivateNetworking` is set to true.') -param virtualMachineAdminUsername string = take(newGuid(), 20) +param virtualMachineAdminUsername string? @description('Optional. The password for the administrator account of the virtual machine. Allows to customize credentials if `enablePrivateNetworking` is set to true.') @secure() -param virtualMachineAdminPassword string = newGuid() - +param virtualMachineAdminPassword string? // These parameters are changed for testing - please reset as part of publication @description('Optional. The Container Registry hostname where the docker images for the backend are located.') @@ -923,8 +922,8 @@ module virtualMachine 'br/public:avm/res/compute/virtual-machine:0.17.0' = if (e computerName: take(virtualMachineResourceName, 15) osType: 'Windows' vmSize: virtualMachineSize - adminUsername: virtualMachineAdminUsername - adminPassword: virtualMachineAdminPassword + adminUsername: virtualMachineAdminUsername ?? 'JumpboxAdminUser' + adminPassword: virtualMachineAdminPassword ?? 'JumpboxAdminP@ssw0rd1234!' patchMode: 'AutomaticByPlatform' bypassPlatformSafetyChecksOnUserSchedule: true maintenanceConfigurationResourceId: maintenanceConfiguration!.outputs.resourceId @@ -1687,6 +1686,18 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = { name: 'AZURE_AI_MODEL_DEPLOYMENT_NAME' value: aiFoundryAiServicesModelDeployment.name } + { + name: 'AZURE_BASIC_LOGGING_LEVEL' + value: 'INFO' + } + { + name: 'AZURE_PACKAGE_LOGGING_LEVEL' + value: 'WARNING' + } + { + name: 'AZURE_LOGGING_PACKAGES' + value: '' + } ] } ] @@ -1856,9 +1867,6 @@ module webSite 'modules/web-sites.bicep' = { //WEBSITES_CONTAINER_START_TIME_LIMIT: '1800' // 30 minutes, adjust as needed BACKEND_API_URL: 'https://${containerApp.outputs.fqdn}' AUTH_ENABLED: 'false' - AZURE_BASIC_LOGGING_LEVEL: 'INFO' - AZURE_PACKAGE_LOGGING_LEVEL: 'WARNING' - AZURE_LOGGING_PACKAGES: '' ENABLE_ORYX_BUILD: 'True' } // WAF aligned configuration for Monitoring diff --git a/src/backend/common/utils/utils_kernel.py b/src/backend/common/utils/utils_kernel.py index 85fc2fac0..aa2d362fc 100644 --- a/src/backend/common/utils/utils_kernel.py +++ b/src/backend/common/utils/utils_kernel.py @@ -9,7 +9,6 @@ from v3.config.agent_registry import agent_registry -logging.basicConfig(level=logging.INFO) # Cache for agent instances by session agent_instances: Dict[str, Dict[str, Any]] = {}