Skip to content
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

Set up DataSync between Staging Test EFS and Staging Test Public S3 #16925

Closed
2 tasks done
Tracked by #17245 ...
timcosgrove opened this issue Jan 19, 2024 · 4 comments
Closed
2 tasks done
Tracked by #17245 ...

Comments

@timcosgrove
Copy link
Contributor

timcosgrove commented Jan 19, 2024

Requirements

We need files to sync from Staging Test's EFS to the Public S3 bucket for Staging test, so that files added via the Drupal file system are available publicly.

Acceptance criteria

Preview Give feedback

Background & implementation details

EFS: https://us-gov-west-1.console.amazonaws-us-gov.com/efs/home?region=us-gov-west-1#/file-systems/fs-3a9aa63b
S3: https://us-gov-west-1.console.amazonaws-us-gov.com/s3/buckets/dsva-vagov-staging-cms-test-files?region=us-gov-west-1&tab=objects

EFS path: all files under docroot/sites/default/files/*
S3 destination path: img/*

Once the sync is set up and the initial sync is complete, we should add files to the Staging Test CMS and track how long they take to end up on S3. Drupal folks on the team can help with identifying where the files will end up on Drupal so we can observe on the S3 end.

@jschmidt-civicactions
Copy link

@olivereri
Copy link
Contributor

olivereri commented Feb 6, 2024

For posterity, should I no longer be here when and if datasync is rolled out to other systems and environments; here is the process to get datasync configured:

For each terraform environment dsva-vagov-(dev,staging,prod):
add to the cms.tf and cms-test.tf module files within the curly braces:

  subnets_arn = [
    aws_subnet.subnet_1a.arn,
    aws_subnet.subnet_1b.arn,
    aws_subnet.subnet_1c.arn,
  ]

Then, bump source version to v1.13.10 i.e.: github.com/department-of-veterans-affairs/terraform-aws-vsp-cms?ref=v1.13.10

@olivereri
Copy link
Contributor

@olivereri
Copy link
Contributor

The initial sync from EFS to S3 was blazingly fast. It took 4 minutes to transfer roughly 64GB of data. At a rate of 864.35 Files per second that would math out to 1 file per millisecond. After tweaking the file verification to do it on the fly it takes less than 2 minutes to prepare and launch the sync task. The expectation would be that Datasync task runs shouldn't take more than 3 minutes.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants