-
Notifications
You must be signed in to change notification settings - Fork 715
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
generate minigraph based on topology file (#531)
Signed-off-by: Guohan Lu <[email protected]>
- Loading branch information
Showing
36 changed files
with
12,457 additions
and
1,465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Device Minigraph Generation and Deployment | ||
|
||
Different topologies requires different configuration/minigraph on the DUT. | ||
```testbed-cli.sh gen-mg|deploy-mg``` allows to generate and deploy minigraph to | ||
the DUT based on the topology type. | ||
|
||
Before you run the command, first prepare [inventory](../lab) file and | ||
[testbed.csv](../testbed.csv) file. In the command line, `vms-sn2700-t0` | ||
is the testbed name defined in `testbed.csv`, `lab` is the inventory file. | ||
`password.txt` is the vault password file. | ||
|
||
``` | ||
./testbed-cli.sh deploy-mg vms-sn2700-t0 lab password.txt | ||
``` | ||
|
||
**Note** | ||
|
||
- To configure your SONiC switch with different port speeds, you need to specify port speed in `port_config.ini`. Example [port_config.ini](https://github.com/Azure/sonic-buildimage/blob/master/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/port_config.ini). | ||
|
||
## How it works | ||
|
||
The tool works as follows: | ||
|
||
- Read the testbed info from `testbed.csv` using the testbed name. | ||
|
||
- Read the topology information defined in topology file `vars/topo_{{ topology_name}}.yml` | ||
|
||
- Read the VMs information from the `veos` inventory file. | ||
|
||
- Generate minigraph based on minigraph templates in `templates` folder. | ||
|
||
- Deploy minigraph to the DUT. | ||
|
||
- Load the minigraph on DUT. | ||
|
||
- Save the configuration in config db. | ||
|
||
For more details, please refer the comments in [`config_sonic_basedon_testbed.yml`](../config_sonic_basedon_testbed.yml). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.