cookbook 'remote_file_s3', '= 1.0.6'
remote_file_s3 (7) Versions 1.0.6 Follow0
Provides remote_file_s3 resource
cookbook 'remote_file_s3', '= 1.0.6', :supermarket
knife supermarket install remote_file_s3
knife supermarket download remote_file_s3
remote_file_s3
This resource simply downloads a file from S3 given a bucket and path. Despite its name, it does not use the remote_file
resource behind the scenes for idempotence or to transfer the file and instead implements an internal catalog to track files' sha256 sums and etags at time of download for idempotence and the aws-sdk-s3
gem for file transfer.
Why do we need yet another s3 file resource?
Well, IMO, they're all poorly implemented either by way of being too complex (trying to implement everything themselves), by using cli tool shellouts, or by incorrectly making assumptions about Amazon's etags. This resource places no importance on the way Amazon generates their etags (which is inconsistent depending on file attributes) and simply uses it as HTTP intends you to, as an indicator that a file has changed by a simple equality check.
Platforms
- Ubuntu
- Centos
- RHEL
- Debian
- Red Hat
- macOS
- Windows
Usage
Just depends
on this cookbook to be able to use this resource in your cookbook/recipes.
remote_file_s3
Example
remote_file_s3 '/tmp/foo.txt' do bucket 'mybucket' remote_path 'myfolder/foo.txt' aws_access_key_id 'myaccesskey' aws_secret_access_key 'mysecretkey' action :create end
Properties
-
bucket
- The name of the S3 bucket in which the file resides. -
remote_path
- Path to the file inside the bucket. -
aws_acccess_key_id
- Explicitly use this access key, overriding any instance profile. -
aws_secret_access_key
- Explicitly use this access key, overriding any instance profile. -
aws_session_token
- Token required when using an access key for a role. -
owner
- Username or UID that the file will be owned by. -
group
- Group name or GID that the file will be owned by. -
mode
- Access mode for the file. -
rights
anddeny_rights
- Passed through tofile
resource to apply Windows permissions. -
inherits
- Passed through tofile
resource to specify Windows permissions inheritance. -
region
- AWS region to use for the endpoint. Defaults to EC2 instance region orus-west-2
if not an EC2 instance.
Recipes
The aws-sdk-s3
gem is installed via the deps
recipe but you do not need to run this explicitly. It will automatically be loaded when the remote_file_s3
resource is used if aws-sdk-s3
does not exist.
License and Authors
Authors: Matt Kulka matt@lqx.net
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
remote_file_s3 CHANGELOG
This file is used to list changes made in each version of the remote_file_s3 cookbook.
1.0.6
- [TylerSchmidtke] - Allow user to specify region in resource call
1.0.5
- [mattlqx] - Don't throw an exception if group or user doesn't exist at compilation.
1.0.4
- [mattlqx] - Rearrange some statements to better accomodate Windows.
1.0.3
- [mattlqx] - Use node for current user.
1.0.2
- [mattlqx] - Fix issue with nil for owner, group or mode.
1.0.1
- [mattlqx] - Fix lint and move default for aws region ahead in code.
1.0.0
- [mattlqx] - Initial release! 🕺
Check the Markdown Syntax Guide for help with Markdown.
The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.
Collaborator Number Metric
1.0.6 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
1.0.6 passed this metric
Foodcritic Metric
1.0.6 passed this metric
No Binaries Metric
1.0.6 failed this metric
Failure: Cookbook should not contain binaries. Found:
remote_file_s3/coverage/assets/0.10.2/favicon_red.png
remote_file_s3/coverage/assets/0.10.2/colorbox/controls.png
remote_file_s3/coverage/assets/0.10.2/colorbox/border.png
remote_file_s3/coverage/assets/0.10.2/colorbox/loading.gif
remote_file_s3/coverage/assets/0.10.2/colorbox/loading_background.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
remote_file_s3/coverage/assets/0.10.2/magnify.png
remote_file_s3/coverage/assets/0.10.2/favicon_green.png
remote_file_s3/coverage/assets/0.10.2/loading.gif
remote_file_s3/coverage/assets/0.10.2/favicon_yellow.png
Testing File Metric
1.0.6 passed this metric
Version Tag Metric
1.0.6 passed this metric
1.0.6 failed this metric
1.0.6 passed this metric
Foodcritic Metric
1.0.6 passed this metric
No Binaries Metric
1.0.6 failed this metric
Failure: Cookbook should not contain binaries. Found:
remote_file_s3/coverage/assets/0.10.2/favicon_red.png
remote_file_s3/coverage/assets/0.10.2/colorbox/controls.png
remote_file_s3/coverage/assets/0.10.2/colorbox/border.png
remote_file_s3/coverage/assets/0.10.2/colorbox/loading.gif
remote_file_s3/coverage/assets/0.10.2/colorbox/loading_background.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
remote_file_s3/coverage/assets/0.10.2/magnify.png
remote_file_s3/coverage/assets/0.10.2/favicon_green.png
remote_file_s3/coverage/assets/0.10.2/loading.gif
remote_file_s3/coverage/assets/0.10.2/favicon_yellow.png
Testing File Metric
1.0.6 passed this metric
Version Tag Metric
1.0.6 passed this metric
1.0.6 passed this metric
1.0.6 failed this metric
Failure: Cookbook should not contain binaries. Found:
remote_file_s3/coverage/assets/0.10.2/favicon_red.png
remote_file_s3/coverage/assets/0.10.2/colorbox/controls.png
remote_file_s3/coverage/assets/0.10.2/colorbox/border.png
remote_file_s3/coverage/assets/0.10.2/colorbox/loading.gif
remote_file_s3/coverage/assets/0.10.2/colorbox/loading_background.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_888888_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_222222_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_454545_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_2e83ff_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_glass_75_dadada_1x400.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-icons_cd0a0a_256x240.png
remote_file_s3/coverage/assets/0.10.2/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
remote_file_s3/coverage/assets/0.10.2/magnify.png
remote_file_s3/coverage/assets/0.10.2/favicon_green.png
remote_file_s3/coverage/assets/0.10.2/loading.gif
remote_file_s3/coverage/assets/0.10.2/favicon_yellow.png
Testing File Metric
1.0.6 passed this metric
Version Tag Metric
1.0.6 passed this metric
1.0.6 passed this metric
1.0.6 passed this metric