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
+40-52Lines changed: 40 additions & 52 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -101,11 +101,11 @@ The Instance Readiness Test (IRT) framework is an optional/add-on tool for the N
101
101
- Validate deleting a PVC before removing the pod using it (scale down sts), remove pod naks-storage-statefulset-1.
102
102
- Validate that Block Storage PVC can be deleted.
103
103
104
-
## How to Run IRT
104
+
## How to run IRT
105
105
106
106
IRT requires gaining access to the software package hosted in the GitHub Nexus-Samples repository. Users should navigate to the 'Releases' section and choose the release with the 'latest' tag. A copy of this README is also available inside the release package for convenient reference in the execution environment.
107
107
108
-
### Request Access to Nexus-samples GitHub repository
108
+
### Request access to nexus-samples GitHub repository
109
109
-------------------------------------------------
110
110
111
111
For access to the nexus-samples GitHub repository
@@ -116,11 +116,7 @@ For access to the nexus-samples GitHub repository
116
116
117
117
3. Send an email request to be added to nexus-samples GitHub repo to afoncamalgamatesall\@microsoft.com
118
118
119
-
## Execution Details
120
-
<details>
121
-
<summary>Expand to see details for executing IRT. </summary>
122
-
123
-
## Environment Requirements
119
+
## Environment requirements
124
120
125
121
- A Linux environment (Ubuntu suggested) capable of calling Azure APIs.
126
122
- Support for other Linux distros, for example, RedHat, Mariner, etc. depends on being able to install the necessary tooling. See [Install Dependencies](#install-dependencies) section.
@@ -132,7 +128,7 @@ For access to the nexus-samples GitHub repository
132
128
- The ability to read secrets from the KeyVault, see [Service Principal] (#create-service-principal-and-security-group) section for more details.
133
129
- The ability to create security groups in your Active Directory tenant.
134
130
135
-
## Input Configuration
131
+
## Input configuration
136
132
137
133
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.
138
134
@@ -144,7 +140,7 @@ You can provide the network information in a `networks-blueprint.yml` file, simi
144
140
* One (1) Trunked Network
145
141
* All VLANs should be greater than 500
146
142
147
-
## One Time Setup
143
+
## One time setup
148
144
149
145
### Download IRT
150
146
IRT is distributed via tarball from the release section of the [nexus-samples](https://aka.ms/nexus-irt) GitHub repo.
@@ -153,7 +149,7 @@ IRT is distributed via tarball from the release section of the [nexus-samples](h
153
149
1. Switch to the new directory `cd irt`.
154
150
1. See RELEASE-CHANGELOG.md for any notable updates or changes.
155
151
156
-
### Install Dependencies
152
+
### Install dependencies
157
153
There are multiple dependencies expected to be available during execution. Review this list;
158
154
159
155
*`jq` version 1.6 or greater
@@ -166,30 +162,27 @@ There are multiple dependencies expected to be available during execution. Revie
166
162
167
163
The `setup.sh` script is provided to aid with installing the listed dependencies. It installs any dependencies that aren't available in PATH. It doesn't upgrade any dependencies that don't meet the minimum required versions.
168
164
169
-
> **_NOTE:_**`setup.sh` assumes a nonroot user and attempts to use `sudo`
165
+
> [!NOTE]
166
+
> `setup.sh` assumes a nonroot user and attempts to use `sudo`
170
167
171
-
### All-in-One Setup (Recommended)
168
+
### All-in-One setup (recommended)
172
169
173
170
`all-in-one-setup.sh` is provided to create all the Azure resources required to run IRT. This process includes creating a service principal, a security group, and isolation domains. Each of the scripts called in `all-in-one-setup.sh` can be individually executed. These scripts write updates to your `irt-input.yml` file with the key-value pairs needed to utilize the resources you created. Review the `irt-input.example.yml` file for the inputs required by one or more scripts, regardless of your chosen approach. All of the scripts are idempotent and allow you to use existing resources if desired.
174
171
175
-
### Step-By-Step Setup
176
-
<details>
177
-
<summary>Expand to see step-by-step setup. </summary>
172
+
### Step-By-Step setup
178
173
179
-
> **_NOTE:_** Use this section only if you're not using all-in-one.setup.sh
174
+
> [!NOTE]
175
+
> Use this section only if you're not using all-in-one.setup.sh
180
176
181
177
If your workflow is incompatible with `all-in-one-setup.sh`, each resource needed for IRT can be created manually with each supplemental script. Like `all-in-one-setup.sh`, running these scripts writes key/value pairs to your `irt-input.yml` for you to use during your run. These four scripts constitute the `all-in-one-setup.sh` script."
182
178
183
179
IRT makes commands against your resources and needs permission to do so. IRT requires a service principal to execute. It also requires that the service principal is a member of the Azure AD Security Group that is also provided as input.
184
180
185
-
### Authentication and Runtime Permissions
181
+
### Authentication and runtime permissions
186
182
187
183
IRT requires a service principal with the correct permissions in order to interact with various Azure and NetworkCloud Resources.
188
-
</details>
189
184
190
-
#### Create Service Principal and Security Group
191
-
<details>
192
-
<summary>Expand to see how to create service principal and security group. </summary>
185
+
#### Create service principal and security group
193
186
194
187
The supplemental script, `create-service-principal.sh` creates a service principal with these role assignments or add role assignments to an existing service principal. The following role assignments are used:
195
188
@@ -216,15 +209,16 @@ SERVICE_PRINCIPAL:
216
209
* `SERVICE_PRINCIPAL.KV_NAME` - The KeyVault to store the service principal password.
217
210
* `SERVICE_PRINCIPAL.KV_ID` - The KeyVault secret where the service principal password is stored.
218
211
219
-
> **_NOTE:_** 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`.
220
-
> The `az login` user (person executing IRT) should also be granted access to this KeyVault so secrets can be pulled at runtime.
212
+
> [!NOTE]
213
+
> 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.
221
214
222
215
```bash
223
216
# Example execution of the script
224
217
./create-service-principal.sh irt-input.yml
225
218
```
226
219
227
-
> **_NOTE:_** 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.
220
+
> [!NOTE]
221
+
> 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
222
229
223
**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.
238
232
KV_ID: "<provided-key-valut-secret>" # If SP already exists please fill it in to retrieve the SP Password.
239
233
```
240
-
</details>
241
234
242
-
#### Creating a Custom Role for Execution
243
-
<details>
244
-
<summary>Expand to see details for using a custom role. </summary>
235
+
#### Creating a custom role for execution
245
236
246
237
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.
247
238
248
239
##### Prerequisites
249
240
250
-
1. Azure Subscription
241
+
-Azure Subscription
251
242
- Ensure you have access to an Azure subscription.
252
-
1. Azure CLI
243
+
-Azure CLI
253
244
- Ensure Azure CLI exists on your local machine
254
245
255
246
##### Steps
256
247
257
248
1. Prepare Your Environment
258
-
-Open a Bash Shell:
259
-
-You can use any terminal that supports Bash
249
+
1. Open a Bash Shell:
250
+
2. You can use any terminal that supports Bash
260
251
261
252
1. Sign in to Azure
262
-
-Execute the following command to sign in to your Azure account:
253
+
1. Execute the following command to sign in to your Azure account:
263
254
264
255
```bash
265
256
# Start az CLI session
@@ -311,9 +302,7 @@ If you have an existing service principal and would like the convenience of only
311
302
--role "$(az role definition list --name "$roleName" --query "[0].id" --output tsv | awk -F'/' '{print $NF}')" \
312
303
--scope "/subscriptions/$(az account show --query id --output tsv --only-show-errors)"
313
304
314
-
#### Create L3 Isolation Domains
315
-
<details>
316
-
<summary>Expand to see how to create l3 isolation. </summary>
305
+
#### Create L3 isolation domains
317
306
318
307
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.
319
308
@@ -329,8 +318,6 @@ Executing `create-l3-isolation-domains.sh` requires one **parameter**, a path to
329
318
# the network-blueprint should exist under NETWORK_BLUEPRINT node.
330
319
./create-l3-isolation-domains.sh irt-input.yml
331
320
```
332
-
</details>
333
-
</details>
334
321
335
322
## Execution
336
323
@@ -340,7 +327,7 @@ Executing `create-l3-isolation-domains.sh` requires one **parameter**, a path to
340
327
./irt.sh irt-input.yml
341
328
```
342
329
343
-
## How to Read the IRT Summary Results
330
+
## How to read the IRT summary results
344
331
345
332
The IRT summary page is an html page that is generated after the
346
333
execution of IRT and can be viewed from any browser.
@@ -357,32 +344,33 @@ The top of the Summary Results displays the Total tests run in the IRT
357
344
test suites, the number of extras sections and total number of tests
358
345
that passed and failed along with percentage value.
359
346
360
-
> **_NOTE:_** The number of total tests depends on the version of IRT being
347
+
> [!NOTE]
348
+
> The number of total tests depends on the version of IRT being
361
349
executed, different prerequisite test commands, so totals may not always be the same.

368
356
369
-
### Test Results
357
+
### Test results
370
358
371
359
The Test Results section provides all the tests (assertions) that IRT
372
360
executes. The Asserters section expands to view the list of tests (assertions) that are run and available.
373
361
Each asserter can be further expanded that loads an accordion pane, which provides more details of the asserter, including the description of the test and any thresholds to be measured and asserted against.
374
362
375
-
### Display of Test Results
363
+
### Display of test results
376
364
377
365
Display of Test results section with all successful tests:
0 commit comments