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
The tool will help you automate your CML lab deployments with SD-WAN Manager, Controllers and Validators and up to 20 SD-WAN edges. You can build as pods as your CML platform can host. Please refer to the [Limitations and scale](#limitations-and-scale) for details.
9
9
10
-
11
-
12
10
## Getting Started
13
11
14
12
### Prerequisites
15
-
Catalyst SD-WAN Lab Deployment Tool requires Linux or macOS system.
13
+
14
+
Catalyst SD-WAN Lab Deployment Tool requires Linux or macOS system.
16
15
To run is on Windows, please use [Linux on Windows with WSL](/README.md#appendix---wsl-installation) or set up Linux VM/container.
17
16
18
17
Catalyst SD-WAN Lab Deployment Tool requires Python 3.9 or newer. This can be verified by pasting the following to a terminal window:
@@ -28,31 +27,32 @@ This tool requires CML 2.6 or higher.
28
27
Demo of the tool and guide on how to use it can be found on this [youtube video](https://www.youtube.com/watch?v=WxiZ5bxlDk8)
29
28
30
29
### Installing
30
+
31
31
The recommended way to install is via pip.
32
32
33
33
Create a directory to store the virtual environment and runtime files:
34
34
35
35
mkdir csdwan
36
36
cd csdwan
37
-
37
+
38
38
Create virtual environment:
39
39
40
40
python3 -m venv venv
41
-
41
+
42
42
Activate virtual environment:
43
43
44
44
source venv/bin/activate
45
-
45
+
46
46
- Note that the prompt is updated with the virtual environment name (venv), indicating that the virtual environment is active.
47
-
47
+
48
48
Upgrade initial virtual environment packages:
49
49
50
50
pip install --upgrade pip setuptools
51
51
52
52
To install SD-WAN Lab Deployment Tool:
53
53
54
54
pip install --upgrade catalyst-sdwan-lab
55
-
55
+
56
56
Verify that SD-WAN Lab tool can run:
57
57
58
58
sdwan-lab --version
@@ -62,34 +62,37 @@ You can also use the following shortcut to run any lab task:
62
62
csdwan --version
63
63
64
64
Notes:
65
+
65
66
- The virtual environment is deactivated by typing 'deactivate' at the command prompt.
66
67
- Before running Catalyst SD-WAN Lab Deployment Tool again, make sure to activate the virtual environment back again (source venv/bin/activate).
67
68
68
69
## Usage
70
+
69
71
Simmilar to [Sastre](https://github.com/CiscoDevNet/sastre), the command line is structured as a set of base parameters, the task specification followed by task-specific parameters:
Base parameters define global options such as verbosity level, CML credentials, etc.
74
76
75
77
Task indicates the operation to be performed. The following tasks are currently available:
76
-
*[Setup](#setup-task): Setup CML to support Catalyst SD-WAN use cases, upload new software images, and create node and image definitions that are required to run Catalyst SD-WAN lab in the CML.
77
-
*[Deploy](#deploy-task): Deploy CML topology with two underlay networks (INET, MPLS), one Manager/Validator/Controller, and one Gateway router. Once topology boots up, configure the control components and create basic templates / configuration groups.
78
-
*[Add](#add-task): Add and automatically onboard additional SD-WAN nodes (Validators/Controllers/Edges) to existing lab.
79
-
*[Backup](#backup-task): Backup the Catalyst SD-WAN Lab runnning in CML, including the CML topology and all its nodes, SD-WAN device states and templates / configuration groups.
80
-
*[Restore](#restore-task): Restore the Catalyst SD-WAN Lab from backup, onboard and confgure control components and create basic feature templates / configuration groups. If there are any WAN Edges, automatically onboard the WAN Edges back to the SD-WAN Manager using the configuration from the backup.
81
-
*[Delete](#delete-task): Delete currently running lab from CML and remove all lab data.
82
-
*[Sign](#sign-task): Sign Certificate Signing Request (CSR) using SD-WAN Lab Deployment Tool Root CA
78
+
79
+
-[Setup](#setup-task): Setup CML to support Catalyst SD-WAN use cases, upload new software images, and create node and image definitions that are required to run Catalyst SD-WAN lab in the CML.
80
+
-[Deploy](#deploy-task): Deploy CML topology with two underlay networks (INET, MPLS), one Manager/Validator/Controller, and one Gateway router. Once topology boots up, configure the control components and create basic templates / configuration groups.
81
+
-[Add](#add-task): Add and automatically onboard additional SD-WAN nodes (Validators/Controllers/Edges) to existing lab.
82
+
-[Backup](#backup-task): Backup the Catalyst SD-WAN Lab runnning in CML, including the CML topology and all its nodes, SD-WAN device states and templates / configuration groups.
83
+
-[Restore](#restore-task): Restore the Catalyst SD-WAN Lab from backup, onboard and confgure control components and create basic feature templates / configuration groups. If there are any WAN Edges, automatically onboard the WAN Edges back to the SD-WAN Manager using the configuration from the backup.
84
+
-[Delete](#delete-task): Delete currently running lab from CML and remove all lab data.
85
+
-[Sign](#sign-task): Sign Certificate Signing Request (CSR) using SD-WAN Lab Deployment Tool Root CA
83
86
84
87
Task-specific parameters are provided after the task argument.
@@ -100,7 +103,7 @@ Task-specific parameters are provided after the task argument.
100
103
restore Restore Catalyst SD-WAN POD from backup.
101
104
delete Delete the CML lab and all the lab data.
102
105
sign Sign CSR using the SD-WAN Lab Deployment Tool Root CA.
103
-
106
+
104
107
optional arguments:
105
108
-h, --help show this help message and exit
106
109
-c <cml-ip>, --cml <cml-ip>
@@ -113,15 +116,16 @@ Task-specific parameters are provided after the task argument.
113
116
--version show program's version number and exit
114
117
115
118
Most of the parameters can also be provided via environment variables:
116
-
* CML_IP
117
-
* CML_USER
118
-
* CML_PASSWORD
119
-
* MANAGER_IP
120
-
* MANAGER_USER
121
-
* MANAGER_PASSWORD
122
-
* MANAGER_MASK
123
-
* MANAGER_GATEWAY
124
-
* LAB_NAME
119
+
120
+
- CML_IP
121
+
- CML_USER
122
+
- CML_PASSWORD
123
+
- MANAGER_IP
124
+
- MANAGER_USER
125
+
- MANAGER_PASSWORD
126
+
- MANAGER_MASK
127
+
- MANAGER_GATEWAY
128
+
- LAB_NAME
125
129
126
130
For any of the required arguments, user is prompted for a value if they are not provided via the environment variables or command line arguments.
127
131
@@ -142,6 +146,7 @@ The easiest way to run the tool is to provide all the lab variables in the rc fi
142
146
Note that if password was not defined, the user will be prompted for a password. Also please note we recommend not to use admin user as MANAGER_USER. Instead, configure a different user name to always have a backup user. By default, the MANAGER_PASSWORD will be set for both admin user and the MANAGER_USER that you specify.
143
147
144
148
Note that MANAGER_IP can be:
149
+
145
150
- an IP address: SD-WAN Manager will be reachable over this IP address. By default the IP address should come from the same subnet as CML IP, unless custom bridge is specified during deploy task.
146
151
- a PATty port in format "pat:<outside-port>": SD-WAN Manager will be reachable over CML IP port <outside-port>. Before using this option, PATTy needs to be enabled on the CML server as per [CML documentation](https://developer.cisco.com/docs/modeling-labs/patty-tool-mapping-configuration/).
147
152
@@ -158,38 +163,43 @@ If you want to use PATty the rc file above will change slighty to the following.
158
163
% source rc-PATty-example.sh
159
164
160
165
### Task-specific Parameters
166
+
161
167
Task-specific parameters and options are defined after the task is provided. Each task has its own set of parameters. Check the task documentation to learn more about task-specific parameters.
162
168
163
169
### Setup Task
170
+
164
171
This task makes sure your CML is ready to run Catalyst SD-WAN labs. The task will:
165
-
* Create node definitions that are required to run Catalyst SD-WAN lab in the CML: Manager, Validator, Controller and Edge
166
-
* Look for new SD-WAN software images in the folder where the script was run. If the image is found, upload the image to CML and create image definition for the right node definition: Manager, Validator, Controller and Edge
172
+
173
+
- Create node definitions that are required to run Catalyst SD-WAN lab in the CML: Manager, Validator, Controller and Edge
174
+
- Look for new SD-WAN software images in the folder where the script was run. If the image is found, upload the image to CML and create image definition for the right node definition: Manager, Validator, Controller and Edge
167
175
168
176
On each CML server that you want to use, you should run a setup task at least once to create required node and image definitions. You can rerun the setup task each time you want to add a new Catalyst SD-WAN software image to your CML server.
169
177
170
-
This task have one task-specific argument that allows you to migrate the node and image definitions to new format if you've used SD-WAN Lab 1.x in the past.
178
+
This task have one task-specific argument that allows you to migrate the node and image definitions to new format if you've used SD-WAN Lab 1.x in the past.
171
179
172
180
sdwan-lab setup -h
173
181
usage: sdwan-lab.py setup [-h] [--migrate]
174
-
182
+
175
183
optional arguments:
176
184
-h, --help show this help message and exit
177
185
--migrate Migrate node and image definitions from SD-WAN Lab v1.x to v2.x. This task should be run once if CML server was using SD-WAN LAb Tool v1.x in the past.
178
186
179
187
### Deploy Task
188
+
180
189
This task:
190
+
181
191
1. Defines four/five subnets:
182
-
* VPN0 - 172.16.0.0/24
183
-
* INET - 172.16.1.0/24
184
-
* MPLS - 172.16.2.0/24
185
-
* External Connector - in bridge mode, this subnet is defined by task-specific parameters and is used to provide external reachability to SD-WAN Manager.
186
-
* Internet Connector - in NAT mode, this subnet provides Internet connectivity for Internet transport and is same as CML subnet
192
+
- VPN0 - 172.16.0.0/24
193
+
- INET - 172.16.1.0/24
194
+
- MPLS - 172.16.2.0/24
195
+
- External Connector - in bridge mode, this subnet is defined by task-specific parameters and is used to provide external reachability to SD-WAN Manager.
196
+
- Internet Connector - in NAT mode, this subnet provides Internet connectivity for Internet transport and is same as CML subnet
187
197
2. Deploys basic SD-WAN topology with:
188
-
* two underlay networks (INET, MPLS)
189
-
* one Manager
190
-
* one Validator
191
-
* one Controller
192
-
* one Gateway router that connects VPN0 subnet to INET and MPLS subnets
198
+
- two underlay networks (INET, MPLS)
199
+
- one Manager
200
+
- one Validator
201
+
- one Controller
202
+
- one Gateway router that connects VPN0 subnet to INET and MPLS subnets
193
203
3. Once topology boots up, the task configures the control plane (control components, certificates, etc.) and create basic feature templates / configuration groups that can be used for WAN Edge onboarding. It also attaches Controller to device template.
194
204
4. At this point you can start creating your custom topology using [Add Task](#add-task) to automatically onboard additional SD-WAN nodes (Validators/Controllers/Edges).
195
205
@@ -200,10 +210,10 @@ This task has several task-specific parameters, including software version that
<software-version> Software version that will be used on SD-WAN Control Components.
206
-
216
+
207
217
optional arguments:
208
218
-h, --help show this help message and exit
209
219
--manager <manager-ip>
@@ -224,11 +234,14 @@ This task has several task-specific parameters, including software version that
224
234
--retry If for some reason your script lost connectivity during SD-WAN Manager boot, you can add --retry to continue onboarding the lab that is already in CML.
225
235
226
236
Time to complete the deployment task depends on:
227
-
* SD-WAN software version
228
-
* CML resources
237
+
238
+
- SD-WAN software version
239
+
- CML resources
229
240
230
241
### Add Task
242
+
231
243
This task adds Catalyst SD-WAN nodes (Validators/Controllers/Edges) into existing Catalyst SD-WAN lab. This task will:
244
+
232
245
1. Add requested number of nodes to the CML topology and boot them with cloud-init configuration
233
246
2. Once nodes boot up, automatically onboard them to SD-WAN Manager
234
247
3. For Controller/Edge nodes, automatically attach basic device template / configuration group
@@ -238,12 +251,12 @@ This task has several task-specific parameters.
<number-of-devices> Number of devices to be added.
244
257
<device-type> Type of device/s to be added (e.g. validator, controller, edge, sdrouting).
245
258
<software-version> Software version that will be used.
246
-
259
+
247
260
optional arguments:
248
261
-h, --help show this help message and exit
249
262
--manager <manager-ip>
@@ -262,17 +275,19 @@ Below you will find few examples of add task:
262
275
sdwan-lab add 2 sdrouting 17.12.2 --lab vsdwan1
263
276
264
277
### Backup Task
278
+
265
279
This task creates a backup of the Catalyst SD-WAN lab running in CML. CML doesn't natively support configuration export from Catalyst SD-WAN nodes, but this script can help you to save your Catalyst SD-WAN configuration. This task will:
280
+
266
281
1. For Manager, Validator, Controller and WAN Edge nodes (SD-WAN and SD-Routing), create configuration backup.
267
282
2. For non-SD-WAN nodes, export the configuration if it's supported by CML.
268
283
3. Save the CML topology with exported configuration.
269
284
4. Create a backup of SD-WAN Manager templates, policies and configuration groups using [Sastre](https://github.com/CiscoDevNet/sastre).
270
285
271
286
This task has several task-specific parameters, including working directory where backup is saved.
@@ -317,31 +334,34 @@ This task has several task-specific parameters, including working directory from
317
334
--retry If for some reason your script lost connectivity during SD-WAN Manager boot, you can add --retry to continue restoring the lab that is already in CML
318
335
319
336
### Delete Task
337
+
320
338
This task deletes the CML lab and removes all it's data. Note after this operation, all lab data is lost.
--force Delete the lab without asking for confirmation. Note the all lab data will be lost!
331
349
332
350
### Sign Task
351
+
333
352
This tasks reads the Certificate Signing Request (CSR) from a file and signs it using SD-WAN Lab Deployment Tool Root CA.
334
353
At the end, the task prints the signed certificate in standard output.
335
354
336
355
This task has several task-specific parameters.
337
356
338
357
sdwan-lab delete -h
339
358
usage: sdwan-lab.py sign [-h] <csr_file>
340
-
359
+
341
360
positional arguments:
342
361
<csr_file> Certificate Signing Request (CSR) File
343
362
344
363
## Limitations and scale
364
+
345
365
The tool supports the following scale per CML lab:
346
366
347
367
- 1 SD-wan Manager instance (Cluster is not yet supported)
@@ -350,8 +370,6 @@ The tool supports the following scale per CML lab:
350
370
- 20 SD-WAN Edges
351
371
- 10 SD-Routing edges
352
372
353
-
354
-
355
373
## Appendix - WSL Installation
356
374
357
375
To install WSL on your Windows VM or Physical machine. Ensure that the HW Virutalization is enabled in the BIOS or VM Defintion.
@@ -365,20 +383,21 @@ Open PowerShell as Administrator and run:
365
383
Install WSL with default distribution (Ubuntu)
366
384
Open PowerShell and run
367
385
368
-
`wsl --install`
386
+
`wsl --install`
369
387
370
388
Once the installation is finished and you have restarted Windows you are able to continue the installation of this tool as described in the [installation section](README.md#installing) of this document.
371
389
372
390
You can read more about [Linux on Windows with WSL here](https://learn.microsoft.com/en-us/windows/wsl/install).
0 commit comments