Skip to content

Commit

Permalink
stuff for setting up a server to calcaulte the wwm
Browse files Browse the repository at this point in the history
  • Loading branch information
amandasaurus committed Feb 23, 2024
1 parent e46cf20 commit 83bdea2
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/ssh_config
36 changes: 36 additions & 0 deletions server/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#! /bin/sh
set -o errexit
if [ "${1:-}" = "-v" ] ; then
set -x
shift
fi

if [ "$(hostname)" != "wwm-render1" ] ; then
echo 1>&2 "Wrong host"
exit 1
fi


apt update -qq
apt full-upgrade -qq --yes --auto-remove
apt install --yes -qq git build-essential btop aria2 osmium-tool neovim jo jq moreutils rclone screen
mkdir -p /srv/

if [ ! -d /srv/waterwaymap.org/ ] ; then
cd /srv/
./ssh.sh git clone https://github.com/amandasaurus/waterwaymap.org.git
fi

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
cargo install osm-lump-ways

apt install --yes -qq build-essential libsqlite3-dev zlib1g-dev checkinstall
if [ ! -d /srv/tippecanoe/ ] ; then
cd /srv/
git clone https://github.com/felt/tippecanoe.git
fi
cd /srv/tippecanoe
make -j
checkinstall --default

mkdir -p /root/.terminfo/x/
6 changes: 6 additions & 0 deletions server/newserver.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#! /bin/sh
cd "$(dirname "$0")" || exit 1

scp -C -q -Fssh_config ./install.sh wwm-render1:
ssh -Fssh_config wwm-render1 ./install.sh
scp -C -q -Fssh_config ~/.terminfo/x/xterm-kitty wwm-render1:.terminfo/x/
2 changes: 2 additions & 0 deletions server/ssh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
exec ssh -Fssh_config wwm-render1 "$@"
4 changes: 4 additions & 0 deletions server/ssh_config.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Host wwm-render1
Hostname X.X.X.X
User root
IdentityFile ~/.ssh/id_rsa_name

0 comments on commit 83bdea2

Please sign in to comment.