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
Instance Readiness Testing (IRT) is a framework built to orchestrate real-world workloads for testing of the Azure Operator Nexus Platform.
15
15
@@ -20,7 +20,7 @@ Instance Readiness Testing (IRT) is a framework built to orchestrate real-world
20
20
* Networks to use for the test are specified in a "networks-blueprint.yml" file, see [Input Configuration](#input-configuration).
21
21
- curl to download IRT package
22
22
- The User Access Admin & Contributor roles for the execution subscription
23
-
- The ability to create security groups in your Active Directory tenant
23
+
- The ability to create security groups in your Active Directory tenant
24
24
25
25
## Input configuration
26
26
@@ -32,12 +32,12 @@ The network information is provided in either a `networks-blueprint.yml` file, s
32
32
* Two of them with MTU 1500
33
33
* One of them with MTU 9000 and shouldn't have a fabric_asn attribute
34
34
* One (1) Trunked Network
35
-
* All vlans should be greater than 500
35
+
* All VLANs should be greater than 500
36
36
37
37
## One Time Setup
38
38
39
-
### Download IRT
40
-
IRT is distributed via tarball, download it, extract it, and navigate to the `irt` directory
39
+
### Download IRT
40
+
IRT is distributed via tarball, download it, extract it, and navigate to the `irt` directory.
41
41
1. From your Linux environment, download nexus-irt.tar.gz from aka.ms/nexus-irt `curl -Lo nexus-irt.tar.gz aka.ms/nexus-irt`
42
42
1. Extract the tarball to the local file system: `mkdir -p irt && tar xf nexus-irt.tar.gz --directory ./irt`
43
43
1. Switch to the new directory `cd irt`
@@ -49,97 +49,164 @@ There are multiple dependencies expected to be available during execution. Revie
49
49
*`jq` version 1.6 or greater
50
50
*`yq` version 4.33 or greater
51
51
*`azcopy` version 10 or greater
52
-
*`az` Azure CLI minimum version not known, stay up to date.
52
+
*`az` Azure CLI, stay up to date. Minimum expected version: 2.11.0(supports self upgrade)
53
53
*`elinks` - for viewing html files on the command line
54
54
*`tree` - for viewing directory structures
55
-
*`moreutils` - for viewing progress from the ACI container
55
+
*`moreutils` - for viewing progress from the Azure Container Instance (ACI) container
56
56
57
57
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.
58
58
59
-
> [!NOTE]
59
+
> [!NOTE]
60
60
> `setup.sh` assumes a nonroot user and attempts to use `sudo`
61
61
62
62
### All in one setup
63
63
64
-
`all-in-one-setup.sh` is provided to create all of the Azure resources required to run IRT. This process includes creating a managed identity, a service principal, a security group, isolation domains, and a storage account to archive the test results. These resources can be created during the all in one script, or they can be created step by step per the instructions in this document. Each of the script, individually and via the all in one script, writes 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 required inputs needed for the script(s), regardless of the methodology you pursue. All of the scripts are idempotent, and also allow you to use existing resources if desired.
65
-
64
+
`all-in-one-setup.sh` is provided to create all of the Azure resources required to run IRT. This process includes creating a managed identity, a service principal, a security group, isolation domains, and a storage account to archive the test results. These resources can be created during the all in one script, or they can be created step by step per the instructions in this document. Each of the script, individually and via the all in one script, writes 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 required inputs needed for one or more of the scripts, regardless of the methodology you pursue. All of the scripts are idempotent, and also allow you to use existing resources if desired.
66
65
### Step-by-Step setup
67
66
68
67
> [!NOTE]
69
68
> Only use this section if you're NOT using `all-in-one.sh`
70
69
71
-
If your workflow is incompatible with `all-in-one.sh`, each resource needed for IRT can be created manually with each supplemental script. Like `all-in-one.sh`, running these scripts writes key/value pairs to your `irt-input.yml` for you to use during your run. These five scripts make up the `all-in-one.sh`.
70
+
If your workflow is incompatible with `all-in-one.sh`, each resource needed for IRT can be created manually with each supplemental script. Like `all-in-one.sh`, running these scripts writes key/value pairs to your `irt-input.yml` for you to use during your run. These four scripts make up the `all-in-one.sh`.
72
71
73
-
IRT makes commands against your resources, and needs permission to do so. IRT requires a Managed Identity and 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.
72
+
IRT makes commands against your resources, and needs permission to do so. IRT requires a managed identity and 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.
74
73
75
74
#### Create managed identity
76
-
A managed identity with the following role assignments is needed to execute tests. The supplemental script, `create-managed-identity.sh` creates a managed identity with these role assignments.
77
-
*`Contributor` - For creating and manipulating resources
78
-
*`Storage Blob Data Contributor` - For reading from and writing to the storage blob container
79
-
*`Log Analytics Reader` - For reading metadata about the LAW
80
-
75
+
<details>
76
+
<summary>Expand to see how to create managed identity.</summary>
81
77
82
-
Executing `create-managed-identity.sh` requires the following environment variables to be set;
83
-
***MI_RESOURCE_GROUP** - The resource group the Managed Identity is created in. The resource group is created in `eastus` if the resource group provided doesn't yet exist.
84
-
***MI_NAME** - The name of the Managed Identity to be created.
85
-
***[Optional] SUBSCRIPTION** - to set the subscription. Alternatively, the script uses az CLI context to look up the subscription.
78
+
A managed identity with the following role assignments is needed to execute tests. The supplemental script, `create-managed-identity.sh` creates a managed identity with these role assignments.
79
+
*`Contributor` - For creating and manipulating resources
80
+
*`Storage Blob Data Contributor` - For reading from and writing to the storage blob container
81
+
*`Log Analytics Reader` - For reading metadata about the LAW
82
+
*`Kubernetes Connected Cluster Role` - For read/write operations on connected cluster
83
+
84
+
Executing `create-managed-identity.sh` requires the input yaml to have the following properties, all of them can be overridden by the corresponding environment variables:
**RESULT:** This script prints a value for `MANAGED_IDENTITY_ID`. This key/value pair should be recorded in the irt-input.yml for use. See [Input Configuration](#input-configuration).
102
+
> [!NOTE]
103
+
> if `MANAGED_IDENTITY_ID` is set in the input yaml or as an environment variable the script won't create anything.
93
104
105
+
**RESULT:** This script prints a value for `MANAGED_IDENTITY_ID` and sets it to the input.yml.
106
+
See [Input Configuration](#input-configuration).
107
+
108
+
```yml
109
+
MANAGED_IDENTITY_ID: <generated_id>
110
+
```
111
+
</details>
94
112
95
113
#### Create service principal and security group
96
-
A service principal with the following role assignments. The supplemental script, `create-service-principal.sh` creates a service principal with these role assignments, or add role assignments to an existing service principal.
97
-
*`Contributor` - For creating and manipulating resources
98
-
*`Storage Blob Data Contributor` - For reading from and writing to the storage blob container
99
-
*`Azure ARC Kubernetes Admin` - For ARC enrolling the NAKS cluster
114
+
<details>
115
+
<summary>Expand to see how to create service principal and security group.</summary>
116
+
117
+
A service principal with the following role assignments. The supplemental script, `create-service-principal.sh` creates a service principal with these role assignments, or add role assignments to an existing service principal.
118
+
119
+
* `Contributor` - For creating and manipulating resources
120
+
* `Storage Blob Data Contributor` - For reading from and writing to the storage blob container
121
+
* `Azure ARC Kubernetes Admin` - For ARC enrolling the NAKS cluster
100
122
101
123
Additionally, the script creates the necessary security group, and adds the service principal to the security group. If the security group exists, it adds the service principal to the existing security group.
102
124
103
-
Executing `create-service-principal.sh` requires the following environment variables to be set:
104
-
* SERVICE_PRINCIPAL_NAME - The name of the service principal, created with the `az ad sp create-for-rbac` command.
105
-
* AAD_GROUP_NAME - The name of the security group.
125
+
Executing `create-service-principal.sh` requires the input yaml to have the following properties, all of them can be overridden by the corresponding environment variables:
* `SERVICE_PRINCIPAL.NAME` - The name of the service principal, created with the `az ad sp create-for-rbac` command.
133
+
* `SERVICE_PRINCIPAL.AAD_GROUP_NAME` - The name of the security group.
134
+
* `SERVICE_PRINCIPAL.SUBSCRIPTION` - The subscription of the service principal.
106
135
107
136
```bash
108
137
# Example execution of the script
109
-
SERVICE_PRINCIPAL_NAME="<your service principal name>" AAD_GROUP_NAME="<your security group name>"./create-service-principal.sh
138
+
./create-service-principal.sh irt-input.yml
110
139
```
111
140
112
-
**RESULT:** This script prints values for `AAD_GROUP_ID`, `SP_ID`, `SP_PASSWORD`, and `SP_TENANT`. This key/value pair should be recorded in irt-input.yml for use. See [Input Configuration](#input-configuration).
141
+
> [!NOTE]
142
+
> if all `SP_ID`,`SP_PASSWORD`,`SP_TENANT_ID`,`AAD_GROUP_ID` are set in the yaml or as an environment variable the script skips creating them.
113
143
144
+
**RESULT:** This script prints values for `AAD_GROUP_ID`, `SP_ID`, `SP_PASSWORD`, and `SP_TENANT` and sets the values back to the input yaml.
145
+
See [Input Configuration](#input-configuration).
114
146
115
-
#### Create isolation domains
116
-
The testing framework doesn't create, destroy, or manipulate isolation domains. Therefore, existing Isolation Domains can be used. Each Isolation Domain requires at least one external network. The supplemental script, `create-l3-isolation-domains.sh`. Internal networks are created, manipulated, and destroy through the course of testing. They're created using the data provided in the networks blueprint.
147
+
```yml
148
+
SP_ID: "<generated-sp-id>"
149
+
SP_PASSWORD: "<generated-sp-password>" # If SP already exists sp password is not retreivable, please fill it in.
150
+
SP_TENANT_ID: "<generated-sp-tenant-id>"
151
+
AAD_GROUP_ID: "generated-aad-group-id"
152
+
```
153
+
</details>
154
+
155
+
#### Create l3 isolation domains
156
+
<details>
157
+
<summary>Expand to see how to create l3 isolation.</summary>
158
+
159
+
The testing framework doesn't create, destroy, or manipulate isolation domains. Therefore, existing isolation domains can be used. Each isolation domain requires at least one external network. The supplemental script, `create-l3-isolation-domains.sh`. Internal networks are created, manipulated, and destroyed through the course of testing.
160
+
161
+
Executing `create-l3-isolation-domains.sh` requires one **parameter**, a path to a file containing the networks requirements. You can choose either the standalone network-blueprint.yml or the input.yml based on your workflow, both should contain the information needed.
162
+
163
+
```bash
164
+
# Example of the script being invoked using networks-blueprint.yml:
# Example of the script being invoked using irt-input.yml:
170
+
# the network-blueprint should exist under NETWORK_BLUEPRINT node.
171
+
./create-l3-isolation-domains.sh irt-input.yml
123
172
```
173
+
</details>
124
174
125
175
#### Create archive storage
126
-
IRT creates an html test report after running a test scenario. These reports can optionally be uploaded to a blob storage container. the supplementary script `create-archive-storage.sh` to create a storage container, storage account, and resource group if they don't already exist.
176
+
<details>
177
+
<summary>Expand to see how to create archive storage.</summary>
178
+
179
+
IRT creates an html test report after running a test scenario. These reports can optionally be uploaded to a blob storage container. The supplementary script `create-archive-storage.sh` to create a storage container, storage account, and resource group if they don't already exist.
127
180
181
+
Executing `create-archive-storage.sh` requires the input yaml to have the following properties, all of them can be overridden by the corresponding environment variables:
128
182
129
-
Executing `create-managed-identity.sh` requires the following environment variables to be set:
130
-
***RESOURCE_GROUP** - The resource group the Managed Identity is created in. The resource group is created in `eastus` if the resource group provided doesn't yet exist.
131
-
***STORAGE_ACCOUNT_NAME** - The name of the Azure storage account to be created.
132
-
***STORAGE_CONTAINER_NAME** - The name of the blob storage container to be created.
133
-
***[Optional] SUBSCRIPTION** - to set the subscription. Alternatively, the script uses the az CLI context to look up the subscription.
**RESULT:** This script prints a value for `PUBLISH_RESULTS_TO`. This key/value pair should be recorded in irt-input.yml for use. See [Input Configuration](#input-configuration).
142
-
205
+
**RESULT:** This script prints a value for `PUBLISH_RESULTS_TO` and sets the value in the input.yml. See [Input Configuration](#input-configuration).
0 commit comments