Tessferrandez/fix more doc issues (#1013)

* fix post workspace-template screenshot
* fix json in workspace creation sample
* add guacamole image tag to docs
* clean up register bundles
This commit is contained in:
Tess Ferrandez 2021-10-08 13:09:18 +02:00 коммит произвёл GitHub
Родитель 6eb1ca177f
Коммит 919a6947e3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 51 добавлений и 48 удалений

Двоичные данные
docs/assets/post-template.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 17 KiB

После

Ширина:  |  Высота:  |  Размер: 9.2 KiB

Просмотреть файл

@ -4,39 +4,45 @@ To enable users to deploy Workspaces, Workspace Services or User Resources, we n
## Porter Bundles
Templates are encapsulated in [Porter](https://porter.sh) bundles. Porter bundles can either be registered interactively using the Swagger UI or automatically using the utility script (useful in CI/CD scenarios). The script is provided at `/devops/scripts/publish_register_bundle.sh`.
Templates are encapsulated in [Porter](https://porter.sh) bundles. Porter bundles can either be registered interactively using the Swagger UI or automatically using the `/devops/scripts/publish_register_bundle.sh` script (useful in CI/CD scenarios).
The script can also be used to generate the payload required by the API without actually calling the API. The script carries out the following actions:
This script can also be used to generate the payload required by the API without actually calling the API.
It carries out the following actions:
1. Publishes the bundle to the Azure Container Registry specified.
1. Extracts the parameters from the bundle using `porter explain`.
### Registration using Swagger UI
1. We will use the utility script to generate the payload. The script needs to be executed from within the bundle directory, for example `/templates/workspaces/base/`. This script can be used as follows:
1. Build the porter bundle
```cmd
porter build
```
1. Use the utility script to generate the payload. The script needs to be executed from within the bundle directory, for example `/templates/workspaces/base/`
```cmd
../../../devops/scripts/publish_register_bundle.sh -r <acr_name> -i -t workspace
```
Copy the resulting payload json.
Copy the resulting JSON payload.
1. Navigate to the Swagger UI at `/docs`
1. Log into the Swagger UI by clicking `Authorize`, then `Authorize` again. You will be redirected to the login page.
1. Once logged in. Click `Try it out` on the `POST` `/api/workspace-templates` operation:
1. Navigate to the Swagger UI at `/api/docs`
1. Log into the Swagger UI using `Authorize`
1. Click `Try it out` on the `POST` `/api/workspace-templates` operation:
![Post Workspace Template](../assets/post-template.png)
![Post Workspace Template](../assets/post-template.png)
1. Paste the payload json generated earlier into the `Request body` field, then click `Execute`. Review the server response.
1. To verify registration of the template do `GET` operation on `/api/workspace-templates`. The name of the template should now be listed.
1. Verify the template registration using the `GET` operation on `/api/workspace-templates`. The name of the template should now be listed.
### Registration using script
To use the script to automatically register the template, a user that does not require an interactive login must be created as per the [e2e test user documentation here](../tre-admins/auth.md#tre-e2e-test).
To use the script to automatically register the template, you must create a user that does not require an interactive login per the [e2e test user documentation here](../tre-admins/auth.md#tre-e2e-test).
The script needs to be executed from within the bundle directory, for example `/templates/workspaces/base/`.
This script can be used as follows:
The script needs to be executed from within the bundle directory, for example `/templates/workspaces/base/`
```cmd
Usage: ../../../devops/scripts/publish_register_bundle.sh [-u --tre_url] [-c --current] [-i --insecure]

Просмотреть файл

@ -37,15 +37,11 @@ Go to ``azure_tre_fqdn/docs`` and use POST /api/workspaces with the sample body
```json
{
"displayName": "manual-from-swagger",
"description": "workspace for team X",
"workspaceType": "tre-workspace-base",
"parameters": {},
"authConfig": {
"provider": "AAD",
"data": {
"app_id": "app id created above"
}
"properties": {
"display_name": "manual-from-swagger",
"description": "workspace for team X",
"app_id": "app id created above"
}
}
```

Просмотреть файл

@ -22,6 +22,7 @@ Service Tags:
| ------------------------- | ----------- |
| `ID` | A GUID to identify the workspace service. The last 4 characters of this `ID` can be found in the resource names of the workspace service resources. |
| `WORKSPACE_ID` | The GUID identifier used when deploying the base workspace bundle. |
| `GUACAMOLE_IMAGE_TAG` | The tag of the Guacamole Image to use - the tag will be the version (you can find the version in `templates\workspace\services\guacamole\version.txt`) |
1. Build and install the Guacamole Service bundle

Просмотреть файл

@ -24,39 +24,39 @@ URLs:
1. Create a copy of `templates/workspace_services/innereye_deeplearning/.env.sample` with the name `.env` and update the variables with the appropriate values.
| Environment variable name | Description |
| ------------------------- | ----------- |
| `ID` | A GUID to identify the workspace service. The last 4 characters of this `ID` can be found in the resource names of the workspace service resources. |
| `WORKSPACE_ID` | The GUID identifier used when deploying the base workspace bundle. |
| `INFERENCE_SP_CLIENT_ID` | Service principal client ID used by the inference service to connect to Azure ML. Use the output from the step above. |
| `INFERENCE_SP_CLIENT_SECRET` | Service principal client secret used by the inference service to connect to Azure ML. Use the output from the step above. |
| Environment variable name | Description |
| ------------------------- | ----------- |
| `ID` | A GUID to identify the workspace service. The last 4 characters of this `ID` can be found in the resource names of the workspace service resources. |
| `WORKSPACE_ID` | The GUID identifier used when deploying the base workspace bundle. |
| `INFERENCE_SP_CLIENT_ID` | Service principal client ID used by the inference service to connect to Azure ML. Use the output from the step above. |
| `INFERENCE_SP_CLIENT_SECRET` | Service principal client secret used by the inference service to connect to Azure ML. Use the output from the step above. |
1. Build and install the InnerEye Deep Learning Service bundle
```cmd
make porter-build DIR=./templates/workspace_services/innereye
make porter-publish DIR=./templates/workspace_services/innereye
make porter-install DIR=./templates/workspace_services/innereye
```
```cmd
make porter-build DIR=./templates/workspace_services/innereye
make porter-publish DIR=./templates/workspace_services/innereye
make porter-install DIR=./templates/workspace_services/innereye
```
## Running the InnerEye HelloWorld on AML Compute Cluster
1. Log onto a VM in the workspace, open PowerShell and run:
```cmd
git clone https://github.com/microsoft/InnerEye-DeepLearning
cd InnerEye-DeepLearning
git lfs install
git lfs pull
conda init
conda env create --file environment.yml
```
```cmd
git clone https://github.com/microsoft/InnerEye-DeepLearning
cd InnerEye-DeepLearning
git lfs install
git lfs pull
conda init
conda env create --file environment.yml
```
1. Restart PowerShell and navigate to the "InnerEye-DeepLearning" folder
```cmd
conda activate InnerEye
```
```cmd
conda activate InnerEye
```
1. Open Azure Storage Explorer and connect to your Storage Account using name and access key
1. On the storage account create a container with name ```datasets``` and a folder named ```hello_world```
@ -79,11 +79,11 @@ The workspace service provisions an App Service Plan and an App Service for host
1. Log onto a VM in the workspace and run:
```cmd
git clone https://github.com/microsoft/InnerEye-Inference
cd InnerEye-Inference
az webapp up --name <inference-app-name> -g <resource-group-name>
```
```cmd
git clone https://github.com/microsoft/InnerEye-Inference
cd InnerEye-Inference
az webapp up --name <inference-app-name> -g <resource-group-name>
```
1. Create a new container in your storage account for storing inference images called `inferencedatastore`.
1. Create a new folder in that container called `imagedata`.