risotto is started with a specific user

This commit is contained in:
2020-09-19 07:11:36 +02:00
parent 709538e4e4
commit 58ebb8e1ad
6 changed files with 31 additions and 42 deletions

View File

@ -1,15 +1,19 @@
CONFIGURATION_DIR=%%getVar('risotto_configuration_dir')
PROVIDER_FACTORY_CONFIG_DIR=%%getVar('risotto_factory_configuration_dir')
TMP_DIR=%%getVar('risotto_temp_dir')
DEFAULT_USER=%%getVar('risotto_default_user')
RISOTTO_DB_NAME=%%getVar('risotto_main_dbname')
RISOTTO_DB_USER=%%getVar('risotto_db_user')
CONFIGURATION_DIR=%%risotto_configuration_dir
TMP_DIR=%%risotto_temp_dir
DEFAULT_USER=%%risotto_default_user
RISOTTO_DB_NAME=%%risotto_main_dbname
RISOTTO_DB_USER=%%risotto_db_user
RISOTTO_DB_PASSWORD=replace_me
TIRAMISU_DB_NAME=%%getVar('risotto_tiramisu_dbname')
TIRAMISU_DB_USER=%%getVar('risotto_tiramisu_db_user')
TIRAMISU_DB_NAME=%%risotto_tiramisu_dbname
TIRAMISU_DB_USER=%%risotto_tiramisu_db_user
TIRAMISU_DB_PASSWORD=replace_me
DB_ADDRESS=%%getVar('risotto_db_address')
MESSAGE_PATH=%%getVar('risotto_messages_dir')
CACHE_ROOT_PATH=%%getVar('risotto_cache_dir')
SRV_SEED_PATH=%%getVar('risotto_seed_dir')
PYTHONPATH="/usr/lib/python3.6/dist-packages:$PYTHONPATH"
DB_ADDRESS=%%risotto_db_address
MESSAGE_PATH=%%risotto_messages_dir
CACHE_ROOT_PATH=%%risotto_cache_dir
SRV_SEED_PATH=%%risotto_seed_dir
%set %%var = %%getVar('celeryrisotto_db_user', None)
%if not %%is_empty(%%var)
CELERYRISOTTO_DB_NAME=%%celeryrisotto_main_dbname
CELERYRISOTTO_DB_USER=%%var
CELERYRISOTTO_DB_PASSWORD=replace_me
%end if

View File

@ -1,9 +0,0 @@
[Unit]
Description=risotto
[Service]
EnvironmentFile=/etc/risotto/risotto.conf
ExecStart=/usr/bin/risotto-server
[Install]
WantedBy=multi-user.target

View File

@ -1,14 +1,14 @@
%from os import listdir
%set %%dbname = %%getVar('risotto_main_dbname')
%set %%dbname = %%risotto_main_dbname
---
dbuser: %%getVar('risotto_db_user')
dbuser: %%risotto_db_user
dbuser_options:
- LOGIN
privileges:
%%{dbname}.public.*: 'ALL'
%%{dbname}.public: 'ALL'
%%{dbname}: 'ALL'
dbhost: %%getVar('risotto_db_address')
dbhost: %%risotto_db_address
dbport: 5432
dbtype: postgres
dbname: %%dbname

View File

@ -1,16 +1,16 @@
%set %%dbname = %%getVar('risotto_tiramisu_dbname')
%set %%dbname = %%risotto_tiramisu_dbname
---
dbuser: %%getVar('risotto_tiramisu_db_user')
dbuser: %%risotto_tiramisu_db_user
dbuser_options:
- LOGIN
privileges:
%%{dbname}.public.*: 'ALL'
%%{dbname}.public: 'ALL'
%%{dbname}: 'ALL'
dbhost: %%getVar('risotto_db_address')
dbhost: %%risotto_db_address
dbport: 5432
dbtype: postgres
dbname: %%getVar('risotto_tiramisu_dbname')
dbname: %%risotto_tiramisu_dbname
template: 'template0'
pwd_files:
- {'file': '/etc/risotto/risotto.conf', 'pattern': 'TIRAMISU_DB_PASSWORD='}