cookbook 'deploy_wrapper', '= 0.0.1'
deploy_wrapper (5) Versions 0.0.1 Follow7
Provides a definition that sets up an ssh key and ssh wrapper script for use with deploy or deploy_revision resources
cookbook 'deploy_wrapper', '= 0.0.1', :supermarket
knife supermarket install deploy_wrapper
knife supermarket download deploy_wrapper
Description
The deploy_wrapper
cookbook provides a definition that sets up an ssh key and ssh wrapper script for use with deploy
or deploy_revision
resources.
Parameters
-
ssh_wrapper_dir
- the ssh wrapper script will be written to this directory, required. -
ssh_key_dir
- the ssh key file will be written to this directory, required. -
ssh_key_data
- the private key data to write into the ssh key file, required. -
owner
- the owner for ssh wrapper and key files, defaults to 'root' -
group
- the group ownership for ssh wrapper and key files, defaults to 'root' -
sloppy
- a boolean which toggles whether or not the ssh wrapper script will attempt to validate the repo's ssh key. This parameter defaults tofalse
, but the default setting will probably cause problems when executing deploy resources if~/.ssh/known_hosts
has not been pre-populated manually or via another cookbook.
Platform
Should work on any platform where Chef runs. Tested on Ubuntu.
Requirements
N/A
Usage example
include_recipe 'deploy_wrapper'
deploy_wrapper 'myapp' do
owner 'root'
group 'root'
ssh_wrapper_dir '/opt/example/shared'
ssh_key_dir '/root/.ssh'
ssh_key_data secrets['deploy_keys']['myapp']
sloppy true
end
deploy_revision '/opt/example/myapp' do
revision 'master'
repo 'https://github.com/example/myapp'
ssh_wrapper '/opt/example/shared/myapp_deploy_wrapper.sh'
end
License and Author
Author:: Cameron Johnston cameron@rootdown.net
Copyright:: 2012, Cameron Johnston
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
This cookbook has no specified dependencies.
Contingent cookbooks
There are no cookbooks that are contingent upon this one.