Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Pwd9000-ML committed Jan 23, 2024
1 parent de8b912 commit 2759308
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 442 deletions.
35 changes: 1 addition & 34 deletions tests/auto_test1/README.md
Original file line number Diff line number Diff line change
@@ -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.:

<!-- BEGIN_TF_DOCS -->
## Requirements
Expand Down
103 changes: 1 addition & 102 deletions tests/auto_test1/testing.auto.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ["/*"]
# }
libre_app_jwt_refresh_secret = null
Loading

0 comments on commit 2759308

Please sign in to comment.