From 61b3d053b148a9bc41acd22f9439504deb39c48e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kone=C4=8Dn=C3=BD?= Date: Wed, 22 Jun 2022 15:57:16 +0200 Subject: [PATCH] [release-monitoring] Prepare prod to 1.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As a bonus move it to OCP4. Signed-off-by: Michal Konečný --- .../openshift-apps/release-monitoring.yml | 2 +- .../templates/buildconfig.yml | 23 ++----------------- .../release-monitoring/templates/httpd.conf | 13 ----------- 3 files changed, 3 insertions(+), 35 deletions(-) diff --git a/playbooks/openshift-apps/release-monitoring.yml b/playbooks/openshift-apps/release-monitoring.yml index 89a1d66ef9..9fadab9816 100644 --- a/playbooks/openshift-apps/release-monitoring.yml +++ b/playbooks/openshift-apps/release-monitoring.yml @@ -1,7 +1,7 @@ # Deploy the app - name: make the app be real - hosts: os_control_stg[0]:os_masters[0] + hosts: os_control_stg[0]:os_control[0] user: root gather_facts: False diff --git a/roles/openshift-apps/release-monitoring/templates/buildconfig.yml b/roles/openshift-apps/release-monitoring/templates/buildconfig.yml index b347d0b383..dad7c9a3b7 100644 --- a/roles/openshift-apps/release-monitoring/templates/buildconfig.yml +++ b/roles/openshift-apps/release-monitoring/templates/buildconfig.yml @@ -1,3 +1,4 @@ +--- apiVersion: v1 items: - apiVersion: v1 @@ -10,11 +11,7 @@ items: runPolicy: Serial source: dockerfile: |- -{% if env == 'staging' %} FROM fedora:36 -{% else %} - FROM fedora:32 -{% endif %} LABEL \ name="release-monitoring-web" \ vendor="Fedora Infrastructure" \ @@ -25,9 +22,7 @@ items: graphviz \ fedora-messaging \ python3-alembic \ -{% if env == 'staging' %} python3-beautifulsoup4 \ -{% endif %} python3-arrow \ python3-dateutil \ python3-defusedxml \ @@ -39,22 +34,13 @@ items: python3-ordered-set \ python3-pip \ python3-psycopg2 \ -{% if env == 'staging' %} python3-semver \ -{% else %} - python3-pytoml \ - python3-semver \ - python3-social-auth-app-flask \ - python3-social-auth-app-flask-sqlalchemy \ -{% endif %} python3-sphinxcontrib-httpdomain \ python3-sqlalchemy \ python3-sqlalchemy_schemadisplay \ python3-sseclient \ python3-straight-plugin \ -{% if env == 'staging' %} python3-toml \ -{% endif %} python3-wtforms && \ dnf autoremove -y && \ dnf clean all -y @@ -75,21 +61,16 @@ items: popd && \ python3 setup.py install && \ pip-3 install . && \ -{% if env != 'staging' %} - pushd anitya_schema && \ - pip-3 install . && \ - popd && \ -{% endif %} popd && \ rm -rf anitya # Let's use staging auth server in staging {% if env == 'staging' %} RUN sed -i 's/id.fedoraproject.org/id.stg.fedoraproject.org/g' /usr/local/lib/python3.10/site-packages/social_auth_core-4.3.0-py3.10.egg/social_core/backends/fedora.py +{% endif %} # Hotfix for social_auth-sqlalchemy # Could be removed when we switch to something else RUN sed -i 's/base64.encodestring/base64.encodebytes/g' /usr/local/lib/python3.10/site-packages/social_auth_storage_sqlalchemy-1.1.0-py3.10.egg/social_sqlalchemy/storage.py -{% endif %} RUN mkdir /httpdir RUN chmod 777 /httpdir EXPOSE 8080 diff --git a/roles/openshift-apps/release-monitoring/templates/httpd.conf b/roles/openshift-apps/release-monitoring/templates/httpd.conf index c426e9a811..551c6ef198 100644 --- a/roles/openshift-apps/release-monitoring/templates/httpd.conf +++ b/roles/openshift-apps/release-monitoring/templates/httpd.conf @@ -27,19 +27,11 @@ StartServers 20 ServerLimit 100 MaxRequestsPerChild 2000 MaxRequestWorkers 100 -{% if env == 'staging' %} -{% else %} - -{% endif %} AllowOverride None Require all granted -{% if env == 'staging' %} -{% else %} - -{% endif %} AllowOverride None Require all granted @@ -63,13 +55,8 @@ LogLevel info TypesConfig /etc/mime.types AddDefaultCharset UTF-8 CoreDumpDirectory /tmp -{% if env == 'staging' %} Alias /docs /usr/local/lib/python3.10/anitya/static/docs/html/ Alias /static /usr/local/lib/python3.10/site-packages/anitya/static/ -{% else %} -Alias /docs /usr/local/lib/python3.8/anitya/static/docs/html/ -Alias /static /usr/local/lib/python3.8/site-packages/anitya/static/ -{% endif %} WSGIDaemonProcess anitya display-name=anitya processes=2 threads=2 maximum-requests=1000 home=/httpdir WSGIApplicationGroup %{GLOBAL} WSGISocketPrefix run/wsgi