Enable SSH dead peer detection
[ci-management.git] / vagrant / lib / bootstrap-functions.sh
index 027c69d..c3e1c85 100644 (file)
@@ -2,6 +2,11 @@
 
 do_setup() {
     echo "127.0.1.1 $(hostname) # temporary" >> /etc/hosts
+
+    # Dead peer detection
+    echo "TCPKeepAlive        true" >> /etc/ssh/ssh_config
+    echo "ServerAliveCountMax 30"   >> /etc/ssh/ssh_config
+    echo "ServerAliveInterval 10"   >> /etc/ssh/ssh_config
 }
 
 do_mvn_install() {
@@ -124,7 +129,7 @@ deb_install_pkgs() {
     # Build tools - should match vpp/Makefile DEB_DEPENDS variable
     PACKAGES="$PACKAGES curl build-essential autoconf automake bison libssl-dev
               ccache debhelper dkms git libtool libganglia1-dev libapr1-dev
-              dh-systemd libconfuse-dev git-review exuberant-ctags cscope"
+              dh-systemd libconfuse-dev git-review exuberant-ctags cscope indent"
 
     # Interface manipulation tools, editors, debugger and lsb
     PACKAGES="$PACKAGES iproute2 ethtool vlan bridge-utils
@@ -139,19 +144,29 @@ deb_install_pkgs() {
     # Install virtualenv for test execution
     PACKAGES="$PACKAGES python-virtualenv python-pip python-dev"
 
+    # Install to allow the vpp-docs job to zip up docs to push them
+    PACKAGES="$PACKAGES zip"
+
+    # Install for deb_dpdk debian package buiding
+    PACKAGES="$PACKAGES dpkg-dev dh-python inkscape libcap-dev libpcap-dev"
+    PACKAGES="$PACKAGES libxen-dev libxenstore3.0 python-sphinx python-sphinx-rtd-theme"
+    PACKAGES="$PACKAGES texlive-fonts-recommended texlive-latex-extra"
+
     echo '---> Installing packages'
     # disable double quoting check
     # shellcheck disable=SC2086
     apt-get install ${PACKAGES}
 
     # Specify documentation packages
-    DOC_PACKAGES="doxygen graphviz"
+    DOC_PACKAGES="doxygen graphviz python-pyparsing"
     apt-get install ${DOC_PACKAGES}
 }
 
 deb_enable_hugepages() {
     # Setup for hugepages using sysctl so it persists across reboots
-    sysctl -w vm.nr_hugepages=1024
+    AVP="vm.nr_hugepages=1024"
+    sysctl -w ${AVP}
+    echo "${AVP}" >> /etc/sysctl.conf
 
     mkdir -p /mnt/huge
     echo "hugetlbfs       /mnt/huge  hugetlbfs       defaults        0 0" >> /etc/fstab
@@ -199,7 +214,7 @@ rh_install_pkgs() {
 
     # Install build tools
     yum install -q -y @development redhat-lsb glibc-static java-1.8.0-openjdk-devel yum-utils \
-                      openssl-devel apr-devel
+                      openssl-devel apr-devel indent
 
     # Specify documentation packages
     DOC_PACKAGES="doxygen graphviz"