From f904fc03636ab09633f3fc2869c3e4b669983668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kalu=C5=BEa?= Date: Mon, 11 Dec 2017 08:19:39 +0000 Subject: [PATCH] Update ODCS role to new ODCS version and enable runroot backend on staging so I can test it. --- inventory/group_vars/odcs-backend-stg | 5 +++++ .../templates/etc/koji.conf.d/odcs.conf.j2 | 2 +- roles/odcs/base/defaults/main.yml | 13 +++++++++++++ .../odcs/base/templates/etc/odcs/config.py.j2 | 18 +++++++++++++++++- 4 files changed, 36 insertions(+), 2 deletions(-) diff --git a/inventory/group_vars/odcs-backend-stg b/inventory/group_vars/odcs-backend-stg index e60ab8a547..2c453403bf 100644 --- a/inventory/group_vars/odcs-backend-stg +++ b/inventory/group_vars/odcs-backend-stg @@ -39,6 +39,11 @@ fedmsg_certs: can_send: - odcs.compose.state-changed +odcs_allowed_source_types: ["tag", "repo", "raw_config"] +odcs_pungi_runroot_packages = ['pungi', 'fedora-packager', 'python2-modulemd', 'python2-pdc-client'] +odcs_pungi_runroot_tag: f26-build +odcs_pungi_runroot_target_dir_url: http://kojipkgs.stg.fedoraproject.org/compose/odcs + odcs_target_dir_url: https://odcs.stg.fedoraproject.org/composes # For the MOTD diff --git a/roles/odcs/backend/templates/etc/koji.conf.d/odcs.conf.j2 b/roles/odcs/backend/templates/etc/koji.conf.d/odcs.conf.j2 index bea9632c66..67a5f233c7 100644 --- a/roles/odcs/backend/templates/etc/koji.conf.d/odcs.conf.j2 +++ b/roles/odcs/backend/templates/etc/koji.conf.d/odcs.conf.j2 @@ -7,7 +7,7 @@ krb_rdns = false principal = odcs/odcs.fedoraproject.org@FEDORAPROJECT.ORG keytab = /etc/krb5.odcs_odcs{{env_suffix}}.fedoraproject.org.keytab -[staging] +[stg] server = https://koji.stg.fedoraproject.org/kojihub weburl = https://koji.stg.fedoraproject.org/koji topurl = https://kojipkgs.stg.fedoraproject.org/ diff --git a/roles/odcs/base/defaults/main.yml b/roles/odcs/base/defaults/main.yml index 91f82434ea..384ce9d805 100644 --- a/roles/odcs/base/defaults/main.yml +++ b/roles/odcs/base/defaults/main.yml @@ -9,3 +9,16 @@ odcs_allowed_clients_groups: ["sysadmin-mbs"] odcs_allowed_clients_users: [] odcs_admin_groups: ["sysadmin-mbs"] odcs_admin_users: [] +odcs_allowed_source_types: ["tag", "module"] +odcs_raw_config_urls: {} +odcs_sigkeys: [] +odcs_pungi_runroot_enabled: False +odcs_pungi_parent_runroot_channel: compose +odcs_pungi_parent_runroot_packages: ["pungi"] +odcs_pungi_parent_runroot_mounts: [] +odcs_pungi_parent_runroot_weight: 3.5 +odcs_pungi_parent_tag: f27-build +odcs_pungi_parent_runroot_arch: x86_64 +odcs_runroot_target_dir: /mnt/koji/compose/odcs +odcs_pungi_runroot_target_dir_url: http://kojipkgs.fedoraproject.org/compose/odcs + diff --git a/roles/odcs/base/templates/etc/odcs/config.py.j2 b/roles/odcs/base/templates/etc/odcs/config.py.j2 index 0e676fac6a..bb18b884fe 100644 --- a/roles/odcs/base/templates/etc/odcs/config.py.j2 +++ b/roles/odcs/base/templates/etc/odcs/config.py.j2 @@ -72,7 +72,7 @@ class ProdConfiguration(BaseConfiguration): SQLALCHEMY_DATABASE_URI = 'postgresql+psycopg2://odcs:{{odcs_stg_db_password}}@db-odcs/odcs{{ '?sslmode=require' if odcs_force_postgres_ssl else '' }}' - KOJI_PROFILE = 'staging' + KOJI_PROFILE = 'stg' PDC_URL = 'https://pdc.stg.fedoraproject.org/rest_api/v1' {% else %} @@ -91,6 +91,9 @@ class ProdConfiguration(BaseConfiguration): TARGET_DIR = "{{ odcs_target_dir }}" TARGET_DIR_URL = "{{ odcs_target_dir_url }}" + ALLOWED_SOURCE_TYPES = {{ odcs_allowed_source_types }} + RAW_CONFIG_URLS = {{ odcs_raw_config_urls }} + ALLOWED_CLIENTS = { 'groups': {{ odcs_allowed_clients_groups }}, 'users': {{ odcs_allowed_clients_users }}, @@ -100,3 +103,16 @@ class ProdConfiguration(BaseConfiguration): 'groups': {{ odcs_admin_groups }}, 'users': {{ odcs_admin_users }}, } + + SIGKEYS = {{ odcs_sigkeys }} + + PUNGI_RUNROOT_ENABLED = {{ odcs_pungi_runroot_enabled }} + PUNGI_PARENT_RUNROOT_CHANNEL = "{{ odcs_pungi_parent_runroot_channel }}" + PUNGI_PARENT_RUNROOT_PACKAGES = {{ odcs_pungi_parent_runroot_packages }} + PUNGI_PARENT_RUNROOT_MOUNTS = {{ odcs_pungi_parent_runroot_mounts }} + PUNGI_PARENT_RUNROOT_WEIGHT = {{ odcs_pungi_parent_runroot_weight }} + PUNGI_PARENT_RUNROOT_TAG = "{{ odcs_pungi_parent_tag }}" + PUNGI_PARENT_RUNROOT_ARCH = "{{ odcs_pungi_parent_runroot_arch }}" + PUNGI_RUNROOT_TARGET_DIR = "{{ odcs_runroot_target_dir }}" + PUNGI_RUNROOT_TARGET_DIR_URL = "{{ odcs_runroot_target_dir_url }}" +