cookbook 'deploy_s3', '~> 1.5.0'
deploy_s3 (3) Versions 1.5.0 Follow6
Provides a resource for downloading build packages and deploying them onto a server
cookbook 'deploy_s3', '~> 1.5.0', :supermarket
knife supermarket install deploy_s3
knife supermarket download deploy_s3
Description
Somewhat similar to the Opscode deploy resource, but rather than hooking up to a source code repository, it downloads complete build packages from a specific Amazon S3 bucket.
The cookbook itself doesn't do much, besides providing an "s3_deploy" resource that takes care of the above.
Requirements
Needs the "s3cmd" cookbook to work. Tested on Ubuntu 11.10 and 12.04, but it should work on any platform that supports symlinks.
Attributes
['deploy_s3']['bucket'] = The name of the bucket containing the releases
['deploy_s3']['deploy_root'] = The location where the app will be deployed on disk - defaults to "/home/web"
Usage
Best to explain by example:
Let's assume we have an application called "myapp", and we want to deploy the build "v1.2" on our server.
We set the "bucket" attribute to "app-releases", and leave "deploy_root" as the default.
First, we need to store the build in the "app-releases" S3 bucket. The build should be a single folder named after the release name ("v1.2" in our case), which is then compressed with Tar/Gz. So for our example, the package would be "v1.2.tar.gz" which contains the folder "v1.2".
This folder is then uploaded into S3, inside a folder named after the app: "myapp/v1.2.tar.gz"
Then we'd put the following in our recipe
deploy_s3 "myapp" do
build "v1.2"
bucket "mybucket"
action :create
end
and the resource will do the following:
- Create the folder "/home/web/myapp" if it's not already there
- Create the folder "/home/web/myapp/releases" if it's not already there
- Attempt to download the object "mybucket/myapp/v1.2.tar.gz" from the "app-releases" bucket, into "/home/web/myapp/releases"
- Unzip the package
- Symlink the package to "/home/web/latest"
Development
Please refer to the Readme here
License and Author
Author:: Adam Borocz (on GitHub)
Copyright:: 2013, HipSnip Ltd.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Dependent cookbooks
hipsnip-s3cmd >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
Collaborator Number Metric
1.5.0 passed this metric
Contributing File Metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.5.0 failed this metric
FC064: Ensure issues_url is set in metadata: deploy_s3/metadata.rb:1
FC065: Ensure source_url is set in metadata: deploy_s3/metadata.rb:1
FC066: Ensure chef_version is set in metadata: deploy_s3/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: deploy_s3/metadata.rb:1
FC069: Ensure standardized license defined in metadata: deploy_s3/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: deploy_s3/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: deploy_s3/providers/default.rb:99
FC104: Use the :run action in ruby_block instead of :create: deploy_s3/providers/default.rb:47
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.5.0 passed this metric
Testing File Metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.5.0 passed this metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
1.5.0 failed this metric
FC064: Ensure issues_url is set in metadata: deploy_s3/metadata.rb:1
FC065: Ensure source_url is set in metadata: deploy_s3/metadata.rb:1
FC066: Ensure chef_version is set in metadata: deploy_s3/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: deploy_s3/metadata.rb:1
FC069: Ensure standardized license defined in metadata: deploy_s3/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: deploy_s3/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: deploy_s3/providers/default.rb:99
FC104: Use the :run action in ruby_block instead of :create: deploy_s3/providers/default.rb:47
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
1.5.0 passed this metric
Testing File Metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.5.0 failed this metric
FC065: Ensure source_url is set in metadata: deploy_s3/metadata.rb:1
FC066: Ensure chef_version is set in metadata: deploy_s3/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: deploy_s3/metadata.rb:1
FC069: Ensure standardized license defined in metadata: deploy_s3/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: deploy_s3/metadata.rb:1
FC085: Resource using new_resource.updated_by_last_action to converge resource: deploy_s3/providers/default.rb:99
FC104: Use the :run action in ruby_block instead of :create: deploy_s3/providers/default.rb:47
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
1.5.0 passed this metric
Testing File Metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
1.5.0 failed this metric
1.5.0 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number