Set up a basic git repository container to be accesed via ssh.
- Amazon
- Arch
- CentOS
- Debian
- Fedora
- Redhat
- Scientific
- Ubuntu
- git
Attribute | Description | Default |
---|---|---|
node['git-ssh-server']['base_path'] |
Git repository base path | calculated |
node['git-ssh-server']['user'] |
System user used to manage the repositories | "git" |
node['git-ssh-server']['group'] |
System group used to manage the repositories | "git" |
node['git-ssh-server']['shell'] |
Git user shell | "/usr/bin/git-shell" |
node['git-ssh-server']['hostname'] |
Machine hostname, used only in the README template | calculated |
Configures a git repository container
Creates a new bare repostiory.
create
: Creates a bare respository (default).
Attribute | Description | Default |
---|---|---|
name | Repository name | resource name |
base_path | Git repository base path | node['git-ssh-server']['base_path'] |
add_update_server_hook | Create the post-update-hook with exec git update-server-info [true/false] |
false |
git_ssh_server_bare 'library1'
git_ssh_server_bare 'webapp1' do
add_update_server_hook true
end
Grant access to an SSH key to all the repositories.
add
: adds an SSH key (default).
Attribute | Description | Default |
---|---|---|
keyname | SSH key name | resource name |
key | SSH RSA public key value | required |
keytype | SSH RSA key type | "ssh-rsa" |
base_path | Git repository base path | node['git-ssh-server']['base_path'] |
# the SSH public key from your ~/.ssh/*.pub file
git_ssh_server_ssh_key 'battle-laptop' do
key 'AAAAB3NzaC1yc2EAAAABIwAAAQEA[...]'
end
include_recipe 'git-ssh-server::default' # or put it in your run_list
git_ssh_server_bare 'my-library-one'
git_ssh_server_bare 'my-library-two'
git_ssh_server_bare 'my-webapp'
git_ssh_server_ssh_key 'my-laptop-key' do
key 'AAAAB3NzaC1yc2EAAAABIwAAAQEAv8lgaVb1BtGTLZG2cwc8WQF/X2Mxcuu/UPxN3yT6VQuFa6zl/LbSMND9OADS6ULw6p0hnWPnRDA8rSJvdcYO7pTSJOclScEuIMm4Nx8c3uhfePF/o39QPhH3WAyee/SFDay430Y11W5ZuOXuZ7Wb2PQEPUaQxs9k/MUHjIIcNLS7qG/FP5IGAb0df9KkAnSGXTgZ/Z9Xh+4mAkoBkXIr99oZsphF/PcxcVQfq4V6dTg81LUPLfaSj6U8gXmjRpRYNgk5uEdci7loKDmv1EPKhzwsJIEp9wxpAJqel5sezHaYN5w3zplbr7UY1+YuEBn2jnYhzbdBZcVDmL1D5F/G+Q=='
end
git_ssh_server_ssh_key 'another-developer' do
key 'AAAAB3NzaC1yc2EAAAABIwAAAQEAqFEaEEv9Fx+6Qv8LPoY+e9rsvaARGJJbvc7y2Tl73zoA6rB7VTxqoyV6mhG+ozRiB4i5g5andBCSDjDXPS0ycUQmiR2OrLZDUpf3uUhaeOO1SFjIbUyFdqy1MBkcmkDzBtXJ/qgn/ydUX59lT00AoPY4URVMt13uaI6GCWrsxRFX+Hxk5prVjoUqJQ7iSidXJ9CHksKTamgn3Ywc9w1MMYcegB+NVg0GsHDZMyq1PxFKGtqNS2PriQfoUrva76rolTej2rbnyH9drZZNi8lsxZ/Xi8ObjT68gc3OfswA64DRhQuN+aQT4bBK1xU+2AE88P9L2LSEYkekTzt7CElqrw=='
end
Don't forget to include the git-ssh-server
cookbook as a dependency in the metadata.
# metadata.rb
[...]
depends 'git-ssh-server'
Another alternative is to include the default recipe in your Run List.
{
"name": "git.onddo.com",
[...]
"run_list": [
[...]
"recipe[git-ssh-server]"
]
}
vagrant
berkshelf
>=1.4.0
test-kitchen
>=1.0.0.alpha
kitchen-vagrant
>=0.10.0
$ kitchen test
$ kitchen verify
[...]
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write you change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Author: | Raúl Rodríguez ([email protected]) |
Author: | Xabier de Zuazo ([email protected]) |
Copyright: | Copyright (c) 2013 Onddo Labs, SL. (www.onddo.com) |
License: | Apache License, Version 2.0 |
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.