다음을 통해 공유


빠른 시작 - 워크로드 샘플 실행

이 빠른 시작 가이드에서는 샘플 워크로드를 사용하여 Microsoft Fabric 워크로드를 만들고 실행하는 방법을 보여 줍니다.

This sample demonstrates storing and reading data from and to lakehouses. To do that, you need to generate tokens for Azure Storage service in On-Behalf-Of (OBO) flows.

Prerequisites

1단계: Azure Storage 설정

Azure Storage를 사용하려면 동의가 필요합니다. 이 단계에서는 Azure Storage가 테넌트에 설치되어 있는지 확인하고, 설치되어 있지 않으면 설치합니다.

  1. Log into the Azure portal.

  2. Search for Enterprise applications and select it from the search results.

  3. From the Application type filter dropdown list, select All applications and then select Apply.

  4. In the Search by application name or object ID search box, enter Azure Storage.

  5. Azure Storage가 나열되지 않은 경우, 관리자 권한으로 PowerShell을 열고 다음 명령을 실행합니다.

    Install-Module az
    Import-Module az
    Connect-AzureAD
    New-AzureADServicePrincipal -AppId e406a681-f3d4-42a8-90b6-c2b029497af1
    

2단계: 샘플 다운로드

샘플 워크로드를 실행하려면 다음 단계를 수행합니다.

  1. Navigate to the Sample Project Directory repository, select Code and then select Download ZIP.

  2. zip 파일의 내용을 컴퓨터의 로컬 디렉터리에 추출합니다. A new folder called Microsoft-Fabric-workload-development-sample-main is created.

3단계: 테넌트 ID 가져오기

테넌트 ID를 가져오려면 다음 단계를 수행합니다.

  1. 워크로드를 만드는 데 사용할 사용자로 Fabric에 로그인합니다.

  2. Select the Help & Support (the question mark ?) and then select About.

  3. From the Tenant URL, copy the string of numbers and letters after https://app.powerbi.com/home?ctid=. 테넌트 ID입니다.

    예를 들어 테넌트 URL이 https://app.powerbi.com/home?ctid=bbbbcccc-1111-dddd-2222-eeee3333ffff경우 테넌트 ID는 bbbbcccc-1111-dddd-2222-eeee3333ffff.

4단계: Microsoft Entra ID 애플리케이션 만들기

제공된 스크립트를 사용하여 Azure Entra ID 애플리케이션을 만듭니다.

  1. Open PowerShell.

  2. Navigate to Microsoft-Fabric-workload-development-sample-main\Microsoft-Fabric-workload-development-sample-main\Authentication folder.

  3. 이 단계에서 명령을 실행합니다. 인증하려면 사용 중인 사용자의 자격 증명을 사용하여 워크로드를 만듭니다.

    .\CreateDevAADApp.ps1 -applicationName "myWorkloadApp" -workloadName "Org.WorkloadSample" -tenantId "<your-tenant-id>"
    
  4. 스크립트의 출력에서 다음 세부 정보를 복사합니다.

    • ApplicationIdUri / Audience - For example, api://localdevinstance/<your-tenant-id>/Org.WorkloadSample/OyR
    • RedirectURI - http://localhost:60006/close
    • 애플리케이션 ID - 예를 들어 00001111-aaaa-2222-bbbb-3333cccc4444
    • secret - For example, aaaaa~0b0b0b0b0b0b0b0b0b.bb~2d2d2d2d2d2d2

5단계: .env.dev 파일 업데이트

  1. Navigate to the Microsoft-Fabric-workload-development-sample-main folder and navigate to the Frontend folder.

  2. 텍스트 편집기를 사용하여 파일 .env.dev 엽니다.

  3. 다음 세부 정보를 입력합니다.

    • DEV_AAD_CONFIG_AUDIENCE= - The audience from the output of the script. 예를 들어 DEV_AAD_CONFIG_AUDIENCE=api://localdevinstance/<your-tenant-id>/Org.WorkloadSample/OyR.
    • DEV_AAD_CONFIG_APPID= - 스크립트 출력의 애플리케이션 ID입니다. 예를 들어 DEV_AAD_CONFIG_APPID=00001111-aaaa-2222-bbbb-3333cccc4444.
  4. .env.dev 파일을 저장합니다.

6단계: 프런트 엔드 실행

PowerShell 열고 다음을 수행합니다.

  1. Navigate to Microsoft-Fabric-workload-development-sample-main\Microsoft-Fabric-workload-development-sample-main\Frontend folder.

  2. 종속성을 설치하려면 npm install명령을 실행합니다. node_modules라는 새 폴더가 만들어집니다.

  3. 프런트 엔드를 시작하려면 npm start명령을 실행합니다.

    Once the frontend runs successfully, you see a message that includes successfully in PowerShell, and your web browser will open with the http://localhost:60006/ URL. 프런트엔드가 성공적으로 실행되고 있는지 확인하려면, 브라우저에서 http://localhost:60006/manifests페이지로 이동합니다.

7단계: Visual Studio 2022 열기

