You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/operator-nexus/howto-run-instance-readiness-testing.md
+61-13Lines changed: 61 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,6 +50,9 @@ The Instance Readiness Test (IRT) framework is an optional/add-on tool for the N
50
50
Every average metric should be greater than 0.
51
51
- Validate that KubeletRunningPods metric data is present within the last 10 minutes.
52
52
Every average metric should be greater than 0.
53
+
- Validate that ControllerRuntimeReconcileTotal2 metric data is present within the last 10 minutes.
54
+
Every average metric should be greater than 0.
55
+
This metric needs to be filtered on namespace until the deprecated metric ControllerRuntimeReconcileTotal is removed.
53
56
- Validate that CpuUtilizationMax metric data for fabric network device is present within the last 10 minutes.
54
57
At least one non-zero metric should exist.
55
58
- Validate that MemoryAvailable metric data is present within the last 10 minutes.
@@ -117,9 +120,9 @@ IRT requires gaining access to the software package hosted in the GitHub Nexus-S
117
120
118
121
For access to the nexus-samples GitHub repository
119
122
120
-
1. Link your GitHub account to the Microsoft GitHub Org<https://repos.opensource.microsoft.com/link>
123
+
1. Link your GitHub account to the Microsoft GitHub Org<https://repos.opensource.microsoft.com/link>
121
124
122
-
2. Join the Microsoft Org<https://repos.opensource.microsoft.com/orgs/Microsoft/join>
125
+
2. Join the Microsoft Org<https://repos.opensource.microsoft.com/orgs/Microsoft/join>
123
126
124
127
3. Send an email request to be added to nexus-samples GitHub repo to afoncamalgamatesall\@microsoft.com
125
128
@@ -132,12 +135,13 @@ For access to the nexus-samples GitHub repository
132
135
* Networks to use for the test are specified in a "networks-blueprint.yml" file, see [Input Configuration](#input-configuration).
133
136
- A way to download the IRT release package, for example, curl, wget, etc.
134
137
- The ability to create a service principal with the correct roles.
138
+
- The ability to create a managed identity with the correct roles.
135
139
- The ability to read secrets from the KeyVault, see [Service Principal](#create-service-principal-and-security-group) section for more details.
136
140
- The ability to create security groups in your Active Directory tenant.
137
141
138
142
## Input configuration
139
143
140
-
Start by building your input file. The IRT tarball provides `irt-input.example.yml` as an example. Download the tarball by following the [instructions](#download-irt). The example values **will not work for your instances**. You need to manually change them and rename the file to `irt-input.yml`. We provide the example input file as a stub to help you configure new input files. The example outlines overridable values and their usage. The **[One Time Setup](#one-time-setup)** assists you in setting input values by writing key/value pairs to the config file as they execute.
144
+
Start by building your input file. The IRT tarball provides `irt-input.example.yml` as an example. Download the tarball by following the [instructions](#download-irt). The placeholder values **will need to be updated with valid values for your instance to work**. You need to manually change them and rename the file to `irt-input.yml`. We provide the example input file as a stub to help you configure new input files. The example outlines overridable values and their usage. The **[One Time Setup](#one-time-setup)** assists you in setting input values by writing key/value pairs to the config file as they execute.
141
145
142
146
You can provide the network information in a `networks-blueprint.yml` file, similar to the `networks-blueprint.example.yml` that we provide, or append it to the `irt-input.yml` file. The `networks-blueprint.example.yml` defines the schema for IRT. The test creates the networks, so provide network details that aren't in use. Currently, IRT has the following network requirements:
143
147
@@ -151,7 +155,7 @@ You can provide the network information in a `networks-blueprint.yml` file, simi
151
155
152
156
### Download IRT
153
157
154
-
IRT is distributed via tarball from the release section of the nexus-samples GitHub repo.
158
+
IRT is distributed via tarball from the release section of the nexus-samples GitHub repo.
155
159
156
160
1. Find the release package marked with 'Latest', download it, extract it, and navigate to the `irt` directory.
157
161
1. Extract the tarball to the local file system: `mkdir -p irt && tar xf nexus-irt.tar.gz --directory ./irt`.
@@ -221,7 +225,7 @@ SERVICE_PRINCIPAL:
221
225
```
222
226
223
227
> [!NOTE]
224
-
> If all `SP_ID`,`SP_OBJECT_ID`,`SP_TENANT_ID`,`ADMIN_GROUP_OBJECT_ID`,`KV_NAME`,`KV_ID` are set in the yaml or as an environment variable the script skips creating them.
228
+
> If all `SP_ID`,`SP_OBJECT_ID`,`SP_TENANT_ID`,`ADMIN_GROUP_OBJECT_ID`,`KV_NAME`,`KV_ID` are set in the yaml or as an environment variable the script skips creating them. Please comment them out if you want the script to create and populate the values.
225
229
226
230
**RESULT:** This script prints values for `ADMIN_GROUP_OBJECT_ID`, `SP_ID`, `SP_OBJECT_ID`, `SP_TENANT`, `KV_NAME`, and `KV_ID`. The script sets the values back to the input yaml.
KV_NAME: "<provided-key-vault-name>" # If SP already exists please fill it in to retrieve the SP Password.
235
239
KV_ID: "<provided-key-vault-secret>" # If SP already exists please fill it in to retrieve the SP Password.
236
240
```
241
+
#### Create managed identity and security group
242
+
243
+
The supplemental script, `create-user-assigned-managed-identity.sh` creates a managed identity with the custom role `NRT Roles` associates the role `NRT Roles` to an existing managed identity.
244
+
245
+
Executing `create-user-assigned-managed-identity.sh` requires the input yaml to have the following values. All values can be overridden by setting the corresponding environment variables:
* `UAMI.NAME` - The name of the managed identity, created with the `az identity create` command.
253
+
* `UAMI.SUBSCRIPTION` - The subscription of the managed identity.
254
+
* `UAMI.RESOURCE_GROUP` - The Resource Group where the managed identity is created.
255
+
256
+
> [!NOTE]
257
+
> Please ensure that you have already created a KeyVault (KV_NAME) and/or a Secret (KV_ID) with a dummy value prior to executing `create-service-principal.sh`. The `az login` user (person executing IRT) should also be granted access to this KeyVault so secrets can be pulled at runtime.
> If all `UAMI_ID`,`UAMI_RESOURCE_ID`,`UAMI_TENANT_ID` are set in the yaml or as an environment variable the script skips creating them. Please comment them out if you want the script to create and populate the values.
266
+
267
+
**RESULT:** This script prints values for `UAMI_ID`, `UAMI_RESOURCE_ID` and `UAMI_TENANT_ID`. The script sets the values back to the input yaml.
268
+
See [Input Configuration](#input-configuration).
269
+
270
+
```yml
271
+
UAMI_ID: "<generated-uami-id>"
272
+
UAMI_RESOURCE_ID: "<generated-uami-resource-id>"
273
+
UAMI_TENANT_ID: "<generated-uami-tenant-id>"
274
+
```
237
275
238
276
#### Creating a custom role for execution
239
277
240
-
If you have an existing service principal and would like the convenience of only having to assign one role for IRT execution, you can follow the directions in this section.
278
+
If you have an existing managed identity and would like the convenience of only having to assign the custom roles for IRT execution, you can follow the directions in this section.
241
279
242
280
##### Prerequisites
243
281
244
282
- Azure Subscription
245
-
- Ensure you have access to an Azure subscription.
283
+
- Ensure you have access to an Azure subscription.
246
284
- Azure CLI
247
-
- Ensure Azure CLI exists on your local machine
285
+
- Ensure Azure CLI exists on your local machine
248
286
249
287
##### Steps
250
288
@@ -271,7 +309,7 @@ If you have an existing service principal and would like the convenience of only
271
309
# Set our variable values, these values are for the sake of example. Replace these values with your own as needed.
272
310
location="eastus"
273
311
deploymentName="IRTRoleDefinitionDeployment"
274
-
templatePath="framework-templates/service-principal-roles.jsonc" # Path to the template file assuming the PWD is the root of the artifact tar
312
+
templatePathSPRole="service-principal-roles.jsonc" # Path to the template file assuming the PWD is the root of the artifact tar
275
313
roleName="Nexus Instance Readiness Tester"
276
314
277
315
# run deployment
@@ -282,15 +320,18 @@ If you have an existing service principal and would like the convenience of only
282
320
--parameters roleName="$roleName"
283
321
```
284
322
285
-
1. Assign Role to Application Service Principal used for testing
323
+
1. Assign Role to Application Service Principal and Managed Identity used for testing
286
324
287
-
Weather created via the all-in-one setup, or using your own, assign the newly created role to your identity. This single role provides all the necessary authorizations to run Instance Readiness Testing.
325
+
Weather created via the all-in-one setup, or using your own, assign the newly created role to your service principal and managed identity. These two roles provides all the necessary authorizations to run Instance Readiness Testing.
288
326
289
327
```bash
290
328
# The Application ID of your Service Principal for your application
291
329
appId="00001111-aaaa-2222-bbbb-3333cccc4444"
330
+
# The Object(principal) ID of your Managed Identity for your application
# az role definition list --name "$roleName" --query "[0].id" --output tsv | awk -F'/' '{print $NF}'
@@ -305,6 +346,13 @@ If you have an existing service principal and would like the convenience of only
305
346
--role "$(az role definition list --name "$roleName" --query "[0].id" --output tsv | awk -F'/' '{print $NF}')" \
306
347
--scope "/subscriptions/$(az account show --query id --output tsv --only-show-errors)"
307
348
349
+
az role assignment create \
350
+
--assignee "$principalId" \
351
+
--subscription "$(az account show --query id --output tsv --only-show-errors)" \
352
+
--role "$(az role definition list --name "$roleName" --query "[0].id" --output tsv | awk -F'/' '{print $NF}')" \
353
+
--scope "/subscriptions/$(az account show --query id --output tsv --only-show-errors)"
354
+
```
355
+
308
356
#### Create L3 isolation domains
309
357
310
358
The testing framework doesn't create, destroy, or manipulate isolation domains. Therefore, existing isolation domains can be used for execution. Each isolation domain requires at least one external network. The supplemental script, `create-l3-isolation-domains.sh`. Internal networks, for example, L3, trunked, etc. are created, manipulated, and destroyed through the course of testing.
@@ -381,7 +429,7 @@ description of it under standard log.
0 commit comments