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

Add a new doc about how to use AWS CloudFront as backend storage. #6310

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

decko
Copy link
Member

@decko decko commented Feb 27, 2025

Also, adds a simple test to check if the options needed to configure
AWS CloudFront are valid.

Closes #6258

@decko decko force-pushed the cloudfront_docs branch 2 times, most recently from aec8e1b to 8974a38 Compare February 27, 2025 20:16
@decko decko force-pushed the cloudfront_docs branch 3 times, most recently from 56c2ad9 to dca4105 Compare February 27, 2025 21:06
# We need to format our key to a JSON friendly format
export CLOUDFRONT_KEY=$(cat keyfile.pem | jq -sR .)

curl -X POST $BASE_HREF/pulp/default/api/v3/domains/ -d '{"name": "cloudfront_storage", "storage_class": "storages.backends.s3boto3.S3Boto3Storage", "storage_settings": {"access_key": "{aws_access_key}", "secret_key": "{aws_secret_key}", "bucket_name": "{aws_bucket_name}", "region_name": "{aws_region_name}", "default_acl": "private", "cloudfront_key_id": "{aws_cloudfront_key_id}", "cloudfront_key": '"$CLOUDFRONT_KEY"', "custom_domain": "{aws_cloudfront_custom_domain}"}, "redirect_to_object_storage": true, "hide_guarded_distributions": false}' -H 'Content-Type: application/json'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a pulp CLI equivalent option? Definitely keep this example, this is great. If there is a pulp CLI way to do it can that example also be added? If there isn't then I think this is just fine as-is.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pulp domain update --storage-settings should do the trick, yeah?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks folks. I used pulp-cli in the first tests and it didn't worked out. After that I've focused in using curl and the docs reflected that.
Tried the same approach with pulp-cli, it worked and I've updated the docs.

Also, adds a simple test to check if the options needed to configure
AWS CloudFront are valid.

Closes #6258
Copy link
Member

@bmbouter bmbouter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great!

@decko decko merged commit 7093dd3 into main Feb 28, 2025
12 checks passed
@decko decko deleted the cloudfront_docs branch February 28, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add CloudFront Support
3 participants