ODCS: Add extra compose target directory for private composes.

This commit is contained in:
Jan Kaluža 2020-03-17 05:55:10 +00:00 committed by Pierre-Yves Chibon
parent d9aee1fc32
commit af92d2582a
5 changed files with 16 additions and 4 deletions

View file

@ -36,9 +36,9 @@ odcs_target_dir_url: https://odcs.stg.fedoraproject.org/composes
# for taskotron.
odcs_allowed_clients_users:
jscotka: {}
humaton: {"source_types": ["tag", "module", "build", "raw_config"]}
mohanboddu: {"source_types": ["tag", "module", "build", "raw_config"]}
jkaluza: {"source_types": ["tag", "module", "build", "raw_config"]}
humaton: {"source_types": ["tag", "module", "build", "raw_config"], "target_dirs": ["private"]}
mohanboddu: {"source_types": ["tag", "module", "build", "raw_config"], "target_dirs": ["private"]}
jkaluza: {"source_types": ["tag", "module", "build", "raw_config"], "target_dirs": ["private"]}
nfs_mount_opts: "ro,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3"

View file

@ -48,4 +48,5 @@ odcs_seconds_to_live: 86400
# # The default is 72 hours
odcs_max_seconds_to_live: 259200
odcs_celery_concurrency: 2
odcs_extra_target_dirs: {"private": "/srv/odcs/private"}

View file

@ -51,18 +51,22 @@
- name: create ODCS_TARGET_DIR
file:
path: "{{ odcs_target_dir }}"
path: "{{ item }}"
state: directory
owner: apache
group: apache
mode: 0777
# recurse: yes
follow: no
with_items:
- "{{ odcs_target_dir }}"
- "{{ odcs_target_dir }}/private"
tags:
- odcs
- odcs/backend
- odcs/frontend
# this app config is shared by backend and frontend, but has different
# owner groups on backend and frontend, and notify different handlers,
# we can have vars set for frontend and backend seperately to do that,

View file

@ -97,6 +97,8 @@ class ProdConfiguration(BaseConfiguration):
TARGET_DIR = "{{ odcs_target_dir }}"
TARGET_DIR_URL = "{{ odcs_target_dir_url }}"
EXTRA_TARGET_DIRS = {{ odcs_extra_target_dirs }}
ALLOWED_SOURCE_TYPES = {{ odcs_allowed_source_types }}
RAW_CONFIG_URLS = {{ odcs_raw_config_urls }}

View file

@ -67,3 +67,8 @@ Alias "/composes" "{{ odcs_target_dir }}"
Options +Indexes
</Directory>
<Directory "{{ odcs_target_dir }}/private">
Require all denied
</Directory>