forked from beyond-all-reason/spads_config_bar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Installation_steps.txt
108 lines (92 loc) · 3.8 KB
/
Installation_steps.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# - init 1 minutes
sudo apt-get install htop byobu mc p7zip g++ swig locate rclone git python3-dev cpanminus p7zip-full python3-distutils libdbd-sqlite3-perl make sshpass glances
#- Make the swap file: 1 minute
cd /var
sudo touch swap.img
sudo chmod 600 swap.img
sudo dd if=/dev/zero of=/var/swap.img bs=1024k count=4000
sudo mkswap /var/swap.img
sudo swapon /var/swap.img
sudo su -c "echo '/var/swap.img swap swap defaults 0 0' >> /etc/fstab"
sudo sysctl vm.swappiness=10
sudo su -c "echo 'vm.swappiness=10' >> /etc/sysctl.conf"
#- clone the updater 1 min
mkdir -p ~/spads/var/spring
cd ~/spads
git clone https://github.com/beyond-all-reason/spads_config_bar.git
cd spads_config_bar/
python3 spads_config_bar_updater.py -s
sudo cp *.service /etc/systemd/system
sudo cp *.timer /etc/systemd/system
python3 spads_config_bar_updater.py -u
cd ~
sudo cpanm https://github.com/niner/inline-python-pm.git
mkdir spads
cd spads
wget http://planetspads.free.fr/spads/installer/spadsInstaller.tar
tar -xvf spadsInstaller.tar
./spadsInstaller.pl
# install spads with _all_ default settings
# official fails for some reason, it cant find spring install, you gotta manually do it, so run python3 spads_config_bar_updater.py -s -u [latest github release]
# and then relaunch
#- rclone config 3 mins
curl -sL https://raw.githubusercontent.com/wimpysworld/deb-get/main/deb-get | sudo -E bash -s install deb-get
deb-get update
deb-get install rclone
rclone config
#
# select new
# name: BYAR-maps
# storage type: 18 (drive)
# no client id
# no client secret
# access type: 2 (drive.readonly)
# root folder id: blank
# service account credentials: blank
# service accoutn file: blank
# Edit advanced config: n
# Use auto config: n
# Use headless: N
# copy
# Configure this as team drive: n
# yes this is ok: y
# q for quit
rclone sync --drive-shared-with-me BYAR-maps:BYAR-maps ~/spads/var/spring/data/maps/
# edit cluster launcher template
cp ~/spads/spads_config_bar/etc/spads_cluster_launcher.sh.template ~/spads/etc/spads_cluster_launcher.sh
chmod +x ~/spads/etc/spads_cluster_launcher.sh
nano ~/spads/etc/spads_cluster_launcher.sh
#get latest engine
python3 spads_config_bar_updater.py -c -u https://github.com/beyond-all-reason/spring/releases/download/spring_bar_%7BBAR105%7D105.1.1-739-ga241485/spring_bar_.BAR105.105.1.1-739-ga241485_linux-64-minimal-portable.7z
#copy pr-dler to ~/spads
cp ~/spads/var/spring/spring_bar_.BAR105.105.1.1-739-ga241485_linux-64-minimal-portable/pr-downloader ~/spads/
/home/ubuntu/spads/pr-downloader --filesystem-writepath /home/ubuntu/spads/var/spring/data byar:test
# services enable timers:
# make sure to change the usernames and paths inside these
sudo nano /etc/systemd/system/rclone-maps.service
sudo nano /etc/systemd/system/pr-downloader.service
sudo nano /etc/systemd/system/spads_config_updater.service
# enable servixes, about 10-15 mins on first start
sudo systemctl daemon-reload
sudo systemctl start rclone-maps.service
sudo systemctl start pr-downloader.service
sudo systemctl start spads_config_updater.service
sudo systemctl daemon-reload
sudo systemctl enable --now pr-downloader.timer
sudo systemctl enable --now rclone-maps.timer
sudo systemctl enable --now spads_config_updater.timer
sudo systemctl daemon-reload
#replay upload:
#add these to the users .bashrc as env vars
sudo nano ~/.bashrc
#copy these:
#export SFTP_PASSWORD="@CHANGEME"
#export SFTP_LOGIN="beherith"
# start it, like 15 minutes first start :/
byobu
cd ~/spads/etc/
./spads_cluster_launcher.sh
# further things/ todo:
# - set up glances, start it from crontab as glances -w for quick view on port 61208
# - set up replay-deleter, which every week, should delete replays older than 1 month
# - set up log-rotator, which every week, should zip up logs, and delete the old ones (maybe use logrotate?)