Maintenance

Application Updates

The applications update is manual. You will need to SSH into the VM and run following commands in sequence. Once updated, you will have to clear browser cache so that new contents can be shown (Follow this link to reload application in the browser - https://fabricdigital.co.nz/blog/how-to-hard-refresh-your-browser-and-clear-cache)
1
sudo su
2
gcloud auth --quiet configure-docker
3
cd /opt/trillo
4
./update.py
Copied!

Update SSH Config (if coming from old version)

The following steps are needed to be done only once (if missing)

    1.
    On the VM, edit the following file (/etc/ssh/sshd_config) and change a line "ChrootDirectory %h" to "ChrootDirectory %h/gcs" (see below). finally, save and exit.
nano /etc/ssh/sshd_config
1
...
2
...
3
ChrootDirectory %h/gcs
4
...
5
...
Copied!
2. Restart the ssh server using the command
/etc/init.d/ssh restart

Upgrade SFTP server for read-only users

    ssh into the VM.
    Create a new shell script “setup-sftp-viewer.sh”
    Copy the value of BUCKET_NAME from above and add to the script at the end of line#3 (below).
    Make it executable and run as sudo e.g., sudo ./setup-sftp-viewer.sh
    Save the output of the script for troubleshooting (if needed).
1
# !/usr/bin/env bash
2
set -x
3
BUCKET_NAME=
4
5
# create read-only folder
6
mkdir /gcs-r
7
8
# add a line to fstab
9
groupId=$(cut -d: -f3 < <(getent group sftpusers))
10
11
tee -a /etc/fstab << END
12
${BUCKET_NAME} /gcs-r gcsfuse ro,allow_other,uid=65534,gid=${groupId},implicit_dirs
13
END
14
15
cat /etc/fstab
16
17
# mount -a
18
mount -a
19
20
# copy latest script to the /gcs/system folder
21
TRILLO_GA_SCRIPTS="gs://trillo-public/fm/ga/scripts/*"
22
gsutil -m cp -r ${TRILLO_GA_SCRIPTS} gs://${BUCKET_NAME}/system
Copied!

Update docker-compose.yaml (if coming from the old version)

On old versions, the following line may be missing from /opt/trillo/docker-compose.yml
1
sudo su
2
cd /opt/trillo
3
nano docker-compose.yml
Copied!
If missing then create this line and paste the value as shown below. Once done, save the file.
Once changes are saved then restart the application with the following command
1
cd /opt/trillo
2
./dcr
Copied!
Last modified 6mo ago