Setup for the Studios Labs¶
Example Files and Script¶
The examples for these labs are contained in a GitHub repository and contain all of the configuration and the supporting script to successfully complete each example.
This repository is located Here
Cloning the Repository To Your Machine¶
This step will require you to have git, pip, and Python 3 along with the requests package for Python installed on your local machine:
-
On your local computer, create a new directory where you’d like to save your lab files to
-
Open a terminal and browse to the directory you created.
-
Run the following command and the files from GitHub will be cloned to your machine:
Note
- CloudVisionPortal-Examples/CloudVision_Studios/InterOp_Examples_for_Studios - Contains the examples that we’ll use for each lab.
- CloudVisionPortal-Examples/CloudVision_Studios/InterOp_Examples_for_Studios/Studios_to_Use - The Studio versions to be used are stored in this directory.
- CloudVisionPortal-Examples/CloudVision_Studios/InterOp_Examples_for_Studios/Tags_Files - The Tags files to import are in this directory. This directory also contains the tagman.py script.
Tagman Script¶
The tagman.py
script, located in the CloudVisionPortal-Examples/CloudVision_Studios/InterOp_Examples_for_Studios/Tags_Files directory is used to automate tag assignment for each Studios lab. You’ll run this script to add or delete the tags for the examples.
The tagsfile.txt
file in this directory gives examples of how to use the tagman.py file.
The syntax of the script is:
python3 tagman.py -u [ATD username] -p [ATD password] -c [ATD DNS without preceding “https://” and trailing “/”] -f [the example tagsfile.text] -a import
Note
- You will need to gather your CVP password from the topology landing page in your browser, as well as your topology URL. This can be copied by clicking the “Copy Address” link on the CVP landing page as well.
- Any open workspace in the ATD will be unaware of any changes to tags you make with tagman.py You will need to create a new workspace after running any of its commands.
- You can use -help to see the command syntax.
Onboarding Devices¶
Devices need to be onboarded to the Studios environment in order for a configuration to be pushed to them. If you do not onboard the devices, any configuration created and subsequently executed in Change Control will not be applied to the devices.
-
Open CVP, login using your lab credentials and then browse to Provisioning > Studios. Create a new Workspace (you may name it anything you like). Then click on Inventory and Topology.
-
Click the Add Updates tab and click Add All New Updates on the right.
-
Click Review Workspace.
-
After Studios builds the config, you will be able to click Submit Workspace to submit the workspace.
All of the devices within CVP are now available to be provisioned by Studios and configuration can be pushed to them.
Adding Tags¶
To add tags for a given lab, you’ll append -o add to the command, like the example below that adds the Example 1 tags for the first lab:
python3 tagman.py -u arista -p YOUR_CVP_PASSWORD -c *unique-name*.topo.testdrive.arista.com -f tagsfile-example1.txt -a import -o add
Deleting Tags¶
Between each lab you do, you will have to remove the tags used by the previous lab. This can be done with the following command, which will remove the Example1 tags:
python3 tagman.py -u arista -p YOUR_CVP_PASSWORD -c *unique-name*.topo.testdrive.arista.com -f tagsfile-example1.txt -a import -o delete
Importing Studios and Inputs¶
The studios and inputs required to complete the labs are available for import in the CloudVision_Studios folder of the cloned repository.
Enable Import of Inputs:
-
Browse to Settings > General Settings.
-
on Mac: Press Control + Shift + A to reveal the alpha settings.
-
Scroll to the bottom of Features and enable Studios Alpha Features.
You’ll now be able to import Studio inputs.
Import a Studio¶
-
In CVP, Browse to Provisioning > Studios. Create a new Workspace and click the Import button on the top right.
-
In the import dialog, navigate to the Studios_to_Use directory in the repository.
-
Select each studio and import them all. Click Upload.
-
You’ll have to repeat these steps to import all 5 files as you can only do one at a time.
-
You will now see the new Studios listed on your main Studios landing page under the heading Custom-Built and it should look like this:
Import Studio Inputs¶
These Studio inputs are specific to each individual lab, so these will need to be imported for each lab you do.
-
Open the Campus Fabric Studio and click the ellipsis in the upper right corner beside Edit.
-
Select Import under the Inputs section, then navigate to the InterOp_Examples_for_Studios/Example1_Campus_to_ISP_BGP folder and import the file called Inputs_Campus Fabric.
-
Repeat steps 1 and 2, but instead, click on the Enterprise Routing Studio, then import the Inputs_Enterprise_Routing file.
Success
You are now ready to begin the first Studios lab.