forked from vinyar/tokyo_chef_provisioning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes.txt
33 lines (22 loc) · 794 Bytes
/
notes.txt
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
notes:
step 0 - install ChefDK
step 1 - setup AWS
generate keypair
populate ~/.aws/config
place aws key .pem file under .chef/keys in your chef repo
step 2 - test aws connectivity
easiest way is with knife ec2 plugin
chef gem install knife-ec2
modify .chef/knife.rb with same keypair as in ~/.aws/config
example:
knife[:aws_access_key_id] = 'xxxxxxxxxx'
knife[:aws_secret_access_key] = 'yyyyyyy'
knife[:region] = 'us-west-2'
execute successfully:
knife ec2 server list
step 3 - use the repo to play with chef-provisioning.
create infrastructure:
chef-client -r 'recipe[webserver::provision]' -z
remove infrastructure:
chef-client -r 'recipe[webserver::deprovision]' -z
step 4 - uncomment various portions of the code and see what it does.