| |
@@ -283,18 +283,21 @@
|
| |
website: fedoraproject.org
|
| |
path: /index.html
|
| |
target: https://getfedora.org/
|
| |
+ when: env != "staging"
|
| |
|
| |
- role: httpd/redirect
|
| |
shortname: get-fedora-old
|
| |
website: fedoraproject.org
|
| |
path: /get-fedora
|
| |
target: https://getfedora.org/
|
| |
+ when: env != "staging"
|
| |
|
| |
- role: httpd/redirect
|
| |
shortname: sponsors
|
| |
website: fedoraproject.org
|
| |
path: /sponsors
|
| |
target: https://getfedora.org/sponsors
|
| |
+ when: env != "staging"
|
| |
|
| |
- role: httpd/redirect
|
| |
shortname: code-of-conduct
|
| |
@@ -319,18 +322,21 @@
|
| |
website: fedoraproject.org
|
| |
path: /verify
|
| |
target: https://getfedora.org/verify
|
| |
+ when: env != "staging"
|
| |
|
| |
- role: httpd/redirect
|
| |
shortname: keys
|
| |
website: fedoraproject.org
|
| |
path: /keys
|
| |
target: https://getfedora.org/keys
|
| |
+ when: env != "staging"
|
| |
|
| |
- role: httpd/redirect
|
| |
shortname: release-banner
|
| |
website: fedoraproject.org
|
| |
path: /static/js/release-counter-ext.js
|
| |
target: https://getfedora.org/static/js/release-counter-ext.js
|
| |
+ when: env != "staging"
|
| |
|
| |
#
|
| |
# When there is no prerelease we redirect the prerelease urls
|
| |
Fedora website 3.0 deployment in staging.
This deploys the new main fedoraproject.org website that will replace getfedora.org (and others at a later time) for F38.
This playbook:
- removes fedoraproject.org redirects to getfedora.org.
- Provisions s3 storage on OCP.
- Retrieves s3 credentials from OCP using community.okd.k8s module (assuming the correct kubeconfig is at the default location on os_control) and saves it in /srv/private for later use.
- Installs s3cmd on proxies (used to sync s3 storage)
- Deploys the sync script including s3 credentials.
- Deploys buildconfig / deployment on OCP to build the website and push to s3.
Note that I've done something unusual (at least to me) as I used a buildconfig + deployment to build & deploy the websites, instead of a cronjob like it was for the previous version.
The buildconfig builds an image with the website in it, then trigger a redeploy of the application pod that basically just pushes the static website content to s3, and sits there indefinitely (until the next build).
The reason behind this logic is we can now trigger a build+deploy remotely through the integrated webhook (from Gitlab for instance) and build the website only when needed (instead of periodic builds).
Additionally, it leaves room to add fedora-messaging to that deploy pod later.
Additional requirements:
- set
websites_github_secret
with some random string (likeuuidgen
) in/srv/private/ansible/vars.yml
.- a few files need to be manually removed on proxies:
or you could just drop the whole
/etc/httpd/conf.d/fedoraproject.org
directory and the playbook will recreate everything.extra notes:
- /srv/web/fedoraproject.org will be completely replaced. I believe this should not be an issue as it seems to be only the old, unused main site in it.
- while I tried to test most of this change in my own environment, it's very unlikely it will work on the first try. You can ping me on irc to troubleshoot if needed.
- I feel like I wrote way too much text in this PR :p
- We plan to give a demo of the new website to the Council beginning of January. It would be very nice if we could get this deployed before the end-of-year recharge period so we have time to adjust if the deployment doesn't work as expected.