-
Notifications
You must be signed in to change notification settings - Fork 394
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
Allow multiple volumes with managed EFS for a single service #2921
Comments
Just in case this helps prioritize this... Multiple access points is essential for running CMSs like Drupal (probably others) which save user files in multiple locations. For example: Public filesystem in /opt/drupal/web/sites/default/files A single access point couldn't meet this use case. It's possible with externally managed filesystems, but having all this managed by Copilot would be much more convenient. |
Hi @FraserThompson ! out of curiosity wouldn't this scenario be satisfied with:
Or am I misunderstanding a step? |
Hi @efekarakus ! This would work to persist files, yes, but as far as I can tell it would go against best practices. The other contents of /opt/drupal come from the Docker image and should only exist in ephemeral storage because they're not stateful. The only stateful data is contained in those two directories. Ideally you could put all files you want persisted into one directory and make that an EFS volume, but Drupal doesn't offer full control over where these files can be. Also there are other factors, like we might want to share just the public files with an NGINX sidecar so it can serve static assets. We might have another sidecar running Solr for search, and this will also need to persist the search index somewhere. I don't think it would make sense for all of these to persist their data to the same place. For reference the AWS example for Drupal on ECS uses one filesystem with multiple access points for each directory they want to persist. Unless I'm misunderstanding something (which is entirely possible) I don't think we can do this right now with Copilot. |
Hi @efekarakus , Do we have any update on this issue resolution? |
…ice (#5631) This is the easiest possible fix for the issue, we got an internal ticket requesting a fix for this so I wanted to get a basic fix out for review first and iterate if this causes issues. Related #2921 By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the Apache 2.0 License.
We should enable more than one
storage.volumes
with managed EFS for a single service.Ask
Original ask: #1559 (comment)
Today users are limited to a single EFS access point per service:
If they try to use the same EFS filesystem for multiple volumes like this:
We return the following error:
Programming model
copilot-cli/internal/pkg/template/templates/workloads/partials/cf/efs-access-point.yml
Lines 2 to 3 in 2cc2403
RootDirectory.Path
for the additional access points. Today, we hard-code it to the service name like "frontend". The proposal is to do<svcName>-<volumeName>
.copilot-cli/internal/pkg/template/templates/workloads/partials/cf/efs-access-point.yml
Lines 13 to 14 in 2cc2403
copilot-cli/internal/pkg/template/templates/workloads/partials/cf/taskrole.yml
Lines 72 to 74 in 2cc2403
The text was updated successfully, but these errors were encountered: