-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define JSON object with template information to hold version data #188
Comments
N.B., eventually, we will need two boolean flags per version, one for the TRE Admin and one for the Workspace Admin. The Workspace Admin will be able to change their flag only if the TRE Admin has enabled that version for a workspace (see the Service Catalogue slide deck we discussed recently). This suggests that the
where, for example, the TRE Admin manipulates the first element, and the Workspace Admin manipulates the second element. So in this example, version 1.0.0 is disabled, and only the TRE Admin can enable it. Version 1.2.0 is enabled, and either role can enable/disable it. Version 2.0.0 is allowed by the TRE Admin, but the Workspace Admin has not enabled it for their project. |
To clarify from the Show & Tell, I envision this object being built in the workspace CosmosDB entry when the workspace is created, by trawling the list of ResourceTemplates that are available from CosmosDB. The object should be updated (refreshed) with new versions when the TRE Admin goes into the Configuration tab to configure the set of versions available for each workspace. That's covered in #191, and doesn't need to be done yet. The workflow we discussed, as I understand it, and I'm happy to be corrected, would look like this:
Future enhancements will allow them to choose between version 1.0.0 and 2.0.0 if both are still enabled, but for now, it's enough to deploy the latest active version. Another possible enhancement is for when we start to allow the Workspace Admin to control versions themselves, and that's to do the object refresh when the Workspace Admin goes into the Configuration tab. That's out of scope for this epic, we're only working with the TRE Admin access. [EDIT: This gives the big picture, but this ticket has been down-scoped since I added this bit. Updating the workspace will happen elsewhere.] |
MR USAGE
|
From Teams chat: "all the workspace services" means objects with resourceType "workspace-service" (not "workspace" nor "shared-service"), "their user resources" means resourceType "user-resource" and parentWorkspaceService matches the name of the owning workspace-service |
Updated JSON example structure to match discussion in Teams. Descriptions and title included for editor context, static key names to support query like |
IAM roles - I added id-api-abmstre1 as a User Assigned Managed Identity to my VM, assuming that this would end up integrated with the API eventually, although it has a lot more permissions than needed just for this script. I assigned "Cosmos DB Built-in Data Contributor" to myself as a user to enable queries in the Portal Data Explorer. az cosmosdb sql role definition list --resource-group rg-abmstre1 --account-name cosmos-abmstre1 (Where --principal-id "9d6f3297-af5f-4cc9-8524-c8383edc6ecd" is from looking up myself on |
The CosmosDB network settings I allowed access from the IP address of my VM, and for the corporate IP ranges my laptop appeared in for the Portal CosmosDB Data Explorer. (There is a group listed on the CosmosDB controls for "Portal Middleware", but Data Explorer was blocked as coming from my laptop address, so wasn't using the middleware.) |
(This ticket has been broken into several smaller pieces since it was originally written).
The Base workspace template is defined by a JSON object. This needs to be extended to hold information about all the workspace services and their user resources, specifically to list which versions are available to the workspace. The goal for this ticket is to be able to create that extended information.
The JSON format for the extension will look something like this:
The essential points are:
The "versions" sub-structure should have entries in order. String-sorting may not work, since the version number has MAJOR.MINOR.PATCH structure. This will help with presentation in the UI, the fields will already be sorted.
The information to fill this structure comes from the list of registered templates in CosmosDB.
Acceptance criteria:
The text was updated successfully, but these errors were encountered: