SDPTestSuite-BattleSchool.md #3

  • //
  • test-install_sdp/
  • dev/
  • ai_dev_support/
  • SDPTestSuite-BattleSchool.md
  • Markdown
  • View
  • Commits
  • Open Download .zip Download (4 KB)

Battle School Workshop (BSW) Test Suite

A standing and dedicated P4 Battle School Workshop (BSW) lab environment is used for executing some SDP tests. The test scripts and configuration files are included with the SDP. The Battle School Workshop (BSW) consists of 5 P4 servers extending a single data set around the world (simulated...really all 5 machines are on one subnet). There is als a UI/Jump box users use to login and intact with the environment. The BSW environment was originally developed (and is still used) for realistic simulation training, e.g. simulating failures and allowing students to practice recovery procedures in a safe, non-production environment. BSW is also used for SDP development, demos, bug reproductions for Engineering, etc. For SDP testing purposes, a standing lab environment is useful for testing some of the more sophisticated scripts in the SDP, such as the recover_edge.sh, the testing of which requres a sophisticated P4 multi-server topology.

The SDP 2025.2 Patch 1 that shipped recently was tested in a lab environment named SDP_QA-Gen6, which used the "Generation 6" (Gen6) BSW lab environment. The coming SDP 2026.1 will use the "Generation 7" (Gen7) lab environment, and a new dedicated and standing lab environment has been created for that, named SDP_QA-Gen7.

A key feature a BSW lab environment is that a student user easily reset the environment to a known state, both in terms of the exact version of SDP and P4 server software used as well as the state of the training data set -- complete with P4 server specs, service users, and all the other bits needed to simulate a global topology. When used for training, a human student logged in as the 'student' user on the UI/Jump box of the lab environment would run the command 'lab 0' to set the environment to the default start state, where everything is happy and running well -- a P4 commit server with various replicas. It all "just works." The '0' in that command is the LabID. When doing training, students can proceed through a series of labs, 'lab 1', 'lab 2', etc.

When used as part of the SDP Test Suite, we run lab qa. This changes things so that rather than setting things to the default start state, SDP files in key directories, e.g. /p4/common/bin, are pulled from version control, so that the latest files can easily be deployed across the BSW fleet of 5 servers. The lab environment is then setup.

The Gen6 version of Battle School pulls from the SDP Classic depot path on the Public Depot P4 Server, //guest/perforce_software/sdp/dev/...; this a fixed path.

The Gen7 version of Battle School currently pulls from the new SDP Stream branch //p4-sdp/dev_rebrand. The Gen7 mechanism will need to be easy to switch its target steram, so it can pull from any specified //p4-sdp/* stream.

The Battle School Workshop software itself lives in a dfferent P4 Server known as the Perforce Partner Network (PPN) server, with P4PORT=ssl:ppn.perforce.com:1670. Like the Public Depot, it is accessible over the public internet. However, the PPN server is not public. It is generally used for collaboration with Perforce partners, vendors, and customers, especially Consulting customers. On the PPN server, Battle School lives in the //BattleSchool stream depot, with these streams:

  • //BattleSchool/main - Currently released software, the Gen6 version.
  • //BattleSchool/Gen7 - Development stream for the Gen7 Battle School Workshop (this is working and available for development, but not yet released.)

Eventually, Gen7 will be promoted to main and a Gen8 stream will be created, but that's farther down the road.

When we're ready to work in any Battle School Workshop lab environment, including the SDP_QA-Gen7 environment, thse docs will useful to review:

  • //BattleSchool/Gen7/ai/BSW-Lab-Reference.md
  • //BattleSchool/Gen7/ai/BSW_P4_Data_Sources.md

These docs were generated as a by-product of working on BSW-43, an enhancement to the BSW environment to support labs that use and illustrate NFS sharing. These docs detail how to get around in the environment, and the various P4 data sources involved. (Some of that information may need to be updated based on information in this project, e.g. the migration of the SDP Installer test suite to the //test-install_sdp stream depo. We can update those as needed when we get to the point where it's relevant).

# Battle School Workshop (BSW) Test Suite

A standing and dedicated P4 Battle School Workshop (BSW) lab environment is used for executing some SDP tests.  The test scripts and configuration files are included with the SDP.  The Battle School Workshop (BSW) consists of 5 P4 servers extending a single data set around the world (simulated...really all 5 machines are on one subnet).  There is als a UI/Jump box users use to login and intact with the environment. The BSW environment was originally developed (and is still used) for realistic simulation training, e.g. simulating failures and allowing students to practice recovery procedures in a safe, non-production environment. BSW is also used for SDP development, demos, bug reproductions for Engineering, etc.  For SDP testing purposes, a standing lab environment is useful for testing some of the more sophisticated scripts in the SDP, such as the `recover_edge.sh`, the testing of which requres a sophisticated P4 multi-server topology.

The SDP 2025.2 Patch 1 that shipped recently was tested in a lab environment named SDP_QA-Gen6, which used the "Generation 6" (Gen6) BSW lab environment.  The coming SDP 2026.1 will use the "Generation 7" (Gen7) lab environment, and a new dedicated and standing lab environment has been created for that, named SDP_QA-Gen7.

A key feature a BSW lab environment is that a student user easily reset the environment to a known state, both in terms of the exact version of SDP and P4 server software used as well as the state of the training data set -- complete with P4 server specs, service users, and all the other bits needed to simulate a global topology. When used for training, a human student logged in as the 'student' user on the UI/Jump box of the lab environment would run the command 'lab 0' to set the environment to the default start state, where everything is happy and running well -- a P4 commit server with various replicas.  It all "just works."  The '0' in that command is the LabID. When doing training, students can proceed through a series of labs, 'lab 1', 'lab 2', etc.

When used as part of the SDP Test Suite, we run `lab qa`. This changes things so that rather than setting things to the default start state, SDP files in key directories, e.g. /p4/common/bin, are pulled from version control, so that the latest files can easily be deployed across the BSW fleet of 5 servers.  The lab environment is then setup.

The Gen6 version of Battle School pulls from the SDP Classic depot path on the Public Depot P4 Server, //guest/perforce_software/sdp/dev/...; this a fixed path.

The Gen7 version of Battle School currently pulls from the new SDP Stream branch //p4-sdp/dev_rebrand.  The Gen7 mechanism will need to be easy to switch its target steram, so it can pull from any specified //p4-sdp/* stream.

The Battle School Workshop software itself lives in a dfferent P4 Server known as the Perforce Partner Network (PPN) server, with P4PORT=ssl:ppn.perforce.com:1670.  Like the Public Depot, it is accessible over the public internet. However, the PPN server is not public. It is generally used for collaboration with Perforce partners, vendors, and customers, especially Consulting customers.  On the PPN server, Battle School lives in the //BattleSchool stream depot, with these streams:

* `//BattleSchool/main` - Currently released software, the Gen6 version.
* `//BattleSchool/Gen7` - Development stream for the Gen7 Battle School Workshop (this is working and available for development, but not yet released.)

Eventually, Gen7 will be promoted to main and a Gen8 stream will be created, but that's farther down the road.

When we're ready to work in any Battle School Workshop lab environment, including the SDP_QA-Gen7 environment, thse docs will useful to review:

* //BattleSchool/Gen7/ai/BSW-Lab-Reference.md
* //BattleSchool/Gen7/ai/BSW_P4_Data_Sources.md

These docs were generated as a by-product of working on BSW-43, an enhancement to the BSW environment to support labs that use and illustrate NFS sharing. These docs detail how to get around in the environment, and the various P4 data sources involved. (Some of that information may need to be updated based on information in this project, e.g. the migration of the SDP Installer test suite to the //test-install_sdp stream depo. We can update those as needed when we get to the point where it's relevant).
# Change User Description Committed
#3 33150 C. Thomas Tyler Refined.
#2 33149 C. Thomas Tyler Updated BSW background info.
#1 33145 C. Thomas Tyler Added AI development support files in isoldated ai_dev_support/ folder,
and added a top-level .p4ignore file.