filegate/Installation.md

2.7 KiB

Installation

Prerequisites

OS: Linux, preferrably Debian Database: PostgreSQL Object Storage: Preferrably MinIO, but anny S3-Compatible Storage should do Container Engine: Podman

Installation

1. Install the OS

This depends a lot on the Distribution you are using, but should usually be documented there

2. Install required Packages

For Debian, this would be:

export DEBIAN_FRONTEND="noninteractive"
apt-get update
apt-get upgrade -y
apt-get install podman file postgres-y
# Please check the official install instructions for your up to date minio Version
wget https://dl.min.io/server/minio/release/linux-amd64/archive/minio_20230816201730.0.0_amd64.deb -O minio.deb
dpkg -i minio.deb
curl https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc
chmod +x /usr/local/bin/mc

Enable the podman socket for your user:

systemctl --user enable --now podman.socket

3. Configure Minio

More advanced Information can be found in the Minio Documentation

Example /etc/default/minio:

# MINIO_ROOT_USER and MINIO_ROOT_PASSWORD sets the root account for the MinIO server.
# This user has unrestricted permissions to perform S3 and administrative API operations on any resource in the deployment.
# Omit to use the default values 'minioadmin:minioadmin'.
# MinIO recommends setting non-default values as a best practice, regardless of environment

MINIO_ROOT_USER=minioadmin
MINIO_ROOT_PASSWORD=Propose-Accent-Ridden-Shiftless-Malt-Throwaway1

# MINIO_VOLUMES sets the storage volume or path to use for the MinIO server.

MINIO_VOLUMES="/var/lib/minio"

# MINIO_SERVER_URL sets the hostname of the local machine for use with the MinIO Server
# MinIO assumes your network control plane can correctly resolve this hostname to the local machine

# Uncomment the following line and replace the value with the correct hostname for the local machine and port for the MinIO server (9000 by default).

MINIO_SERVER_URL="http://localhost:9000"
MINIO_CONSOLE_PORT=9001

3.1. Create User

3.2. Create Bucket

4. Configure PostgreSQL

Example script to set up PostgreSQL for Filegate: Slightly Jank (could have better permission management)

CREATE
DATABASE filegate;
CREATE
user filegate WITH PASSWORD 'supersecretpassword';
-- CREATE user fgwriter WITH PASSWORD 'alsoverysecretpassword';
--CREATE USER fgreader WITH PASSWORD 'anothersecretpassword';
GRANT ALL PRIVILEGES ON DATABASE
filegate TO filegate WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON SCHEMA
public TO filegate WITH GRANT OPTION;

5. Install filegate itself

make
sudo make install