Skip to content

Commit

Permalink
Merge pull request #173 from fabric-testbed/acceptance-update
Browse files Browse the repository at this point in the history
Updates to acceptance testing notebooks to make tests 1.x and 3.1.x work
  • Loading branch information
ibaldin authored Sep 2, 2022
2 parents 445c2e6 + eac5383 commit a90093e
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 77 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"# Functional Test 1.1.1 - checking site resources via REST API\n",
"\n",
"This Jupyter notebook will allow you to see if the site resources are visible through CF REST APIs consistent with the requirements for test 1.1.1\n",
"\n",
"## Step 1: Configure the Environment\n",
"\n",
"Before running this notebook, you will need to configure your environment using the [Configure Environment](../../fablib_api/configure_environment/configure_environment.ipynb) notebook. Please stop here, open and run that notebook, then return to this notebook.\n",
"\n",
"**This only needs to be done once.**"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"## Step 2: Import the FABlib Library"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"----------------------------------- --------------------------------------------------\n",
"credmgr_host cm.fabric-testbed.net\n",
"orchestrator_host orchestrator.fabric-testbed.net\n",
"fabric_token /home/fabric/.tokens.json\n",
"project_id 990d8a8b-7e50-4d13-a3be-0f133ffa8653\n",
"bastion_username ibaldin_0000241998\n",
"bastion_key_filename /home/fabric/work/fabric_config/fabric_bastion_key\n",
"bastion_public_addr bastion-1.fabric-testbed.net\n",
"bastion_passphrase None\n",
"slice_public_key_file /home/fabric/work/fabric_config/slice_key.pub\n",
"slice_private_key_file /home/fabric/work/fabric_config/slice_key\n",
"fabric_slice_private_key_passphrase None\n",
"fablib_log_file /tmp/fablib/fablib.log\n",
"fablib_log_level INFO\n",
"----------------------------------- --------------------------------------------------\n"
]
}
],
"source": [
"from fabrictestbed_extensions.fablib.fablib import FablibManager as fablib_manager\n",
"\n",
"fablib = fablib_manager()\n",
" \n",
"fablib.show_config()"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"## Step 3 Query for Available Testbed Resources and Settings\n",
"\n",
"This command queries the FABRIC services to find the available resources. \n",
"\n",
"**Be sure the site you are about to test is listed in the advertisement.**"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Name CPUs Cores RAM (G) Disk (G) Basic (100 Gbps NIC) ConnectX-6 (100 Gbps x2 NIC) ConnectX-5 (25 Gbps x2 NIC) P4510 (NVMe 1TB) Tesla T4 (GPU) RTX6000 (GPU)\n",
"------ ------ ------- --------- ------------- ---------------------- ------------------------------ ----------------------------- ------------------ ---------------- ---------------\n",
"MASS 4 125/128 1016/1024 55750/55800 253/254 2/2 0/0 6/6 0/0 3/3\n",
"MAX 10 256/320 2358/2560 115586/116400 598/635 1/2 3/4 16/16 4/4 6/6\n",
"TACC 10 272/320 2382/2560 116092/116400 605/635 0/2 1/4 16/16 4/4 6/6\n",
"MICH 6 192/192 1536/1536 60600/60600 381/381 2/2 2/2 10/10 2/2 3/3\n",
"SALT 6 192/192 1536/1536 60600/60600 381/381 2/2 2/2 10/10 2/2 3/3\n",
"STAR 12 375/384 3040/3072 121120/121200 757/762 2/2 6/6 20/20 6/6 6/6\n",
"UTAH 10 320/320 2560/2560 116400/116400 635/635 2/2 4/4 16/16 4/4 5/5\n",
"UCSD 10 320/320 2560/2560 116400/116400 635/635 2/2 4/4 16/16 4/4 6/6\n",
"FIU 10 320/320 2560/2560 116400/116400 635/635 2/2 4/4 16/16 4/4 6/6\n",
"WASH 6 190/192 1528/1536 60590/60600 379/381 2/2 2/2 10/10 2/2 3/3\n",
"DALL 6 192/192 1536/1536 60600/60600 381/381 2/2 2/2 10/10 2/2 3/3\n",
"NCSA 6 192/192 1536/1536 60600/60600 381/381 2/2 2/2 10/10 2/2 3/3\n"
]
}
],
"source": [
"try:\n",
" print(f\"{fablib.list_sites()}\")\n",
"except Exception as e:\n",
" print(f\"Exception: {e}\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"\n",
"## Step 1: Configure the Environment\n",
"\n",
"Before running this notebook, you will need to configure your environment using the [Configure Environment](../fablib_api/configure_environment/configure_environment.ipynb) notebook. Please stop here, open and run that notebook, then return to this notebook.\n",
"Before running this notebook, you will need to configure your environment using the [Configure Environment](../../fablib_api/configure_environment/configure_environment.ipynb) notebook. Please stop here, open and run that notebook, then return to this notebook.\n",
"\n",
"**This only needs to be done once.**"
]
Expand Down Expand Up @@ -74,7 +74,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -91,53 +91,7 @@
"tags": []
},
"source": [
"## Step 4 Query for Available Testbed Resources and Settings\n",
"\n",
"This command queries the FABRIC services to find the available resources. \n",
"\n",
"**Be sure the site you are about to test is listed in the advertisement.**"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Name CPUs Cores RAM (G) Disk (G) Basic (100 Gbps NIC) ConnectX-6 (100 Gbps x2 NIC) ConnectX-5 (25 Gbps x2 NIC) P4510 (NVMe 1TB) Tesla T4 (GPU) RTX6000 (GPU)\n",
"------ ------ ------- --------- ------------- ---------------------- ------------------------------ ----------------------------- ------------------ ---------------- ---------------\n",
"MASS 4 125/128 1016/1024 55750/55800 253/254 2/2 0/0 6/6 0/0 3/3\n",
"MAX 10 264/320 2402/2560 115468/116400 610/635 0/2 1/4 16/16 4/4 6/6\n",
"TACC 10 306/320 2516/2560 116350/116400 633/635 0/2 1/4 16/16 4/4 6/6\n",
"MICH 6 192/192 1536/1536 60600/60600 381/381 2/2 2/2 10/10 2/2 3/3\n",
"SALT 6 192/192 1536/1536 60600/60600 381/381 2/2 2/2 10/10 2/2 3/3\n",
"STAR 12 379/384 3056/3072 121140/121200 759/762 2/2 6/6 20/20 6/6 6/6\n",
"UTAH 10 320/320 2560/2560 116400/116400 635/635 2/2 4/4 16/16 4/4 5/5\n",
"UCSD 10 318/320 2552/2560 116390/116400 635/635 2/2 4/4 16/16 4/4 6/6\n",
"FIU 10 320/320 2560/2560 116400/116400 635/635 2/2 4/4 16/16 4/4 6/6\n",
"WASH 6 190/192 1528/1536 60590/60600 379/381 2/2 2/2 10/10 2/2 3/3\n",
"DALL 6 192/192 1536/1536 60600/60600 381/381 2/2 2/2 10/10 2/2 3/3\n",
"NCSA 6 192/192 1536/1536 60600/60600 381/381 2/2 2/2 10/10 2/2 3/3\n"
]
}
],
"source": [
"try:\n",
" print(f\"{fablib.list_sites()}\")\n",
"except Exception as e:\n",
" print(f\"Exception: {e}\")"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"## Step 5: Create the test Slice\n",
"## Step 4: Create the test Slice\n",
"\n",
"The following creates a single node with basic compute capabilities at a specific site on a specific worker. Modify the site, worker and the dimensions of the desired VM. \n",
"\n",
Expand All @@ -152,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -172,29 +126,29 @@
},
{
"cell_type": "code",
"execution_count": 20,
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"----------- ---------------------------------------------------------------------------\n",
"Slice Name Slice Test TACC on tacc-w1.fabric-testbed.net on 2022-08-31 00:17:56.594589\n",
"Slice ID 86b81b23-c107-4252-89e5-5623a0cf5bf9\n",
"----------- ---------------------------------------------------------------------------------\n",
"Slice Name Slice Test 3.1.1 TACC on tacc-w1.fabric-testbed.net on 2022-09-01 19:50:58.529437\n",
"Slice ID 51d97ed9-1438-4add-886c-561622c16336\n",
"Slice State StableOK\n",
"Lease End 2022-09-01 00:18:29 +0000\n",
"----------- ---------------------------------------------------------------------------\n",
"Lease End 2022-09-02 19:51:14 +0000\n",
"----------- ---------------------------------------------------------------------------------\n",
"\n",
"Retry: 8, Time: 91 sec\n",
"Retry: 10, Time: 115 sec\n",
"\n",
"ID Name Site Host Cores RAM Disk Image Management IP State Error\n",
"------------------------------------ ------ ------ -------------------------- ------- ----- ------ --------------- --------------- ------- -------\n",
"50783434-8f1c-4749-a67d-4757cb2d1962 Node1 TACC tacc-w1.fabric-testbed.net 10 32 100 default_rocky_8 129.114.110.74 Active\n",
"d67ed5b6-d3a7-4985-b006-2fe36c1537ae Node1 TACC tacc-w1.fabric-testbed.net 10 32 100 default_rocky_8 129.114.110.100 Active\n",
"\n",
"Time to stable 91 seconds\n",
"Running post_boot_config ... Time to post boot config 92 seconds\n"
"Time to stable 115 seconds\n",
"Running post_boot_config ... Time to post boot config 115 seconds\n"
]
}
],
Expand All @@ -217,26 +171,26 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Step 6: Observe the Slice's Attributes\n",
"## Step 5: Observe the Slice's Attributes\n",
"\n",
"### Print the slice "
]
},
{
"cell_type": "code",
"execution_count": 21,
"execution_count": 7,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"----------- ---------------------------------------------------------------------------\n",
"Slice Name Slice Test TACC on tacc-w1.fabric-testbed.net on 2022-08-31 00:17:56.594589\n",
"Slice ID 86b81b23-c107-4252-89e5-5623a0cf5bf9\n",
"----------- ---------------------------------------------------------------------------------\n",
"Slice Name Slice Test 3.1.1 TACC on tacc-w1.fabric-testbed.net on 2022-09-01 19:50:58.529437\n",
"Slice ID 51d97ed9-1438-4add-886c-561622c16336\n",
"Slice State StableOK\n",
"Lease End 2022-09-01 00:18:29 +0000\n",
"----------- ---------------------------------------------------------------------------\n"
"Lease End 2022-09-02 19:51:14 +0000\n",
"----------- ---------------------------------------------------------------------------------\n"
]
}
],
Expand All @@ -260,15 +214,15 @@
},
{
"cell_type": "code",
"execution_count": 22,
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"----------------- ------------------------------------------------------------------------------------------------------------------------\n",
"ID 50783434-8f1c-4749-a67d-4757cb2d1962\n",
"----------------- -------------------------------------------------------------------------------------------------------------------------\n",
"ID d67ed5b6-d3a7-4985-b006-2fe36c1537ae\n",
"Name Node1\n",
"Cores 10\n",
"RAM 32\n",
Expand All @@ -277,11 +231,11 @@
"Image Type qcow2\n",
"Host tacc-w1.fabric-testbed.net\n",
"Site TACC\n",
"Management IP 129.114.110.74\n",
"Management IP 129.114.110.100\n",
"Reservation State Active\n",
"Error Message\n",
"SSH Command ssh -i /home/fabric/work/fabric_config/slice_key -J ibaldin_0000241998@bastion-1.fabric-testbed.net rocky@129.114.110.74\n",
"----------------- ------------------------------------------------------------------------------------------------------------------------\n"
"SSH Command ssh -i /home/fabric/work/fabric_config/slice_key -J ibaldin_0000241998@bastion-1.fabric-testbed.net rocky@129.114.110.100\n",
"----------------- -------------------------------------------------------------------------------------------------------------------------\n"
]
}
],
Expand All @@ -299,14 +253,14 @@
"tags": []
},
"source": [
"## Step 7: Delete the Slice\n",
"## Step 6: Delete the Slice\n",
"\n",
"Please delete your slice when you are done with your experiment."
]
},
{
"cell_type": "code",
"execution_count": 23,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"## Step 1: Configure the Environment\n",
"\n",
"Before running this notebook, you will need to configure your environment using the [Configure Environment](../fablib_api/configure_environment/configure_environment.ipynb) notebook. Please stop here, open and run that notebook, then return to this notebook.\n",
"Before running this notebook, you will need to configure your environment using the [Configure Environment](../../fablib_api/configure_environment/configure_environment.ipynb) notebook. Please stop here, open and run that notebook, then return to this notebook.\n",
"\n",
"**This only needs to be done once.**"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"\n",
"## Step 1: Configure the Environment\n",
"\n",
"Before running this notebook, you will need to configure your environment using the [Configure Environment](../fablib_api/configure_environment/configure_environment.ipynb) notebook. Please stop here, open and run that notebook, then return to this notebook.\n",
"Before running this notebook, you will need to configure your environment using the [Configure Environment](../../fablib_api/configure_environment/configure_environment.ipynb) notebook. Please stop here, open and run that notebook, then return to this notebook.\n",
"\n",
"**This only needs to be done once.**"
]
Expand Down

0 comments on commit a90093e

Please sign in to comment.