diff options
Diffstat (limited to 'extras/strongswan/vpp_sswan/docker/scripts')
4 files changed, 69 insertions, 0 deletions
diff --git a/extras/strongswan/vpp_sswan/docker/scripts/init.sh b/extras/strongswan/vpp_sswan/docker/scripts/init.sh new file mode 100644 index 00000000000..80901c97d87 --- /dev/null +++ b/extras/strongswan/vpp_sswan/docker/scripts/init.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "Initialization Image" + +git clone https://github.com/FDio/vpp.git ./vpp + +cp -R vpp_sswan vpp/extras/strongswan/ +cd vpp +yes | make install-dep diff --git a/extras/strongswan/vpp_sswan/docker/scripts/init_docker1.sh b/extras/strongswan/vpp_sswan/docker/scripts/init_docker1.sh new file mode 100644 index 00000000000..9be77867683 --- /dev/null +++ b/extras/strongswan/vpp_sswan/docker/scripts/init_docker1.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +echo "Initialization Docker 1 - VPP with SSWAN" + +cd /root/vpp +make build-release + +cd /root/vpp/extras/strongswan/vpp_sswan +make clean +make all + +cd /root/vpp/build-root/build-vpp-native/external/sswan +sudo make install + +cd /root/vpp/extras/strongswan/vpp_sswan +make install + +sudo systemctl daemon-reload +sudo systemctl restart strongswan.service + +echo "### Loaded plugin in strogswan" +sudo swanctl --stats + +sudo cp /root/vpp_sswan/docker/configs/swanctl_docker1.conf /etc/swanctl/conf.d/swanctl.conf diff --git a/extras/strongswan/vpp_sswan/docker/scripts/init_docker2.sh b/extras/strongswan/vpp_sswan/docker/scripts/init_docker2.sh new file mode 100644 index 00000000000..2e38fbabca2 --- /dev/null +++ b/extras/strongswan/vpp_sswan/docker/scripts/init_docker2.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +echo "Initialization Docker 2 - SSWAN in kernel" + +# tested only with 5.9.5 and 5.9.6 version of strongSwan +VERSION_SSWAN=5.9.6 + +curl -o ./strongswan-${VERSION_SSWAN}.tar.gz -LO https://github.com/strongswan/strongswan/archive/${VERSION_SSWAN}.tar.gz; +tar -zxof ./strongswan-${VERSION_SSWAN}.tar.gz + +cd /root/strongswan-${VERSION_SSWAN} +./autogen.sh +./configure --prefix=/usr --sysconfdir=/etc --enable-libipsec --enable-systemd --enable-swanctl --disable-gmp --enable-openssl +make -j$(nproc) +sudo make install + +sudo cp /root/vpp_sswan/docker/configs/swanctl_docker2.conf /etc/swanctl/conf.d/swanctl.conf + +sudo systemctl daemon-reload +sudo systemctl restart strongswan.service + +echo "### Loaded plugin in strogswan" +sudo swanctl --stats diff --git a/extras/strongswan/vpp_sswan/docker/scripts/run_vpp.sh b/extras/strongswan/vpp_sswan/docker/scripts/run_vpp.sh new file mode 100644 index 00000000000..0497d8aec38 --- /dev/null +++ b/extras/strongswan/vpp_sswan/docker/scripts/run_vpp.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +cd /root/vpp/ +make run-release STARTUP_CONF=/root/vpp_sswan/docker/configs/startup.conf & + +sleep 5 + +sudo systemctl restart strongswan.service + +sleep 2 + +echo "### Checking connections between VPP and Strongswan" +/root/vpp/build-root/build-vpp-native/vpp/bin/vppctl -s /run/vpp/cli.sock sh api client |