이 빠른 시작의 나머지 단계는 Visual Studio 2022에서 수행됩니다. 이 단계를 사용하여 Visual Studio 2022에서 솔루션을 엽니다. 솔루션이 열려 있으면 나머지 단계를 완료하는 동안 Visual Studio를 열어 둘 수 있습니다.

  1. Navigate to the Microsoft-Fabric-workload-development-sample-main folder and navigate to the Backend folder.

  2. In Visual Studio 2022, open the file Fabric_Extension_BE_Boilerplate.sln.

8단계: 백 엔드 파일 업데이트

  1. 솔루션 탐색기에서 Fabric_Extension_BE_Boilerplate 을 확장하고, appsettings.json 파일을 열어 다음 필드를 채우세요.

    • PublisherTenantId - 귀하의 테넌트 ID입니다. 예를 들어 PublisherTenantId: "bbbbcccc-1111-dddd-2222-eeee3333ffff".
    • ClientId - The Application Id from the output of the script. 예를 들어 ClientId: "00001111-aaaa-2222-bbbb-3333cccc4444".
    • ClientSecret - The secret from the output of the script. 예를 들어 ClientSecret: "aaaaa~0b0b0b0b0b0b0b0b0b.bb~2d2d2d2d2d2d2".
    • Audience - The ApplicationIdUri / Audience from the output of the script. 예를 들어 Audience: "api://localdevinstance/<your-tenant-id>/Org.WorkloadSample/OyR".
  2. appsettings.json 파일을 저장합니다.

  3. 솔루션 탐색기에서 패키지 > 매니페스트 폴더를 확장하고, WorkloadManifest.xml 파일을 열어 다음 필드를 채우세요.

    • AppID - Your App ID. 예를 들어 <AppId>00001111-aaaa-2222-bbbb-3333cccc4444</AppId>.
    • RedirectUri - Your redirect URI. <RedirectUri>http://localhost:60006/close</RedirectUri>.
    • ResourceId - The ApplicationIdUri / Audience from the output of the script. 예를 들어 <ResourceId>api://localdevinstance/<your-tenant-id>/Org.WorkloadSample/OyR</ResourceId>.
  4. WorkloadManifest.xml 파일을 저장합니다.

9단계: NuGet 패키지 빌드

  1. Visual Studio 메뉴에서 빌드 > 빌드 솔루션를 선택합니다. 빌드는 프런트 엔드 및 백 엔드 XML 및 JSON 파일을 포함하는 NuGet 패키지를 만듭니다.

  2. From the Output window, take the path that is listed in the row starting with 1>Successfully created package.

    이 출력 예제에서는 경로가 굵게 강조 표시됩니다. 1>Successfully created package C:\Dev kit\Microsoft-Fabric-workload-development-sample-main\Microsoft-Fabric-workload-development-sample-main\Backend\src\bin\Debug\ManifestPackage.1.0.0.nupkg.

10단계: 로컬 드라이브에 복사

  1. 솔루션 탐색기에서 workload-dev-mode.json 파일을 엽니다.

  2. 다음 필드를 입력합니다.

    • WorkspaceGuid - Your Fabric workspace ID.

      패브릭에서 사용 중인 작업 영역으로 이동하여 작업 영역 ID를 찾을 수 있습니다. Once you're in the workspace, from the URL copy the string of numbers and letters after https://app.powerbi.com/groups/. The workspace ID ends with a forward slash. 예를 들어 작업 영역 URL이 https://app.powerbi.com/groups/bbbbcccc-1111-dddd-2222-eeee3333ffff/list?experience=power-bi이면 작업 영역 ID는 bbbbcccc-1111-dddd-2222-eeee3333ffff입니다.

    • ManifestPackageFilePath - 매니페스트 패키지 파일의 경로(9단계)입니다. For example, "ManifestPackageFilePath": "C:\Dev kit\Microsoft-Fabric-workload-development-sample-main\Microsoft-Fabric-workload-development-sample-main\Backend\src\bin\Debug\ManifestPackage.1.0.0.nupkg",

  3. workload-dev-mode.json 파일을 저장합니다.

  4. workload-dev-mode.json 파일을 src/Config에서 C:\로 복사합니다.

Step 11: Run the boilerplate

  1. Visual Studio 2022의 메뉴에서 IIS Express 옆에 있는 화살표를 선택한 다음 드롭다운 메뉴에서 Boilerplate를 선택합니다.

  2. Select Boilerplate and authorize Visual Studio's requests. 실행 중인 솔루션에 대한 정보가 포함된 명령 프롬프트가 열립니다.

12단계: DevGateway 파일 실행

  1. PowerShell 열고 DevGateway 폴더로 이동합니다.

  2. PowerShell에서 .\Microsoft.Fabric.Workload.DevGateway.exe명령을 실행합니다. When the output shows the message info: DevGateway started. 워크로드가 성공적으로 실행되고 있습니다.

13단계: Fabric에서 샘플 워크로드 열기

Tip

패브릭에서 샘플 워크로드를 열려면 세 개의 PowerShell 창을 열고 실행해야 합니다.

  • 프런트엔드 - npm start에서 설명한 대로 명령 가 실행 중인 PowerShell입니다.
  • Boilerplate - A Powershell running the boilerplate, as described in Step 11.
  • DevGateway - A Powershell running DevGateway.exe, as described in Step 12.
  1. Microsoft Fabric을 엽니다.

  2. 개발에 사용하는 작업 영역으로 이동합니다.

  3. Select New item.

  4. Open Sample Item (preview).