Binary Deployment

zhenghaozNovember 20, 2022About 2 min

Binary Deployment

For single node deployment, the gorse-in-one single binary can be used.

Note

For the multi-nodes scenario, binary deployment is not recommended.

Prerequisites

Gorse depends on following software:

  • Cache storage database, one of MySQL, PostgreSQL, MongoDB or Redis.
  • Data storage database, one of MySQL, PostgreSQL, ClickHouse or MongoDB.

The minimal versions of dependent software are as follows:

SoftwareMinimal VersionCompatible Product
Redis5.0
MySQL5.7MariaDB >= 10.2
PostgresSQL10.0
ClickHouse21.10
MongoDB4.0

Run Gorse-in-one

  1. Download Gorse-in-one from GitHub Release.
  1. Install Gorse-in-one.
  1. Create a configuration file config.toml based on config.toml.templateopen in new window.

  2. Run Gorse-in-one.

gorse -c config.toml 

Flags of Gorse-in-one

There are commend line flags for Gorse-in-one:

FlagDefault ValueDescription
-c-c,--configConfiguration file path.
--debugDebug log mode.
-h--helpHelp for gorse-in-one.
--log-pathLog file path.
--master-cache-pathmaster_cache.dataMaster node cache path.
--playgroundPlayground mode.
-v--versionGorse version.
--worker-cache-pathworker_cache.dataWorker node cache path.
--worker-jobs1Worker node working jobs.

Setup Systemd

  1. Copy Gorse-in-one binary to /usr/local/bin and configuration files to /etc/gorse:
sudo cp ./gorse-in-one /usr/local/bin/gorse
sudo cp config.toml /etc/gorse/
  1. Create the systemd configuration file at /etc/systemd/system/gorse.service:
[Unit]
Description=Gorse, an open source recommender system service written in Go.
After=network.target

[Service]
Type=simple
Restart=always
ExecStart=/usr/local/bin/gorse -c /etc/gorse/config.toml

[Install]
WantedBy=multi-user.target
  1. After that you're supposed to reload systemd:
sudo systemctl daemon-reload
  1. Launch Gorse-in-one on system startup with:
sudo systemctl enable gorse
  1. Launch Gorse-in-one immediately with:
sudo systemctl start gorse
  1. Check the health and logs of Gorse-in-one with:
systemctl status clash
Loading...