Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions tools/DevGatewayContainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -22,31 +22,54 @@ 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
<AADApp>
<AppId>00000000-0000-0000-0000-0f433e979e6c</AppId> <!-- Your application ID -->
<RedirectUri>http://localhost:60006/close</RedirectUri> <!-- Your application Redirect URI -->
<ResourceId>api://localdevinstance/TENANTID/Org.WorkloadSample/QJ</ResourceId> <!-- Your application Resource Id-->
</AADApp>
```

### 5. Build and run the Docker Image

Run the following command to build and run the Docker image:

```sh
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`.
1 change: 1 addition & 0 deletions tools/DevGatewayContainer/sample.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ENTRA_TENANT_ID=<Azure Tenant Id>
WORKSPACE_GUID=<Fabric Workspace Id>
MANIFEST_PACKAGE_FILE_PATH=</path/to/manifest/nugget/file>/ManifestPackage.1.0.0.nupkg
CAPACITY_GUID=<Capacity id>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't need capacity guid, workspace guid should be sufficent.

LOCAL_BACKEND_PORT=5000