Editing config.py
Cerebro Support avatar
Written by Cerebro Support
Updated over a week ago

Before starting Memoria deployment you should configure parameters in the config.py file. A sample file is located in cerebro.db.update/config.py.example.

Copy this configuration file to a specific directory before editing:

  • for Unix systems — /etc/cerebro.db.update/config.py;

  • for Windows systems — %APPDATA%/cerebro.db.update/config.py, where APPDATA is a system variable, the path like: C:\Users\<имя пользователя>\AppData\Roaming.

Note

This config.py configuration should only be done once, on initial DB deployment. Later on, Memoria will use existing configuration file.

The config.py.example file contains descriptive notes for each parameter, and by default it looks like this:

##################################

DB_NAME="memoria"

# leave HOST empty for localhost or unix-socket
HOST=""
PORT="5432"

##################################
## Authentication
# There are two main way to authenticate in Postgres:
#  * 'Indent' (or less secure 'Trust' modification) - no password is needed, access grants only from local connection
#      It is installation default on UNIX.
#  * 'md5' - user login and password are needed. General way to login in Postgres from anywhere
#      Windows installer asks you for 'postgres' admin account
#
# When Indent auth is used, only user name is needed. Update will start throught 'sudo' with 'DB_USER' credentials


DB_USER="postgres"
# For Ident auth-method set DB_PASS empty
DB_PASS=""

##################################
# Setup libmalosol plug-in path. You may copy it to postgres/lib folder elsewere.
#   Windows: Besides plug-in path, you have to change filename this to 'libmalosol90.dll'
MALOSOL="$libdir/libmalosol90.so"


##################################
# Fill it if pg-tools could not be found through PATH env-var
#   Windows: use forward '/' slash in path
# PG_DIR="/usr/local/pgsql-9.0/bin"
# PG_DIR="C:/Program Files/postgreSQL/bin"
PG_DIR=""

If the installation procedure meets the following conditions:

you may leave the default config.py parameters unchanged. Otherwise, if any of the conditions are not met, you have to change the settings accordingly.

Warning

A mistake is often made while updating Memoria under Unix systems – access rights for postgres user areinsufficient to read the /etc/cerebro.db.update folder, where config.py is stored. In this case you’ll see the following error:

ImportError: No module named config

Did this answer your question?