-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serve MDN sitemaps, other media files #445
Comments
What needs to be done on the infra side of things? We already have an EFS volume mounted at |
Maybe nothing, but I'm not familiar with what you and @escattone did for attachments. In SCL3,
Looking at the settings, you are pointing |
The current directory structure for EFS is as follows:
I could update the current sync cronjob from SCL3 to copy the additional files into the correct locations. |
I think there's just a few additional files we need to serve:
I think eventually we'll want to convert these to Django views, maybe with caching. I want to talk to @escattone to see if he agrees and thinks it's a day or less of work. If that's the case, it's a code task, and maybe an extra step in Docker image provisioning for the commit hashes. If not, we may want to host these files in a new folder. |
Thanks @jwhitlock! I hadn't yet considered these files. Here are my thoughts so far:
|
Submitted #455 to address |
It looks like |
After further reflection, I'm thinking the best way to handle the |
I'm going to use k8s' new |
Ok, after some work, I see now that |
I think what we really want are "initContainers" that are run per deployment, not per pod. Kubernetes doesn't currently provide such a thing, but I found two related and very interesting discussions focused on this very issue: |
Actually, what I think we want are initContainers or jobs that can be triggered on deployment-based lifecycle events. For example, it would be great to run db migrations at the beginning of a k8s deployment, and the ability to reverse the migrations on failure or rollback events. |
How about a Jenkins step that generates the file and |
I see from your comments above this one that you don't actually mean initContainers, since you're already aware they run for every pod creation and therefore wouldn't be a good fit for db migrations, but I'd avoid using that specific term to avoid confusion in the future. Jobs might seem like a good fit at first, but there are some caveats that need to be addressed for the specific use case of db migrations. For generating files, @jwhitlock's suggestion to do it in Jenkins at container build time makes the most sense to me. |
Sorry, I haven't been clear enough about this. I totally agree that generating the revision files is best As for the database migrations, I'm also using a once-per-deployment k8s Job, but I'd like to ensure that it has completed before the kuma-based deployment pods start, and I'm not sure what the best/recommended way to do that is. I'm guessing it may be to do something like |
@jwhitlock and I met to discuss the issue of how best to serve the kumascript revision from the kuma-image-based
|
Submitted mdn/kuma#4399 and mdn/kumascript#303 for review to address the first two bullet points. |
Submitted mdn/kuma#4401 to address the final bullet point in #445 (comment) as well as the second bullet point in #445 (comment). I think these PR's fully address this issue, since there is already a Django view for serving |
@escattone can this issue be closed? |
@metadave Yes it can! |
The sitemaps are initiated by
celerybeat
, generated in background tasks, and written toMEDIA_ROOT
. They are low traffic, but users include search crawlers, so they are important for SEO.The text was updated successfully, but these errors were encountered: