From d41a2da65e688a1a3ec455bf07fb850284b8d347 Mon Sep 17 00:00:00 2001 From: appybara13 Date: Wed, 13 Mar 2024 13:40:29 +0000 Subject: [PATCH 1/6] Add checksums for 5.0-RELEASE-58 --- README.md | 1 + tak-md5checksum.txt | 1 + tak-sha1checksum.txt | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a244607..0d27e79 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ The integrity of the release will be checked at setup against the MD5/SHA1 check | `takserver-docker-4.7-RELEASE-20.zip` | `759MB` | `1cb0208c62d4551f1c3185d00a5fd8bf` | `f427ae3e860fddb8907047f157ada5764334c48d` | | `takserver-docker-4.8-RELEASE-31.zip` | `772MB` | `c07f01d74960287bfc7dc08ecd6cbc3a` | `387ea4f593763d3adcfda5128a89dda4fd82e937` | | `takserver-docker-4.10-RELEASE-50.zip`| `528MB` | `5068d5fd70cbc9ecf53f2259dc9383f7` | `177ed55a66ce8126424937dd3bc7375feb12d3eb` | +| `takserver-docker-5.0-RELEASE-58.zip`| `660MB` | `2c80c289f67de4878ca596bf479ef698` | `944052011887101fd1019b3019f5c9583a1683f3` | ## Requirements diff --git a/tak-md5checksum.txt b/tak-md5checksum.txt index 84f2079..8814db9 100644 --- a/tak-md5checksum.txt +++ b/tak-md5checksum.txt @@ -4,3 +4,4 @@ dc63cb315f950025707dbccf05bdf183 takserver-docker-4.6-RELEASE-26.zip 1cb0208c62d4551f1c3185d00a5fd8bf takserver-docker-4.7-RELEASE-20.zip c07f01d74960287bfc7dc08ecd6cbc3a takserver-docker-4.8-RELEASE-31.zip 5068d5fd70cbc9ecf53f2259dc9383f7 takserver-docker-4.10-RELEASE-50.zip +2c80c289f67de4878ca596bf479ef698 takserver-docker-5.0-RELEASE-58.zip \ No newline at end of file diff --git a/tak-sha1checksum.txt b/tak-sha1checksum.txt index 3472ab9..443b658 100644 --- a/tak-sha1checksum.txt +++ b/tak-sha1checksum.txt @@ -2,4 +2,6 @@ b688359659a05204202c21458132a64ec1ba0184 takserver-docker-4.7-RELEASE-4.zip cd56406d3539030ab9b9b3fbae08b56b352b9b53 takserver-docker-4.7-RELEASE-18.zip f427ae3e860fddb8907047f157ada5764334c48d takserver-docker-4.7-RELEASE-20.zip -387ea4f593763d3adcfda5128a89dda4fd82e937 takserver-docker-4.8-RELEASE-31.zip \ No newline at end of file +387ea4f593763d3adcfda5128a89dda4fd82e937 takserver-docker-4.8-RELEASE-31.zip +177ed55a66ce8126424937dd3bc7375feb12d3eb takserver-docker-4.10-RELEASE-50.zip +944052011887101fd1019b3019f5c9583a1683f3 takserver-docker-5.0-RELEASE-58.zip \ No newline at end of file From 1ccb7c5ea1b0a1d27be802e1bbf84611b84e08c1 Mon Sep 17 00:00:00 2001 From: appybara13 Date: Wed, 13 Mar 2024 13:41:03 +0000 Subject: [PATCH 2/6] Handle multiple default network devices --- scripts/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 68ad813..10779a8 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -229,7 +229,7 @@ pgpwd="$(cat /dev/urandom | tr -dc '[:alpha:][:digit:]' | fold -w ${1:-11} | hea pgpassword=$pgpwd"Meh1!" # get IP -NIC=$(route | grep default | awk '{print $8}') +NIC=$(route | grep default | awk '{print $8}' | head -n 1) IP=$(ip addr show $NIC | grep -m 1 "inet " | awk '{print $2}' | cut -d "/" -f1) printf $info "\nProceeding with IP address: $IP\n" From eda7bde2900fd3bccc3e9b3774ae28bc821632fe Mon Sep 17 00:00:00 2001 From: appybara13 Date: Wed, 13 Mar 2024 13:41:30 +0000 Subject: [PATCH 3/6] Ask the user the the amount of memory to allocate (default 8gb) --- scripts/setup.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 10779a8..0bc576b 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -243,14 +243,20 @@ sed -i "s/takserver.jks/$IP.jks/g" tak/CoreConfig.xml # Better memory allocation: # By default TAK server allocates memory based upon the *total* on a machine. # In the real world, people not on a gov budget use a server for more than one thing. -# Instead we allocate memory based upon the available memory so this still scales, but you can run it on a smaller budget -sed -i "s/MemTotal/MemFree/g" tak/setenv.sh +# Instead we allocate a fixed amount of memory +read -p "Enter the amount of memory to allocate, in kB. Default [8000000]: " mem +if [ -z "$mem" ]; +then + mem="8000000" +fi + +sed -i "s%\`awk '/MemTotal/ {print \$2}' /proc/meminfo\`%$mem%g" tak/setenv.sh ## Set variables for generating CA and client certs printf $warning "SSL setup. Hit enter (x3) to accept the defaults:\n" -read -p "State (for cert generation). Default [state] :" state -read -p "City (for cert generation). Default [city]:" city -read -p "Organizational Unit (for cert generation). Default [org]:" orgunit +read -p "State (for cert generation). Default [state] : " state +read -p "City (for cert generation). Default [city]: " city +read -p "Organizational Unit (for cert generation). Default [org]: " orgunit if [ -z "$state" ]; then From b2ed7c125e54dc4f50d79758f822b58cd5d09983 Mon Sep 17 00:00:00 2001 From: appybara13 Date: Wed, 13 Mar 2024 13:42:20 +0000 Subject: [PATCH 4/6] Revert unnecessary 6 minute sleep --- scripts/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setup.sh b/scripts/setup.sh index 0bc576b..f164e99 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -332,7 +332,7 @@ cd ../../ printf $info "Waiting for TAK server to go live. This should take <1m with an AMD64, ~2min on a ARM64 (Pi)\n" $DOCKER_COMPOSE start tak -sleep 360 +sleep 10 ### Checks if java is fully initialised while : From f0ba41c961fce6b16c4169279803328d5a3ada13 Mon Sep 17 00:00:00 2001 From: appybara13 Date: Wed, 13 Mar 2024 13:43:13 +0000 Subject: [PATCH 5/6] Revert unnecessary java installation in db container --- docker/amd64/Dockerfile.takserver-db | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/amd64/Dockerfile.takserver-db b/docker/amd64/Dockerfile.takserver-db index d08b242..57a4b2a 100644 --- a/docker/amd64/Dockerfile.takserver-db +++ b/docker/amd64/Dockerfile.takserver-db @@ -1,7 +1,7 @@ FROM postgres:15.1 # this is slow - updates all packages -RUN apt-get update && apt install -y postgresql-15-postgis-3 openjdk-17-jdk +RUN apt-get update && apt install -y postgresql-15-postgis-3 ENTRYPOINT ["/bin/bash", "-c", "/opt/tak/db-utils/configureInDocker.sh"] From 53a15cea35d21ef96b085b9dee2826fd99dc1309 Mon Sep 17 00:00:00 2001 From: appybara13 Date: Wed, 13 Mar 2024 13:44:08 +0000 Subject: [PATCH 6/6] Copy across changes from amd64 to arm64 docker files --- docker/arm64/Dockerfile.takserver | 3 +-- docker/arm64/Dockerfile.takserver-db | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/arm64/Dockerfile.takserver b/docker/arm64/Dockerfile.takserver index 9f4ff1f..357320a 100644 --- a/docker/arm64/Dockerfile.takserver +++ b/docker/arm64/Dockerfile.takserver @@ -1,5 +1,4 @@ FROM openjdk:17-jdk-bullseye -RUN apt update && \ - apt-get install -y emacs-nox net-tools netcat vim +RUN apt update && apt-get install -y emacs-nox net-tools netcat vim ENTRYPOINT ["/bin/bash", "-c", "/opt/tak/configureInDocker.sh init &>> /opt/tak/logs/takserver.log"] diff --git a/docker/arm64/Dockerfile.takserver-db b/docker/arm64/Dockerfile.takserver-db index ac54d18..0389c1b 100644 --- a/docker/arm64/Dockerfile.takserver-db +++ b/docker/arm64/Dockerfile.takserver-db @@ -1,6 +1,6 @@ -FROM postgres:15 -# this is slow - updates all packages +FROM postgres:15.1 +# this is slow - updates all packages RUN apt-get update && apt install -y postgresql-15-postgis-3 ENTRYPOINT ["/opt/tak/db-utils/configureInDocker.sh"]