From c3bc558e922376c8f235fb2170fa2f119394d8cf Mon Sep 17 00:00:00 2001 From: Kingfard Date: Tue, 20 May 2025 10:50:04 -0500 Subject: [PATCH] Update README and sample.env for improved setup instructions and new variable --- tools/DevGatewayContainer/README.md | 45 +++++++++++++++++++++------- tools/DevGatewayContainer/sample.env | 1 + 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/tools/DevGatewayContainer/README.md b/tools/DevGatewayContainer/README.md index 8f6fe2d..3d2fd59 100644 --- a/tools/DevGatewayContainer/README.md +++ b/tools/DevGatewayContainer/README.md @@ -10,7 +10,7 @@ Before you begin, ensure you have the following installed: - Docker - Docker Compose ->For developers using Apple Silicon processors(M-Series), make sure you enable `Use Rosetta for x86/amd64 on Apple Silicon` in Docker. +> For developers using Apple Silicon processors(M-Series), make sure you enable `Use Rosetta for x86/amd64 on Apple Silicon` in Docker. See [here](https://docs.docker.com/desktop/settings-and-maintenance/settings/#general) for more details. ## Getting Started @@ -22,15 +22,37 @@ Copy the `sample.env` file, rename it to `.env`, update the values as needed and cp sample.env .env ``` -| Variable Name | Description | -|----------------------------|-----------------------------------------------------------------------------| -| `ENTRA_TENANT_ID` | Fabric instance's Tenant ID | -| `WORKSPACE_GUID` | User's Workspace ID | -| `MANIFEST_PACKAGE_FILE_PATH` | Path to the Fabric workload backend `ManifestPackage.1.0.0.nupkg` build file. | -| `LOCAL_BACKEND_PORT` | Fabric workload backend port. Default: `5000` | -| `LOG_LEVEL` | DevGateway application log level. Default: `Information` | +| Variable Name | Description | +| ---------------------------- | -------------------------------------------------------------------------------------- | +| `ENTRA_TENANT_ID` | Fabric instance's Tenant ID | +| `WORKSPACE_GUID` | User's Workspace ID | +| `MANIFEST_PACKAGE_FILE_PATH` | **Full Path** to the Fabric workload backend `ManifestPackage.1.0.0.nupkg` build file. Example: `/Users/Username/Microsoft-Fabric-workload-development-sample/Backend/src/bin/Debug/ManifestPackage.1.0.0.nupkg` | +| `LOCAL_BACKEND_PORT` | Fabric workload backend port. Default: `5000` | +| `LOG_LEVEL` | DevGateway application log level. Default: `Information` | -### 2. Build and run the Docker Image +### 2. Create an App registration + +Use this script ![](../../Authentication/CreateDevAADApp.ps1) to create an App Registration. + +> You will need to create a client secret for the App Registration + +### 3. Update App Setting.json + +Update the `PublisherTenantId`, `ClientId`, `ClientSecret` and `Audience` in the ![Backend's appsettings.json](../../Backend/src/appsettings.json) with values from the App Registration. + +### 4. Update the workload.xml + +Update the following fields in ![WorkloadManifest.xml](../../Backend/src/Packages/manifest/WorkloadManifest.xml) + +```xml + + 00000000-0000-0000-0000-0f433e979e6c + http://localhost:60006/close + api://localdevinstance/TENANTID/Org.WorkloadSample/QJ + +``` + +### 5. Build and run the Docker Image Run the following command to build and run the Docker image: @@ -38,15 +60,16 @@ Run the following command to build and run the Docker image: docker compose up ``` -### 3. Authenticate to the DevGateway +### 6. Authenticate to the DevGateway Once the container is up and running, follow the prompts in the terminal to authenticate to Fabric. -### 4. Shutting things down +### 7. Shutting things down Stop the running container and remove containers and networks by running the command below. ```bash docker compose down ``` + However, since the terminal is attached to the running container, you have to open a new terminal from the `DevGateway` folder to execute the command. You can also shutdown the container gracefully with `Ctrl + C`. \ No newline at end of file diff --git a/tools/DevGatewayContainer/sample.env b/tools/DevGatewayContainer/sample.env index 8ad6233..e82c840 100644 --- a/tools/DevGatewayContainer/sample.env +++ b/tools/DevGatewayContainer/sample.env @@ -1,4 +1,5 @@ ENTRA_TENANT_ID= WORKSPACE_GUID= MANIFEST_PACKAGE_FILE_PATH=/ManifestPackage.1.0.0.nupkg +CAPACITY_GUID= LOCAL_BACKEND_PORT=5000 \ No newline at end of file