From 68d61b87c5b77714dd1c8a6004a6061477e2728c Mon Sep 17 00:00:00 2001 From: Francois Andrieu Date: Tue, 21 Jun 2022 20:45:38 +0200 Subject: [PATCH] websites: clean old build configuration on sundries --- roles/fedora-web/build/files/syncStatic.cron | 2 - roles/fedora-web/build/files/syncStatic.sh | 65 ------------------- .../fedora-web/build/files/syncStatic.stg.sh | 65 ------------------- roles/fedora-web/build/tasks/main.yml | 39 ++--------- roles/rsyncd/files/rsyncd.conf.sundries | 14 ++-- 5 files changed, 14 insertions(+), 171 deletions(-) delete mode 100644 roles/fedora-web/build/files/syncStatic.cron delete mode 100644 roles/fedora-web/build/files/syncStatic.sh delete mode 100644 roles/fedora-web/build/files/syncStatic.stg.sh diff --git a/roles/fedora-web/build/files/syncStatic.cron b/roles/fedora-web/build/files/syncStatic.cron deleted file mode 100644 index bb1e3c4448..0000000000 --- a/roles/fedora-web/build/files/syncStatic.cron +++ /dev/null @@ -1,2 +0,0 @@ -MAILTO=web-members@fedoraproject.org -0 * * * * apache /usr/local/bin/lock-wrapper syncStatic /usr/local/bin/syncStatic diff --git a/roles/fedora-web/build/files/syncStatic.sh b/roles/fedora-web/build/files/syncStatic.sh deleted file mode 100644 index 67d9a993f2..0000000000 --- a/roles/fedora-web/build/files/syncStatic.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# mmcgrath@redhat.com 09-20-2007 -# - -function build { - site="$1" - err=$( - { - cd "$site" && \ - make pullpos && \ - make && \ - rsync -qa --delete-after --delay-updates out/ "/srv/web/$site/"; \ - } 2>&1 - ) - - rc=$? - if [ $rc -ne 0 ]; then - echo "$site build failed" - echo "====================================" - echo "$err" - echo - fi - - return $rc; -} - -if [ ! -d /srv/web/fedora-websites/.git ] -then - /usr/bin/git clone -q \ - https://pagure.io/fedora-websites.git \ - /srv/web/fedora-websites -fi - -# Freeze the website to prepare beta changes. On release day, comment the git -# checkout line below, run this script, and use: -# sudo func proxy\* call command run "/usr/bin/rsync -a --no-owner --no-group sundries01::fedoraproject.org/* /srv/web/fedoraproject.org/" -# on puppet1 to update the website. -# -# For any other last-minute changes or fixes, make the necessary changes in the -# fedora-web repo, then run this script and the above func command. -# -# Good luck! - -cd /srv/web/fedora-websites - -/usr/bin/git clean -q -fdx || exit 1 -/usr/bin/git reset -q --hard || exit 1 -/usr/bin/git checkout -q main || exit 1 - -/usr/bin/git pull -q --ff-only || exit 1 -build labs.fedoraproject.org -build arm.fedoraproject.org -build alt.fedoraproject.org - -# Make sure everything else builds from main. -/usr/bin/git clean -q -fdx || exit 1 -/usr/bin/git reset -q --hard || exit 1 -/usr/bin/git checkout -q main || exit 1 - -/usr/bin/git pull -q --ff-only || exit 1 - -build flocktofedora.org -build spins.fedoraproject.org -build fedoracommunity.org -build start.fedoraproject.org diff --git a/roles/fedora-web/build/files/syncStatic.stg.sh b/roles/fedora-web/build/files/syncStatic.stg.sh deleted file mode 100644 index 7322bec8a1..0000000000 --- a/roles/fedora-web/build/files/syncStatic.stg.sh +++ /dev/null @@ -1,65 +0,0 @@ -#!/bin/bash -# mmcgrath@redhat.com 09-20-2007 -# - -function build { - site="$1" - err=$( - { - cd "$site" && \ - make pullpos && \ - make && \ - rsync -qa --delete-after --delay-updates out/ "/srv/web/$site/"; \ - } 2>&1 - ) - - rc=$? - if [ $rc -ne 0 ]; then - echo "$site build failed" - echo "====================================" - echo "$err" - echo - fi - - return $rc; -} - -if [ ! -d /srv/web/fedora-websites/.git ] -then - /usr/bin/git clone -q \ - https://pagure.io/fedora-websites.git \ - /srv/web/fedora-websites -fi - -# Freeze the website to prepare beta changes. On release day, comment the git -# checkout line below, run this script, and use: -# sudo func proxy\* call command run "/usr/bin/rsync -a --no-owner --no-group sundries01::fedoraproject.org/* /srv/web/fedoraproject.org/" -# on puppet1 to update the website. -# -# For any other last-minute changes or fixes, make the necessary changes in the -# fedora-web repo, then run this script and the above func command. -# -# Good luck! - -cd /srv/web/fedora-websites - -/usr/bin/git clean -q -fdx || exit 1 -/usr/bin/git reset -q --hard || exit 1 -/usr/bin/git checkout -q staging || exit 1 - -/usr/bin/git pull -q --ff-only || exit 1 -build labs.fedoraproject.org -build spins.fedoraproject.org -build arm.fedoraproject.org -build alt.fedoraproject.org - -# Make sure everything else builds from main. -/usr/bin/git clean -q -fdx || exit 1 -/usr/bin/git reset -q --hard || exit 1 -/usr/bin/git checkout -q main || exit 1 - -/usr/bin/git pull -q --ff-only || exit 1 - -build flocktofedora.org -build fedoracommunity.org -build start.fedoraproject.org diff --git a/roles/fedora-web/build/tasks/main.yml b/roles/fedora-web/build/tasks/main.yml index bf4ff9135e..bdea35810e 100644 --- a/roles/fedora-web/build/tasks/main.yml +++ b/roles/fedora-web/build/tasks/main.yml @@ -35,15 +35,9 @@ with_items: - fedora-web - fedoraproject.org - - spins.fedoraproject.org - talk.fedoraproject.org - - start.fedoraproject.org - mirrors.fedoraproject.org - - fedoracommunity.org - - flocktofedora.org - - arm.fedoraproject.org - iot.fedoraproject.org - - labs.fedoraproject.org tags: - fedora-web @@ -59,35 +53,16 @@ - fedora-web when: env == 'staging' -- name: Copy syncStatic script (stg) - when: env == "staging" - copy: > - src=syncStatic.stg.sh dest=/usr/local/bin/syncStatic owner=root group=root - mode=0755 - tags: - - fedora-web - -- name: Copy syncStatic script (prod) - when: env == "production" - copy: > - src=syncStatic.sh dest=/usr/local/bin/syncStatic owner=root group=root - mode=0755 - tags: - - fedora-web - -- name: Install the syncStatic and syncTranslations cronjobs - copy: > - src={{item}}.cron dest=/etc/cron.d/{{item}}.cron - owner=root group=root mode=0644 - with_items: - - syncStatic - tags: - - fedora-web - - cron - - name: Remove the syncTranslations cronjob file: path: /etc/cron.d/syncTranslations.cron state: absent tags: - cron + +- name: Remove the syncStatic cronjob + file: + path: /etc/cron.d/syncStatic.cron + state: absent + tags: + - cron diff --git a/roles/rsyncd/files/rsyncd.conf.sundries b/roles/rsyncd/files/rsyncd.conf.sundries index 054e4a6768..76983d5696 100644 --- a/roles/rsyncd/files/rsyncd.conf.sundries +++ b/roles/rsyncd/files/rsyncd.conf.sundries @@ -64,7 +64,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0 [spins.fedoraproject.org] comment = spins.fedoraproject.org -path = /srv/web/spins.fedoraproject.org +path = /srv/websites/spins.fedoraproject.org uid = root gid = root read only = yes @@ -80,7 +80,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0 [start.fedoraproject.org] comment = start.fedoraproject.org -path = /srv/web/start.fedoraproject.org +path = /srv/websites/start.fedoraproject.org uid = root gid = root read only = yes @@ -96,7 +96,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0 [fedoracommunity.org] comment = fedoracommunity.org -path = /srv/web/fedoracommunity.org +path = /srv/websites/fedoracommunity.org uid = root gid = root read only = yes @@ -104,7 +104,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0 [flocktofedora.org] comment = flocktofedora.org -path = /srv/web/flocktofedora.org +path = /srv/websites/flocktofedora.org uid = root gid = root read only = yes @@ -120,7 +120,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0 [labs.fedoraproject.org] comment = labs.fedoraproject.org -path = /srv/web/labs.fedoraproject.org +path = /srv/websites/labs.fedoraproject.org uid = root gid = root read only = yes @@ -136,7 +136,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0 [arm.fedoraproject.org] comment = arm.fedoraproject.org -path = /srv/web/arm.fedoraproject.org +path = /srv/websites/arm.fedoraproject.org uid = root gid = root read only = yes @@ -168,7 +168,7 @@ hosts allow = 10.3.160.0/255.255.224.0 192.168.0.0/255.255.0.0 [alt.fedoraproject.org] comment = alt.fedoraproject.org -path = /srv/web/alt.fedoraproject.org +path = /srv/websites/alt.fedoraproject.org uid = root gid = root read only = yes