The provided examples in the *.cf files can be applied on VyOS devices either on:
- A router that you already have and by changing the IP address, port, etc... in the examples files
- Or using containerlab with the provided topology file and the
startup configfiles for vyos1 and vyos2.
In case of choosing the containerlab option, it is worthwhile to mention that you need to have a VyOS Docker image present on the host machine running containerlab and having it tagged similar to the topology file; in this case: vyos/vyos:1.2.8.
The VyOS docker image can be pulled using:
sudo docker pull vyos/vyos:1.2.8Inmanta Service Orchestrator is another containerized piece that can supply a GUI, providing many useful information such as deployment process, agents status and so much more. This container is not a necessity to try out these examples but it is nice to have and it can be pulled:
sudo docker pull ghcr.io/inmanta/orchestrator:latestThere is a Docker compose file inside the containerlab folder and it could be used to start up all the containers:
Start up the containers by going to the containerlab folder and by running:
docker-compose upThis will ultimately start up a postgres database and the inmanta service container.
In order to deploy the provided topology file with containerlab go to the containerlab folder where the topology file is present and:
Verify that the required Docker images are present:
docker imagesThe output should be similar to:
vyos/vyos 1.2.8 9efd07d6e230 5 months ago 606MBNote: You can use other versions, just replace
1.2.8with the version you want and also update the topology file to use your image name.
Head to the containerlab folder and then run:
sudo clab deploy -t topology.ymlNote: It will take a few minutes to fully bootup the containers depending on your system horsepower.
Apply the first time configuration files inside the containerlab folder to VyOS containers by first connecting to the routers:
docker exec -it clab-vyosclab-vyos1 su vyosThen enter the configuration mode by typing:
configureCopy and paste the contents of the vyos1 startup config file into its terminal.
Next, repeat the same steps for the second router by connecting to it:
docker exec -it clab-vyosclab-vyos2 su vyosAnd then paste the vyos2 startup config in it.
At this point you should be able to SSH to the VyOS containers with vyos as both the username and password:
ssh vyos@clab-vyosclab-vyos1
ssh vyos@clab-vyosclab-vyos2The output should look something like this:
Welcome to VyOS
vyos@clab-vyosclab-vyos1's' password:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.Deploy the LAB:
sudo clab deploy -t topology.ymlView the current LAB state:
sudo clab inspect -t topology.ymlDelete the deployed LAB:
sudo clab destroy -t topology.ymlExport the model to Inmanta server:
inmanta -vvv export -f ospf.cf -e <environment_id> --server_address <server_ip_address>Create a project and an environment (test and vyos respectively):
inmanta-cli --host <orchestrator_ip> project create -n test
inmanta-cli --host <orchestrator_ip> environment create -p test -n vyos --save