Compare commits

..

No commits in common. "cbf5d67cb89e1912a0887368775c1672bea48f10" and "30836804b261d49b0c84d61d54928f07aca616a7" have entirely different histories.

9 changed files with 43 additions and 45 deletions

View File

@ -1,12 +0,0 @@
#!/bin/sh
set -e
if [ "$1" = configure ]; then
# Make sure the administrative user exists
if ! getent passwd risotto > /dev/null; then
adduser --system --home /nonexistent --no-create-home --group --gecos "User for risotto" risotto --quiet
fi
fi
exit 0

View File

@ -1 +0,0 @@
../risotto.service

2
debian/rules vendored
View File

@ -8,4 +8,4 @@
dh $@
override_dh_installsystemd:
dh_installsystemd -name=risotto --no-enable --no-start --no-stop-on-upgrade
dh_installsystemd -peole-risotto --no-enable --no-start --no-stop-on-upgrade

View File

@ -3,6 +3,7 @@
<files>
<service>risotto</service>
<file filelist='risotto' name='/etc/risotto/risotto.conf' mkdir='True' rm='True'/>
<file filelist='risotto' name='/etc/systemd/system/risotto.service' mkdir='True' rm='True'/>
<file filelist='risotto' name='/etc/eole/eole-db.d/risotto.yml' mkdir='True' rm='True'/>
<file filelist='risotto' name='/etc/eole/eole-db.d/tiramisu.yml' mkdir='True' rm='True'/>
</files>
@ -36,14 +37,30 @@
<value>/usr/share/risotto-message/messages</value>
</variable>
<variable name='risotto_cache_dir' type='filename' description='Emplacement du cache' hidden='True'>
<value>/srv/risotto/cache</value>
<value>/srv/risotto/cache/risotto</value>
</variable>
<variable name='risotto_seed_dir' type='filename' description='Emplacement des descriptions de services' hidden='True'>
<value>/srv/risotto/seed</value>
</variable>
<variable name='risotto_images_dir' type='filename' description='Emplacement des images disques' hidden='True'>
<value>/srv/risotto/images</value>
<variable name='risotto_factory_configuration_dir' type='filename' description='Emplacement de la configuration du provider factory' hidden='True'>
<value>/srv/factory/</value>
</variable>
</family>
</variables>
<constraints>
</constraints>
<help>
<variable name='risotto_configuration_dir'>Aide pour la variable risotto_configuration_dir</variable>
<variable name='risotto_temp_dir'>Aide pour la variable risotto_temp_dir</variable>
<variable name='risotto_default_user'>Aide pour la variable risotto_default_user</variable>
<variable name='risotto_main_dbname'>Aide pour la variable risotto_main_dbname</variable>
<variable name='risotto_tiramisu_dbname'>Aide pour la variable risotto_tiramisu_dbname</variable>
<variable name='risotto_db_user'>Aide pour la variable risotto_db_user</variable>
<variable name='risotto_tiramisu_db_user'>Aide pour la variable risotto_tiramisu_db_user</variable>
<variable name='risotto_db_address'>Aide pour la variable risotto_db_address</variable>
<variable name='risotto_messages_dir'>Aide pour la variable risotto_messages_dir</variable>
<variable name='risotto_cache_dir'>Aide pour la variable risotto_cache_dir</variable>
<variable name='risotto_seed_dir'>Aide pour la variable risotto_seed_dir</variable>
<variable name='risotto_factory_configuration_dir'>Aide pour la variable risotto_factory_configuration_dir</variable>
</help>
</creole>

View File

@ -1,8 +1,7 @@
#!/bin/bash
for dir in risotto_cache_dir risotto_seed_dir risotto_temp_dir risotto_configuration_dir risotto_images_dir; do
for dir in risotto_messages_dir risotto_cache_dir risotto_seed_dir; do
mkdir -p $(CreoleGet $dir)
chown risotto: $dir
done
exit 0

View File

@ -1,19 +1,15 @@
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
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')
RISOTTO_DB_PASSWORD=replace_me
TIRAMISU_DB_NAME=%%risotto_tiramisu_dbname
TIRAMISU_DB_USER=%%risotto_tiramisu_db_user
TIRAMISU_DB_NAME=%%getVar('risotto_tiramisu_dbname')
TIRAMISU_DB_USER=%%getVar('risotto_tiramisu_db_user')
TIRAMISU_DB_PASSWORD=replace_me
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
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"

View File

@ -2,9 +2,8 @@
Description=risotto
[Service]
EnvironmentFile=/etc/risotto/risotto.conf
ExecStart=/usr/bin/risotto-server
User=risotto
Group=risotto
[Install]
WantedBy=multi-user.target

View File

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

View File

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