Skip to content

Commit

Permalink
Change the FRR Vagrant box to Debian bookworm
Browse files Browse the repository at this point in the history
Fixes #1595

Also: includes a YAML validation fix for an unrelated file
  • Loading branch information
ipspace committed Dec 8, 2024
1 parent 09ec77a commit c95fe9f
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 2 deletions.
1 change: 1 addition & 0 deletions netsim/ansible/tasks/readiness-check/vsrx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- name: Execute local ssh command to check vSRX readiness
local_action:
module: command
# yamllint disable-line rule:line-length
cmd: "sshpass -p '{{ ansible_ssh_pass }}' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null {{ ansible_user }}@{{ ansible_host }} 'show system information'"
register: command_out
until: command_out.rc == 0
Expand Down
7 changes: 7 additions & 0 deletions netsim/ansible/templates/initial/frr.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ sysctl -w net.ipv6.conf.all.forwarding=1
#
# Install FRR on a Ubuntu VM if needed
#
if which /usr/bin/gpg; then
echo "gnupg already installed, assuming we also have curl"
else
echo "Installing gnupg and curl"
apt-get update -qq
apt-get install -qq gnupg curl
fi
if which /usr/lib/frr/frrinit.sh; then
echo "FRR already installed, skipping installation"
else
Expand Down
5 changes: 3 additions & 2 deletions netsim/devices/frr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@ clab:
daemons: /etc/frr/daemons
hosts: /etc/hosts
libvirt:
image: generic/ubuntu2004
image: debian/bookworm64 #generic/ubuntu2004
group_vars:
ansible_connection: paramiko
ansible_user: vagrant
ansible_ssh_pass: vagrant
netlab_show_command: [ sudo, vtysh, -c, 'show $@' ]
virtualbox:
image: generic/ubuntu2004
image: debian/bookworm64 #generic/ubuntu2004
group_vars:
ansible_connection: paramiko
ansible_user: vagrant
ansible_ssh_pass: vagrant
netlab_show_command: [ sudo, vtysh, -c, 'show $@' ]
external:
image: none
features:
Expand Down
10 changes: 10 additions & 0 deletions netsim/templates/provider/libvirt/frr-domain.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
$frr_script = <<-SCRIPT
echo vagrant:{{ n.ansible_ssh_pass }} | chpasswd
sed -i -e "s#PasswordAuthentication no#PasswordAuthentication yes#" /etc/ssh/sshd_config
service sshd restart
SCRIPT

{{ name }}.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true

{{ name }}.vm.provider :libvirt do |domain|
domain.cpus = 1
domain.memory = 1024
end

# Run debian-specific provisioning script
#
{{ name }}.vm.provision :shell , :inline => $frr_script
11 changes: 11 additions & 0 deletions netsim/templates/provider/virtualbox/frr-domain.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
$frr_script = <<-SCRIPT
echo vagrant:{{ n.ansible_ssh_pass }} | chpasswd
sed -i -e "s#PasswordAuthentication no#PasswordAuthentication yes#" /etc/ssh/sshd_config
service sshd restart
SCRIPT

{{ name }}.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true

{{ name }}.vm.provider :virtualbox do |domain|
domain.cpus = 1
domain.memory = 1024
end

# Run debian-specific provisioning script
#
{{ name }}.vm.provision :shell , :inline => $frr_script

0 comments on commit c95fe9f

Please sign in to comment.