A Network as Code repository organizes network configurations, tests, and automation in a structured way. This makes it easy to manage, version control, and deploy network changes safely and consistently. In this lab, you'll work with the LTROPS-2711 repository, which manages the entire data center fabric.
GitLab is a web-based DevOps lifecycle tool that provides Git repository management, issue-tracking, and CI/CD pipeline features using an open-source license. To get started, you will login to the GitLab instance to view the LTROPS-2711 repository.
Login to the GitLab instance by clicking the URL below or copying the URL into a new tab in your browser window:
Login using the information below:
The LTROPS-2711 repository is already created and initialized with the necessary files for the lab. Additional configuration files will be added to the repository as we progress through the lab.
The repository contains these main components:
LTROPS-2711/
├── .ci/
│ ├── webex-notification-gitlab.py
├── .rules/
│ └── 101_unique_keys.py
├── data/
├── cxtm/
├── .schema.yaml
├── main.tf
└── README.md
.ci/ folder - Contains reusable scripts that perform specific pipeline tasks. The webex-notification-gitlab.py script is called by the .gitlab-ci.yml pipeline stages to send notifications about pipeline execution results.
.rules/ folder - Contains scripts that define conditional logic when pipeline jobs are run.
.schema.yaml - Defines the data model rules for all network device configurations. This schema ensures that YAML configuration files follow a consistent structure and contain valid parameters.
main.tf - The primary Terraform configuration file that orchestrates the deployment of your Nexus fabric. It defines the Terraform backend for state management and declares the NX-OS module that processes all YAML files in the data/ directory to generate and apply device configurations.
data/ folder - Stores individual YAML files for each network device. These files define the desired state of each device's configuration in a human-readable format. You'll be adding and maintaining the configuration files for all the devices in the lab topology during the lab exercises.
cxtm/ folder - Contains Robot Framework test cases that validate network functionality after configuration changes are deployed. These automated tests ensure the network is operating as expected.
.gitlab-ci.yml - Defines the CI/CD pipeline that automates the entire workflow through five stages: Validate (check YAML files for errors), Plan (preview what changes will be made), Deploy (apply changes to devices), Test (run CXTM tests to verify success), and Notify (send results to your team). This ensures every change is tested before reaching your network.
Visual Studio Code is an interactive development environment (IDE) or simply, a code editor. You may hear Visual Studio Code referenced as VS Code or just code in the industry. VS Code is free to use for many types of development and supports various extensions for syntax checking and highlighting depending on the code language you are working with. For this lab, you will be working primarily with YAML file types. You will leverage VS Code as your code editor and GitLab's CI pipeline as your runtime environment.
The VS Code Server is a web-based IDE version that provides a development environment for this lab.
If the keyboard shortcut above does not work, please open the VS Code Server hamburger menu and click Terminal > New Terminal
git clone git@cait-gitlab.svsrtpdmz.cisco.com:CL-POD03/LTROPS-2711.git
The authenticity of host 'cait-gitlab.svsrtpdmz.cisco.com (10.0.205.200)' can't be established.
ED25519 key fingerprint is SHA256:gJcb41tVGExNFq7UBf+z8bYRH7L1Y+WKvFPp6fbmXls.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
cd LTROPS-2711/
Continue to the next section to create and manage the Nexus data center deployment configurations.