nsm: Update version of go, golint
[infra/tools.git] / infra / jenkins / slave-setup / nordix-nsm-build-server / configure-image-ubuntu1804.sh
index d5086facc9caa7d2a6623771a563834f6bb5d274..6d43ef1614d4a509640c4649c8cf1368fae25055 100644 (file)
@@ -28,12 +28,19 @@ sudo apt upgrade -y
 # install basic dependencies
 sudo apt install -y make openjdk-11-jre-headless apt-transport-https ca-certificates curl gnupg jq software-properties-common build-essential
 
+# If you have a issue with Let's Encrypt certificate when cloning repo due to DST Root CA X3 Expiration:
+# https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
+# remove outdated certificate from system
+sudo rm -rf /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt
+# update ca-certificates
+sudo update-ca-certificates --fresh --verbose
+
 # set versions of various things for NSM for visibility and ease of maintenance
 DOCKER_CE_VERSION="5:20.10.5~3-0~ubuntu-bionic"
 DOCKER_CE_CLI_VERSION="5:20.10.5~3-0~ubuntu-bionic"
 CONTAINERD_IO_VERSION="1.4.4-1"
-GO_VERSION="1.16.4"
-GO_LINT_VERSION="1.39.0"
+GO_VERSION="1.17.6"
+GO_LINT_VERSION="1.42.0"
 FOSSA_CLI_VERSION="1.1.7"
 
 # install docker-ce, docker-ce-cli, containerd.io and mark them hold
@@ -80,6 +87,12 @@ sudo bash -c "echo PubkeyAuthentication yes >> /etc/ssh/sshd_config"
 sudo bash -c "echo AllowUsers jenkins >> /etc/ssh/sshd_config"
 sudo systemctl restart sshd
 
+# configure sysctl
+sudo sysctl -w net.ipv4.tcp_keepalive_time=120
+sudo sysctl -w net.ipv4.tcp_keepalive_intvl=30
+sudo sysctl -w net.ipv4.tcp_keepalive_probes=8
+sudo sysctl -w net.ipv4.tcp_fin_timeout=30
+
 # update ~jenkins/.profile
 sudo bash -c "echo 'export PATH=\$PATH:/usr/local/go/bin' >> /home/jenkins/.profile"