Skip to content

Commit

Permalink
Merge pull request #47 from appybara13/update-for-takserver-5.0
Browse files Browse the repository at this point in the history
Update for takserver 5.0
  • Loading branch information
FarrantAlex authored Mar 13, 2024
2 parents 398a60f + 53a15ce commit 9674439
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 13 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion docker/amd64/Dockerfile.takserver-db
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 1 addition & 2 deletions docker/arm64/Dockerfile.takserver
Original file line number Diff line number Diff line change
@@ -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"]
4 changes: 2 additions & 2 deletions docker/arm64/Dockerfile.takserver-db
Original file line number Diff line number Diff line change
@@ -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"]
20 changes: 13 additions & 7 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down Expand Up @@ -326,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 :
Expand Down
1 change: 1 addition & 0 deletions tak-md5checksum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion tak-sha1checksum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
387ea4f593763d3adcfda5128a89dda4fd82e937 takserver-docker-4.8-RELEASE-31.zip
177ed55a66ce8126424937dd3bc7375feb12d3eb takserver-docker-4.10-RELEASE-50.zip
944052011887101fd1019b3019f5c9583a1683f3 takserver-docker-5.0-RELEASE-58.zip

0 comments on commit 9674439

Please sign in to comment.