- Clone and enter the repo:
git clone https://github.com/model-driven-devops/digital-twin.git
cd digital-twin
- Set the default environment variables:
. ./envvars
- Create a virtual environment
- It is highly recommended that you create a virtual environment to make it easier to install the dependencies without conflict.
python3 -m venv venv
. ./venv/bin/activate
- Install the Python requirements via pip:
pip3 install -r requirements.txt
- Reactivate the virtual environment
- Ensures your shell is using the newly installed ansible.
deactivate
. ./venv/bin/activate
- Install the tooling and its Ansible dependencies via ansible-galaxy:
ansible-galaxy collection install -r requirements.yml
- Set the following environment variables as appropriate for your environment:
export CML_HOST=your.cml.server
export CML_USERNAME=your_user
export CML_PASSWORD=your_pass
export CML_LAB=your_lab
export CML_VERIFY_CERT=false
- Build the reference architecture in CML and start the nodes:
ansible-playbook cisco.cml.build -e startup=host -e wait=yes
- Verify that all nodes have IP addresses:
ansible-playbook cisco.cml.inventory
- Install NSO:
- Note: The task may fail to execute while waiting for host reachability. If so, ensure the 'sshpass' program is installed on your system.
ansible-playbook ciscops.mdd.nso_install
- Update NSO packages:
ansible-playbook ciscops.mdd.nso_update_packages
- Initialize NSO configuration:
ansible-playbook ciscops.mdd.nso_init
- Add devices to NSO:
ansible-playbook ciscops.mdd.nso_update_devices
- Get the IP address of NSO:
ansible-playbook cisco.cml.inventory --limit nso1
Browse to NSO using HTTP, the IP address of your NSO and port 8080. Example: http://192.168.0.100:8080. The default crendentials are ubuntu/admin.
Click on Device Manager and verify that n9kv1 and n9kv2 are configured in NSO.