From 0d7da22db9a94a619e6fb79ffe63cced2a4ddf69 Mon Sep 17 00:00:00 2001 From: Gusam Park Date: Thu, 22 Feb 2024 08:12:04 +0900 Subject: [PATCH] Update docs & fix typo error (#25) --- docs/03-aspire-integration.md | 22 +++++++++++++++++++++- docs/04-azure-deployment-aca.md | 22 +++++++++++++++++----- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/docs/03-aspire-integration.md b/docs/03-aspire-integration.md index 7938d2e..09aa8d1 100644 --- a/docs/03-aspire-integration.md +++ b/docs/03-aspire-integration.md @@ -37,6 +37,19 @@ dotnet restore && dotnet build ``` +1. `AspireYouTubeSummariser.ApiApp` 프로젝트에 `appsettings.json` 파일을 2장에서 등록한 OpenAI 정보를 다시 입력합니다. + + ```json + "OpenAI": { + "Endpoint": "{{ Azure OpenAI Proxy Service Endpoint }}", + "ApiKey": "{{ Azure OpenAI Proxy Service Access Code }}", + "DeploymentName": "{{ Azure OpenAI Proxy Service Deployment Name }}" + } + ``` + + > **중요**: `appsettings.json` 파일에 추가한 Azure OpenAI 서비스의 값들은 절대로 GitHub에 커밋하지 마세요. 대신 `appsettings.Development.json` 파일에 추가하세요. `.gitignore` 파일에 이미 `appsettings.Development.json` 파일에 대한 제외 옵션이 추가되어 있습니다. + + ## 03-2: Aspire 프로젝트에 기존 애플리케이션 통합하기 1. 아래 명령어를 차례로 실행시켜 `AspireYouTubeSummariser.AppHost` 프로젝트에 Blazor 프론트엔드 웹 앱과 ASP.NET Core 백엔드 API 앱을 추가합니다. @@ -251,6 +264,13 @@ // 추가 var cache = builder.AddRedisContainer("cache"); + + ... + + // WithReference 추가 + builder.AddProject("webapp") + .WithReference(cache) + .WithReference(apiapp); ``` 1. Solution Explorer에서 `AspireYouTubeSummariser.AppHost` 프로젝트를 선택하고 마우스 오른쪽 버튼을 눌러 디버깅 모드로 실행합니다. @@ -264,7 +284,7 @@ > **중요**: `appsettings.json` 파일에 추가한 Azure OpenAI 서비스의 값들은 절대로 GitHub에 커밋하지 마세요. 대신 `appsettings.Development.json` 또는 `appsettings.Production.json` 파일에 추가하세요. `.gitignore` 파일에 이미 `appsettings.Development.json`과 `appsettings.Production.json` 파일에 대한 제외 옵션이 추가되어 있습니다. -1. `AspireYouTubeSummariser.ApiHost` 프로젝트의 `Program.cs` 파일을 열고 아래와 같이 수정합니다. +1. `AspireYouTubeSummariser.AppHost` 프로젝트의 `Program.cs` 파일을 열고 아래와 같이 수정합니다. ```csharp var builder = DistributedApplication.CreateBuilder(args); diff --git a/docs/04-azure-deployment-aca.md b/docs/04-azure-deployment-aca.md index d18b089..c188cc7 100644 --- a/docs/04-azure-deployment-aca.md +++ b/docs/04-azure-deployment-aca.md @@ -13,10 +13,10 @@ ```bash # Azure Developer CLI login azd auth login --use-device-code=false - + # Azure CLI login az login - + # GitHub CLI login GITHUB_TOKEN= gh auth login @@ -29,10 +29,10 @@ ```bash # Azure Developer CLI azd auth login --check-status - + # Azure CLI az account show - + # GitHub CLI gh auth status ``` @@ -48,6 +48,18 @@ dotnet restore && dotnet build ``` +1. `AspireYouTubeSummariser.AppHost` 프로젝트에 `appsettings.json` 파일을 3장에서 등록한 OpenAI 정보를 다시 입력합니다. + + ```json + "OpenAI": { + "Endpoint": "{{ Azure OpenAI Proxy Service Endpoint }}", + "ApiKey": "{{ Azure OpenAI Proxy Service Access Code }}", + "DeploymentName": "{{ Azure OpenAI Proxy Service Deployment Name }}" + } + ``` + + > **중요**: `appsettings.json` 파일에 추가한 Azure OpenAI 서비스의 값들은 절대로 GitHub에 커밋하지 마세요. 대신 `appsettings.Development.json` 파일에 추가하세요. `.gitignore` 파일에 이미 `appsettings.Development.json` 파일에 대한 제외 옵션이 추가되어 있습니다. + ## 04-3: Azure Developer CLI로 배포 준비하기 1. 아래 명령어를 차례로 실행시켜 배포 환경을 준비합니다. @@ -108,7 +120,7 @@ ```csharp // 수정 전 builder.Services.AddHttpClient(p => p.BaseAddress = new Uri("http://apiapp")); - + // 수정 후 builder.Services.AddHttpClient(p => p.BaseAddress = new Uri("https://apiapp")); ```