-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
40 lines (28 loc) · 1.25 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Sod bootstraps a debian machine from a git repo of a project that uses chef bundler.
You need one cookbook, with two recipes: a bootstrap.rb and a default.rb
Your bootstrap.rb should contain only what needs to happen before bundle install.
Sod will bundle install, then run your default recipe. This one should set up everything else.
You configure all this with a Sodfile that looks like this:
production:
key_location: chef/id_rsa
ssh_config_location: chef/config
user: root
repo: [email protected]:mikesofaer/sod.git
app_dir: /usr/local/app
cookbook: sod
test_suite_recipe: test_suite
ruby_version: ruby-1.8.7-p330
The key_location is a relative path in your repo to a key that can check out that repo. It will go into /etc/sod
The ssh_config_location is a relative path in your repo to a .ssh/config file that handles the connection to your git server.
So if key_location and ssh_config_location are as above, chef/config should look like this:
Host github.com
Hostname github.com
User git
Port 22
IdentityFile /etc/sod/id_rsa
StrictHostKeyChecking no
*USAGE*
Set up your local ssh/config so you can ssh to the host with no prompt, then
bundle exec sod host
#Thanks
Thanks to Affine Systems for sponsoring some of the development of this tool.