Create the base directories that the services will need:
mkdir /cerebro
mkdir /cerebro/backup
mkdir /cerebro/dbcarga
mkdir /cerebro/ssl
Prepare a directory for user files. This can be a local disk or a mounted network folder. The example uses /cerebro/files — a local path that can be replaced with the mount point of a network directory.
Install Subversion (it is needed to download the service files from SVN):
sudo apt install subversion
Create a system user cerebro, under whose account the services will run:
sudo adduser cerebro
Go to the installation directory and download the files:
cd /cerebro
svn --username=virtual co https://svn.cerebrohq.com/crm/production/services
Password: Contact support to get the password
As a result, the directory /cerebro/services should appear with all the service files.
Run the installer:
cd /cerebro/services/warden
./installer.sh
When going through the installer, specify:
Make the edits:
CATALOG_DIR = /cerebro/files
CATALOG_DB_DIR = /cerebro/dbcarga
BACKUP_HOST = localhost
Uncomment the CATALOG_DB_DIR and BACKUP_HOST parameters beforehand. Leave the rest unchanged. Save (F2) and exit the editor (F10). Continue the installation — ok.
Usually no edits are required. Check that:
Save (F2) and exit (F10). Continue the installation — ok.
Upon completion, All fine and the installation log should be displayed.
Copy the update script template and uncomment in it only the lines related to the storage service:
cp /cerebro/services/update.sh.example /cerebro/services/update.sh
chmod +x /cerebro/services/update.sh
Download the latest release:
cd /cerebro/services
./update.sh
Download the archive with configs and upload it to the server. This can be done from a local computer via scp:
scp -P 3222 C:\Users\YourName\Desktop\configs.zip user@<service_domain>:/cerebro/services/cargador
On the server, unpack the archive:
unzip configs.zip
If the server is local (office, not cloud), you can provide users with shared access to the file directory via Samba.
If an external network directory is connected (mounted, for example, at /cerebro/files), it already has a network path. Specify the path in Windows format in the carga.conf config, the net_root parameter.
If SSL is used — check and specify the correct names and paths to the certificate files in carga.linux.conf. If SSL is not used — delete or comment out the ssl section in the config.
Leave the other configs unchanged. Place the three configuration files in the /cerebro/services/cargador folder.
Download the daemon file, place it in /cerebro/services/daemons and make it executable:
scp -P 3222 C:\Users\user\Downloads\cargador.sh cerebro@<service_domain>:/cerebro/services/daemons
chmod +x /cerebro/services/daemons/cargador.sh
Make sure that the owner of the /cerebro directory is the cerebro user. If not, change the owner recursively:
sudo chown -R cerebro:cerebro /cerebro
Start the service:
/cerebro/services/cargador/carga_start
You can check whether it is running via:
ps afx | grep cargador
If any problems occur, check the logs:
/cerebro/services/log/cargador/cargador.log
Most often the causes are related to access rights to folders. In that case, change the owner of the directories in which files are created to cerebro user.
Add the storage to the Cerebro sandbox and link it to a project (the project must be unlinked in other storages).
After that, send files and make sure that they:
Example: //<service_domain>/training_files — a ready-made shared directory on another server.
Create a mount point:
mkdir -p /mnt/training_files/cerebro.files
Create a file to store the login and password:
nano /etc/cifs_credentials_training
Contents:
domain=<domain_or_workgroup>
username=<user>
password=<password>
Restrict permissions (only root can read and edit):
chmod 600 /etc/cifs_credentials_training
Find out the numeric IDs of the cerebro user:
id -u cerebro
id -g cerebro
In the example they are equal to 1001.
Add an entry to /etc/fstab:
//<service_domain>/training_files /mnt/training_files cifs credentials=/etc/cifs_credentials_training,uid=1001,gid=1001,iocharset=utf8,vers=3.0,_netdev,nofail,x-systemd.automount 0 0
Update the config files: