Skip to content

Commit fb8c204

Browse files
author
Jill Grant
authored
Merge pull request #244926 from DannyMassa/patch-1
Create howto-run-instance-readiness-testing
2 parents 8e93db4 + ac39690 commit fb8c204

File tree

2 files changed

+106
-0
lines changed

2 files changed

+106
-0
lines changed

articles/operator-nexus/TOC.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,24 @@
3939
items:
4040
- name: Operator Nexus Instance Deployment and Upgrade
4141
expanded: false
42+
items:
43+
- name: Before you start Operator Nexus NFC and CM deployment
44+
href: howto-azure-operator-nexus-prerequisites.md
45+
- name: Network Fabric Controller
46+
href: howto-configure-network-fabric-controller.md
47+
- name: Cluster Manager
48+
href: howto-cluster-manager.md
49+
- name: Before you start Operator Nexus platform deployment
50+
href: howto-platform-prerequisites.md
51+
- name: Network Fabric
52+
href: howto-configure-network-fabric.md
53+
- name: Cluster
54+
href: howto-configure-cluster.md
55+
- name: Instance Readiness Testing
56+
href: howto-run-instance-readiness-testing.md
57+
- name: Cluster Upgrades
58+
href: howto-cluster-runtime-upgrade.md
59+
- name: BareMetal Actions
4260
items:
4361
- name: Management Plane
4462
expanded: false
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: "Azure Operator Nexus: How to run Instance Readiness Testing"
3+
description: Learn how to run instance readiness testing.
4+
author: DannyMassa
5+
ms.author: danielmassa
6+
ms.service: azure-operator-nexus
7+
ms.topic: how-to
8+
ms.date: 07/13/2023
9+
ms.custom: template-how-to, devx-track-azurecli
10+
---
11+
12+
# Instance readiness testing
13+
14+
Instance Readiness Testing (IRT) is a framework built to orchestrate real-world workloads for testing of the Azure Operator Nexus Platform.
15+
16+
## Environment requirements
17+
18+
- A Linux environment (Ubuntu suggested) capable of calling Azure APIs
19+
- Knowledge of networks to use for the test
20+
* Networks to use for the test are specified in a "networks-blueprint.yml" file, see [Input Configuration](#input-configuration).
21+
- curl or wget to download IRT package
22+
23+
## Before execution
24+
25+
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`.
26+
1. Extract the tarball to the local file system: `mkdir -p irt && tar xf nexus-irt.tar.gz --directory ./irt`.
27+
1. Switch to the new directory `cd irt`.
28+
1. The `setup.sh` script is provided to aid in the initial set up of an environment.
29+
* `setup.sh` assumes a nonroot user and attempts to use `sudo`, which installs:
30+
1. `jq` version 1.6
31+
1. `yq` version 4.33
32+
1. `azcopy` version 10
33+
1. `az` Azure CLI minimum version not known, stay up to date.
34+
1. `elinks` for viewing html files on the command line
35+
1. `tree` for viewing directory structures
36+
1. `moreutils` utilities for viewing progress from the ACI container
37+
1. [Optional] Set up a storage account to archive test results over time. For help, see the [instructions](#uploading-results-to-your-own-archive).
38+
1. Log into Azure, if not already logged in: `az login --use-device`.
39+
* User should have `Contributor` role
40+
1. Create an Azure Managed Identity for the container to use.
41+
* Using the provided script: `MI_RESOURCE_GROUP="<your resource group> MI_NAME="<managed identity name>" SUBSCRIPTION="<subscription>" ./create-managed-identity.sh`
42+
* Can be created manually via the Azure portal, refer to the script for needed permissions
43+
1. Create a service principal and security group. The service principal is used as the executor of the test. The group informs the kubernetes cluster of valid users. The service principal must be a part of the security group, so it has the ability to log into the cluster.
44+
* You can provide your own, or use our provided script, here's an example of how it could be executed; `AAD_GROUP_NAME=external-test-aad-group-8 SERVICE_PRINCIPAL_NAME=external-test-sp-8 ./irt/create-service-principal.sh`.
45+
* This script prints four key/value pairs for you to include in your input file.
46+
1. If necessary, create the isolation domains required to execute the tests. They aren't lifecycled as part of this test scenario.
47+
* **Note:** If deploying isolation domains, your network blueprint must define at least one external network per isolation domain. see `networks-blueprint.example.yml` for help with configuring your network blueprint.
48+
* `create-l3-isolation-domains.sh` takes one parameter, a path to your networks blueprint file; here's an example of the script being invoked:
49+
* `create-l3-isolation-domains.sh ./networks-blueprint.yml`
50+
51+
### Input configuration
52+
53+
1. Build your input file. The IRT tarball provides `irt-input.example.yml` as an example. These values **will not work for all instances**, they need to be manually changed and the file also needs to be renamed to `irt-input.yml`.
54+
1. define the values of networks-blueprint input, an example of this file is given in networks-blueprint.example.yml.
55+
56+
The network blueprint input schema for IRT is defined in the networks-blueprint.example.yml. Currently IRT has the following network requirements. The networks are created as part of the test, provide network details that aren't in use.
57+
58+
1. Three (3) L3 Networks
59+
60+
* Two of them with MTU 1500
61+
* One of them with MTU 9000 and shouldn't have fabric_asn definition
62+
63+
1. One (1) Trunked Network
64+
1. All vlans should be greater than 500
65+
66+
## Execution
67+
68+
1. Execute: `./irt.sh irt-input.yml`
69+
* Assumes irt-input.yml is in the same location as irt.sh. If in a different location provides the full file path.
70+
71+
## Results
72+
73+
1. A file named `summary-<cluster_name>-<timestamp>.html` is downloaded at the end of the run and contains the testing results. It can be viewed:
74+
1. From any browser
75+
1. Using elinks or lynx to view from the command line; for example:
76+
1. `elinks summary-<cluster_name>-<timestamp>..html`
77+
1. When an SAS Token is provided for the `PUBLISH_RESULTS_TO` parameter the results are uploaded to the blob container you specified. It can be previewed by navigating to the link presented to you at the end of the IRT run.
78+
79+
### Uploading results to your own archive
80+
81+
1. We offer a supplementary script, `create-archive-storage.sh` to allow you to set up a storage container to store your results. The script generates an SAS Token for a storage container that is valid for three days. The script creates a storage container, storage account, and resource group if they don't already exist.
82+
1. The script expects the following environment variables to be defined:
83+
1. RESOURCE_GROUP
84+
1. SUBSCRIPTION
85+
1. STORAGE_ACCOUNT_NAME
86+
1. STORAGE_CONTAINER_NAME
87+
1. Copy the last output from the script, into your IRT YAML input. The output looks like this:
88+
* `PUBLISH_RESULTS_TO="<sas-token>"`

0 commit comments

Comments
 (0)