You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ansible/doc/README.testbed.Config.md
+24-3Lines changed: 24 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,29 @@
1
1
# Testbed Configuration
2
2
3
-
```testbed.csv``` is the topology configuration file for the testbed.
3
+
## Testbed Inventory
4
4
5
-
# ```testbed.csv```
5
+
-[```ansible/lab```](../lab): Include all lab DUTs, fanout switches and testbed server topologies
6
+
7
+
-[```ansible/veos```](../veos): all servers and VMs
8
+
9
+
## Testbed Physical Topology
10
+
11
+
-[```ansible/files/sonic_lab_devices.csv```](../files/sonic_lab_devices.csv): Helper file helps you create lab_connection_graph.xml, list all devices that are physically connected to fanout testbed (all devices should be in ansible/lab)
12
+
13
+
-[```ansible/files/sonic_lab_links.csv```](../files/sonic_lab_links.csv): Helper file helps you to create lab_connection_graph.xml, list all physical links between DUT, Fanoutleaf and Fanout root switches, servers and vlan configurations for each link
14
+
15
+
-[```ansible/files/lab_connection_graph.xml```](../files/lab_connection_graph.xml): This is the lab graph file for library/conn_graph_facts.py to parse and get all lab fanout switch connections information. If you have only one fanout switch, you may go head manually modify the sample lab_connection_graph.xml file to set bot your fanout leaf and fanout root switch management IP point to the same fanout switch management IP and make sure all DUT and Fanout name and IP are matching your testbed.
16
+
17
+
-```ansible/files/creategraph.py```: Helper file helps you generate a lab_connection_graph.xml based on the device file and link file specified above.
18
+
19
+
Based on ansible_facts, you may write ansible playbooks to deploy fanout switches or run test which requires to know the DUT physical connections to fanout switch
20
+
21
+
22
+
## Testbed Logical Topology
23
+
24
+
[```testbed.csv```](../testbed.csv) is the topology configuration file for the testbed.
Pre-built *sonic-mgmt* can also be downloaded from [here](https://sonic-jenkins.westus.cloudapp.azure.com/job/common/job/docker-sonic-mgmt/lastSuccessfulBuild/artifact/target/docker-sonic-mgmt.gz).
63
+
64
+
- Run *sonic-mgmt* docker
51
65
```
52
66
docker load -i target/docker-sonic-mgmt.gz
53
67
docker run -it docker-sonic-mgmt bash
54
68
cd ~/sonic-mgmt
55
69
```
56
70
57
-
From now on, all steps are running inside the ```sonic-mgmt``` docker.
71
+
From now on, all steps are running inside the *sonic-mgmt* docker.
58
72
59
73
## Prepare testbed configurations
60
74
61
-
Prepare various configuration files for your testbed.
62
-
63
-
- Add/Update your testbed server management IP in veos file. Example:'STR-ACS-SERV-01 ansible_host=10.0.0.5' where 10.0.0.5 your server mgmt ip
64
-
- Add testbed server credentials in ```ansible/group_vars/vm_host/creds.yml```
65
-
- Check that ansible could reach this device by command ```ansible -m ping -i veos vm_host_1```
66
-
- Put files: ```Aboot-veos-serial-8.0.0.iso``` and ```vEOS-lab-4.15.9M.vmdk``` to /home/{your_username from step 3}/veos-vm/images on your testbed server
67
-
- Edit ```ansible/host_vars/STR-ACS-SERV-01.yml```. You need to change ```external_iface```,```mgmt_gw``` and ```mgmt_prefixlen```. These settings define network parameters for VM/ptf management interfaces. Example:
68
-
69
-
```
70
-
external_iface: p4p1 <--- trunk port of the server (connected to the fanout switch)
71
-
mgmt_gw: 10.250.0.1 <--- ip of gateway for VM mgmt interfaces
72
-
mgmt_prefixlen: 24 <--- prefixlen for management interfaces
73
-
```
74
-
75
-
- Add ip addresses for your VMs in veos inventory file ```ansible/veos``` inventory file. These IP addresses should be in the management subnet defined in above file.
76
-
- Update VM credentials in ```ansible/group_vars/eos/creds.yml```. Use root:123456 as credentials
77
-
- Add information about your docker registry here: ```vars/docker_registry.yml```
75
+
Latest *sonic-mgmt* repo is cloned into *sonic-mgmt* docker under '/var/[your-login-username]/sonic-mgmt`.
76
+
Once you are in the docker, you need to modify the testbed configuration files to reflect your lab setup.
77
+
78
+
- Server
79
+
- Update server management IP in [```ansible/veos```](../veos).
80
+
- Update testbed server credentials in [```ansible/group_vars/vm_host/creds.yml```](../group_vars/vm_host/creds.yml).
81
+
- Update server network configuration for VM and PTF management interface in [```ansible/host_vars/STR-ACS-SERV-01.yml```](../host_vars/STR-ACS-SERV-01.yml).
82
+
-```external_iface```: server trunk port name (connected to the fanout switch)
83
+
-```mgmt_gw```: ip of gateway for VM mgmt interfaces
84
+
-```mgmt_prefixlen```: prefixlen for management interfaces
85
+
- Check that ansible could reach this device by command ```ansible -m ping -i veos vm_host_1```.
86
+
87
+
- VM
88
+
- Download vEOS image from [arista](https://www.arista.com/en/support/software-download).
89
+
- Copy below image files to ```~/veos-vm/images``` on your testbed server.
90
+
-```Aboot-veos-serial-8.0.0.iso```
91
+
-```vEOS-lab-4.15.9M.vmdk```
92
+
- Update VM IP addresses [```ansible/veos```](../voes) inventory file. These IP addresses should be in the management subnet defined above.
93
+
- Update VM credentials in [```ansible/group_vars/eos/creds.yml```](../group_vars/eos/creds.yml).
94
+
95
+
-```PTF``` docker
96
+
- Update docker registry information in [```vars/docker_registry.yml```](../vars/docker_registry.yml).
78
97
79
98
## Setup VMs in the server
80
99
81
-
82
100
```
83
101
./testbed-cli.sh start-vms server_1 password.txt
84
102
```
@@ -87,7 +105,7 @@ Check that all VMs are up and running: ```ansible -m ping -i veos server_1```
87
105
88
106
## Deploy topology
89
107
90
-
- Update testbed.csv with your data. At least update PTF mgmt interface settings
108
+
- Update ```testbed.csv``` with your data. At least update PTF mgmt interface settings
91
109
- To deploy PTF topology run: ```./testbed-cli.sh add-topo ptf1-m ~/.password```
92
110
- To remove PTF topology run: ```./testbed-cli.sh remove-topo ptf1-m ~/.password```
93
111
- To deploy T1 topology run: ```./testbed-cli.sh add-topo vms-t1 ~/.password```
0 commit comments