- Initial Setup
- Topology Creation
- Data Harvest
- Pipeline Deployment
- Data Validation
- Stateful Checks
- Telemetry Collection
In this exercise, we will deploy our production environment. The repository contains both an mdd_prod topology file and an mdd_test topology file. Our production topology is fully configured, while our test topology has no configuration on it. For the instructor led classes, the test topology will already be created.
Execute the following playbook to launch the topology:
ansible-playbook cisco.cml.build -e startup='host' -e wait='yes' -i=inventory_prod
This will take a little while since we are booting up each device. Although Cisco Modeling Labs is a simulation platform, it does run the same fully featured software as physical infrastructure. As the topology launches. Explore your inventory_prod directory.
Once your prod environment is set up, you can run the following playbook to see an inventory and get the IP addresses of NSO and Elastic.
ansible-playbook cisco.cml.inventory -i inventory_prod
Take note of the IP addresses for NSO and Elastic, so we can access them later in the labs.
For brownfield environments without a consistent API, NSO can be used as our single consistent API gateway into all of our infrastructure. To maintain a single source-of-truth, we use an NSO container for each environment (test and prod). When executing our pipeline, we target the NSO running in the correct environment.
Install NSO in server mode for prod environment.
ansible-playbook ciscops.mdd.nso_install -i inventory_prod
Install NSO MDD Packages in prod environment
ansible-playbook ciscops.mdd.nso_update_packages -i inventory_prod
Add Default auth group to your NSO prod environment
ansible-playbook ciscops.mdd.nso_init -i inventory_prod
Add devices to prod NSO inventory
ansible-playbook ciscops.mdd.nso_update_devices -i inventory_prod
To deploy the telemetry stack, run the telemetry install playbook.
ansible-playbook ciscops.mdd.telemetry_install_elastic -i inventory_prod
This may take some time, because we are installing docker on the host, deploying containers, and waiting for the stack to come up. Once the containers are up and running, you will see a report verifying each one is working correctly.
Once complete, you can navigate to the IP address of your telemetry host using port 5601 to verify elastic came up.
Note: If your test environment is already set up, you can proceed to the Data Harvest section.
The digital twin playbook is meant to map a physical environment and auto-generate a topology and interface mapping table that can be imported to CML for CI testing. This playbook will not fully work when mapping an already simulated environment, but it is worth going through the exercise to understand the output.
ansible-playbook ciscops.mdd.cml_update_lab -i inventory_prod -e start_from=1 -e inventory_dir=inventory_test -e use_cat9kv=yes
If you need to set up your test environment, you have to change your environment variable to target mdd_test in CML and follow the same set of instructions a second time using the inventory_test directory.
export CML_LAB=mdd_test
Deploy lab
ansible-playbook cisco.cml.build -e startup='host' -e wait='yes' -i=inventory_test
Deploy NSO
ansible-playbook ciscops.mdd.nso_install -i inventory_test
ansible-playbook ciscops.mdd.nso_update_packages -i inventory_test
ansible-playbook ciscops.mdd.nso_init -i inventory_test
ansible-playbook ciscops.mdd.nso_update_devices -i inventory_test
We do not need to push a second ELK stack since our testing will be targeted at the network configuration.



