From 27593088ab33dbcb15afdc4e6edb12b7cd1caae3 Mon Sep 17 00:00:00 2001 From: Pwd9000-ML Date: Tue, 23 Jan 2024 00:17:36 +0000 Subject: [PATCH] test --- tests/auto_test1/README.md | 35 +-- tests/auto_test1/testing.auto.tfvars | 103 +-------- tests/auto_test1/variables.tf | 307 +-------------------------- 3 files changed, 3 insertions(+), 442 deletions(-) diff --git a/tests/auto_test1/README.md b/tests/auto_test1/README.md index fbc8181..944c1bc 100644 --- a/tests/auto_test1/README.md +++ b/tests/auto_test1/README.md @@ -1,39 +1,6 @@ # Automated Test 1 -This automated test will create a Privately hosted instance of ChatGPT on Azure OpenAI. This test will create and test the following: - -## Prerequisites - -- Create a resource group to deploy all resources for the solution. - -## Create OpenAI Service - -1. Create an Azure Key Vault to store the OpenAI account details. -2. Create an OpenAI service account. - Other options include: - - Specify an already existing OpenAI service account to use. - -3. Create OpenAI language model deployments on the OpenAI service. (e.g. GPT-3, GPT-4, etc.) -4. Store the OpenAI account and model details in the key vault for consumption. - -## Create a container app ChatBot UI linked with OpenAI service hosted in Azure - -1. Create a container app log analytics workspace (to link with container app). -2. Create a container app environment. -3. Create a container app instance hosting chatbot-ui from image/container. -4. Link chatbot-ui with corresponding OpenAI account and language model deployment. -5. Grant the container app access to the key vault to retrieve secrets (optional). - -## Front solution with an Azure front door (optional) - -1. Deploy Azure Front Door to front solution with CDN + WAF. -2. Setup a new custom domain with AFD managed certificate. (optional) - Other options include: - - Specify an already existing DNZ zone to use. (e.g. mydomain.com) - - **Note:** Remember to add the zone to your DNS registrar as the module creates a TXT auth. (Certificates fully managed by AFD) - -3. Create a CNAME and TXT record in the custom DNS zone. -4. Setup and apply an AFD WAF policy with `IPAllow list` for allowed IPs to connect using a custom rule. (Optional) +This automated test will create a Privately hosted instance of ChatGPT on Azure OpenAI service.: ## Requirements diff --git a/tests/auto_test1/testing.auto.tfvars b/tests/auto_test1/testing.auto.tfvars index 1edcfac..b8b8872 100644 --- a/tests/auto_test1/testing.auto.tfvars +++ b/tests/auto_test1/testing.auto.tfvars @@ -167,105 +167,4 @@ libre_app_allow_registration = true libre_app_allow_social_login = false libre_app_allow_social_registration = false libre_app_jwt_secret = null -libre_app_jwt_refresh_secret = null - -# ### CDN - Front Door ### -# create_front_door_cdn = true -# create_dns_zone = true #Set to false if you already have a DNS zone, remember to add this DNS zone to your domain registrar - -# # CDN PROFILE -# cdn_profile_name = "cdnfd" -# cdn_sku_name = "Standard_AzureFrontDoor" - -# # CDN ENDPOINTS -# cdn_endpoint = { -# name = "PrivateGPT" -# enabled = true -# } - -# # CDN ORIGIN GROUPS -# cdn_origin_groups = [ -# { -# name = "PrivateGPTOriginGroup" -# session_affinity_enabled = false -# restore_traffic_time_to_healed_or_new_endpoint_in_minutes = 5 -# health_probe = { -# interval_in_seconds = 100 -# path = "/" -# protocol = "Https" -# request_type = "HEAD" -# } -# load_balancing = { -# additional_latency_in_milliseconds = 50 -# sample_size = 4 -# successful_samples_required = 3 -# } -# } -# ] - -# # GPT CDN ORIGIN -# cdn_gpt_origin = { -# name = "PrivateGPTOrigin" -# origin_group_name = "PrivateGPTOriginGroup" -# enabled = true -# certificate_name_check_enabled = true -# http_port = 80 -# https_port = 443 -# priority = 1 -# weight = 1000 -# } - -# # CDN ROUTE RULES -# cdn_route = { -# name = "PrivateGPTRoute" -# enabled = true -# forwarding_protocol = "HttpsOnly" -# https_redirect_enabled = true -# patterns_to_match = ["/*"] -# supported_protocols = ["Http", "Https"] -# cdn_frontdoor_origin_path = null -# cdn_frontdoor_rule_set_ids = null -# link_to_default_domain = false -# cache = { -# query_string_caching_behavior = "IgnoreQueryString" -# query_strings = [] -# compression_enabled = false -# content_types_to_compress = [] -# } -# } - -# # CDN WAF Config -# cdn_firewall_policy = { -# create_waf = true -# name = "PrivateGPTWAF" -# enabled = true -# mode = "Prevention" -# custom_block_response_body = "WW91ciByZXF1ZXN0IGhhcyBiZWVuIGJsb2NrZWQu" -# custom_block_response_status_code = 403 -# custom_rules = [ -# { -# name = "AllowedIPs" -# action = "Block" -# enabled = true -# priority = 100 -# type = "MatchRule" -# rate_limit_duration_in_minutes = 1 -# rate_limit_threshold = 10 -# match_conditions = [ -# { -# negation_condition = true -# match_values = ["86.106.76.66"] #Allowd IPs (Replace with your IP Allow list) -# match_variable = "RemoteAddr" -# operator = "IPMatch" -# transforms = [] -# } -# ] -# } -# ] -# } - -# # CDN Security Policy Config -# cdn_security_policy = { -# name = "PrivateGPTSecurityPolicy" -# patterns_to_match = ["/*"] -# } \ No newline at end of file +libre_app_jwt_refresh_secret = null \ No newline at end of file diff --git a/tests/auto_test1/variables.tf b/tests/auto_test1/variables.tf index c8551e4..5a7283d 100644 --- a/tests/auto_test1/variables.tf +++ b/tests/auto_test1/variables.tf @@ -607,309 +607,4 @@ variable "libre_app_jwt_refresh_secret" { description = "JWT Refresh Secret" default = null sensitive = true -} - - -# LibreChat App Service App Settings - -# # DNS zone # -# variable "create_dns_zone" { -# description = "Create a DNS zone for the CDN profile. If set to false, an existing DNS zone must be provided." -# type = bool -# default = false -# } - -# variable "custom_domain_config" { -# type = object({ -# zone_name = string -# host_name = string -# ttl = optional(number, 3600) -# tls = optional(list(object({ -# certificate_type = optional(string, "ManagedCertificate") -# minimum_tls_version = optional(string, "TLS12") -# }))) -# }) -# default = { -# zone_name = "mydomain7335.com" -# host_name = "PrivateGPT" -# ttl = 3600 -# tls = [{ -# certificate_type = "ManagedCertificate" -# minimum_tls_version = "TLS12" -# }] -# } -# description = <<-DESCRIPTION -# type = object({ -# zone_name = (Required) The name of the DNS zone to create the CNAME and TXT record in for the CDN Front Door Custom domain. -# host_name = (Required) The host name of the DNS record to create. (e.g. Contoso) -# ttl = (Optional) The TTL of the DNS record to create. (e.g. 3600) -# tls = optional(list(object({ -# certificate_type = (Optional) Defines the source of the SSL certificate. Possible values include 'CustomerCertificate' and 'ManagedCertificate'. Defaults to 'ManagedCertificate'. -# NOTE: It may take up to 15 minutes for the Front Door Service to validate the state and Domain ownership of the Custom Domain. -# minimum_tls_version = (Optional) TLS protocol version that will be used for Https. Possible values include TLS10 and TLS12. Defaults to TLS12. -# })))) -# }) -# DESCRIPTION -# } - -# # Front Door # -# variable "create_front_door_cdn" { -# description = "Create a Front Door profile." -# type = bool -# default = false -# } - -# variable "cdn_profile_name" { -# description = "The name of the CDN profile to create." -# type = string -# default = "example-cdn-profile" -# } - -# variable "cdn_sku_name" { -# description = "Specifies the SKU for the CDN Front Door Profile. Possible values include 'Standard_AzureFrontDoor' and 'Premium_AzureFrontDoor'." -# type = string -# default = "Standard_AzureFrontDoor" -# } - -# variable "cdn_endpoint" { -# type = object({ -# name = string -# enabled = optional(bool, true) -# }) -# default = { -# name = "PrivateGPT" -# enabled = true -# } -# description = <