Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

remote_file_s3 (7) Versions 1.2.0

Provides remote_file_s3 resource

Policyfile
Berkshelf
Knife
cookbook 'remote_file_s3', '= 1.2.0', :supermarket
cookbook 'remote_file_s3', '= 1.2.0'
knife supermarket install remote_file_s3
knife supermarket download remote_file_s3
README
Dependencies
Quality 67%

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.
  • allow_instance_profile - Allow instance profile to be used for credentials when running in EC2. (default true)
  • 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 and deny_rights - Passed through to file resource to apply Windows permissions.
  • inherits - Passed through to file resource to specify Windows permissions inheritance.
  • region - AWS region to use for the endpoint. Defaults to EC2 instance region or us-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

Collaborator Number Metric
            

1.2.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.2.0 passed this metric

Foodcritic Metric
            

1.2.0 passed this metric

No Binaries Metric
            

1.2.0 failed this metric

Failure: Cookbook should not contain binaries. Found:
remote_file_s3/coverage/assets/0.10.2/colorbox/controls.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/colorbox/border.png
remote_file_s3/coverage/assets/0.10.2/loading.gif
remote_file_s3/coverage/assets/0.10.2/favicon_yellow.png
remote_file_s3/coverage/assets/0.10.2/favicon_red.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/smoothness/images/ui-icons_cd0a0a_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_454545_256x240.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_888888_256x240.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-bg_glass_55_fbf9ee_1x400.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-icons_2e83ff_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/magnify.png
remote_file_s3/coverage/assets/0.10.2/favicon_green.png
remote_file_s3/coverage/assets/0.12.2/colorbox/controls.png
remote_file_s3/coverage/assets/0.12.2/colorbox/loading.gif
remote_file_s3/coverage/assets/0.12.2/colorbox/loading_background.png
remote_file_s3/coverage/assets/0.12.2/colorbox/border.png
remote_file_s3/coverage/assets/0.12.2/loading.gif
remote_file_s3/coverage/assets/0.12.2/DataTables-1.10.20/images/sort_desc_disabled.png
remote_file_s3/coverage/assets/0.12.2/DataTables-1.10.20/images/sort_asc_disabled.png
remote_file_s3/coverage/assets/0.12.2/DataTables-1.10.20/images/sort_asc.png
remote_file_s3/coverage/assets/0.12.2/DataTables-1.10.20/images/sort_desc.png
remote_file_s3/coverage/assets/0.12.2/DataTables-1.10.20/images/sort_both.png
remote_file_s3/coverage/assets/0.12.2/favicon_yellow.png
remote_file_s3/coverage/assets/0.12.2/favicon_red.png
remote_file_s3/coverage/assets/0.12.2/images/ui-bg_flat_0_aaaaaa_40x100.png
remote_file_s3/coverage/assets/0.12.2/images/ui-icons_cd0a0a_256x240.png
remote_file_s3/coverage/assets/0.12.2/images/ui-bg_glass_75_dadada_1x400.png
remote_file_s3/coverage/assets/0.12.2/images/ui-icons_454545_256x240.png
remote_file_s3/coverage/assets/0.12.2/images/ui-bg_glass_65_ffffff_1x400.png
remote_file_s3/coverage/assets/0.12.2/images/ui-icons_888888_256x240.png
remote_file_s3/coverage/assets/0.12.2/images/ui-bg_glass_95_fef1ec_1x400.png
remote_file_s3/coverage/assets/0.12.2/images/ui-bg_highlight-soft_75_cccccc_1x100.png
remote_file_s3/coverage/assets/0.12.2/images/ui-bg_flat_75_ffffff_40x100.png
remote_file_s3/coverage/assets/0.12.2/images/ui-bg_glass_55_fbf9ee_1x400.png
remote_file_s3/coverage/assets/0.12.2/images/ui-icons_222222_256x240.png
remote_file_s3/coverage/assets/0.12.2/images/ui-icons_2e83ff_256x240.png
remote_file_s3/coverage/assets/0.12.2/images/ui-bg_glass_75_e6e6e6_1x400.png
remote_file_s3/coverage/assets/0.12.2/magnify.png
remote_file_s3/coverage/assets/0.12.2/favicon_green.png

Testing File Metric
            

1.2.0 passed this metric

Version Tag Metric
            

1.2.0 passed this metric