Skip to content

Commit

Permalink
add roles
Browse files Browse the repository at this point in the history
  • Loading branch information
workstation-1 committed Apr 13, 2017
1 parent 4d21b76 commit daaf6bc
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
12 changes: 12 additions & 0 deletions roles/chef-client.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "chef-client",
"default_attributes": {
"chef_client": {
"interval": "180",
"splay": "30"
}
},
"run_list": [
"recipe[chef-client]"
]
}
16 changes: 16 additions & 0 deletions roles/lb.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "lb",
"description": "Sets up HAProxy to balance between servers",
"default_attributes": {
"fwrules": {
"22002": true
},
"lb": {
"app_server_role": "webserver-win"
}
},
"run_list": [
"role[chef-client]",
"recipe[lb]"
]
}
14 changes: 14 additions & 0 deletions roles/webserver-win.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "webserver-win",
"description": "Sets up IIS on Windows based servers",
"default_attributes": {
"fourthcoffee": {
"install_path": "C:\\inetpub\\FourthCoffee",
"install_method": "_dsc"
}
},
"run_list": [
"role[chef-client]",
"recipe[fourthcoffee]"
]
}
4 changes: 4 additions & 0 deletions windows.sh
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
knife ec2 server create --fqdn WinDyn1 -g sg-03865f78 --subnet subnet-cef71695 -f m3.large -S nweddle_sa --image ami-94e26af4 --associate-public-ip --user-data win_user_data -N WinDyn1 -r 'role[webserver-win]' -i ~/.ssh/nweddle_sa.pem --winrm-user Administrator --winrm-password Ch4ng3m3 --winrm-transport plaintext

knife ec2 server create --fqdn WinDyn2 -g sg-03865f78 --subnet subnet-cef71695 -f m3.large -S nweddle_sa --image ami-94e26af4 --associate-public-ip --user-data win_user_data -N WinDyn2 -r 'role[webserver-win]' -i ~/.ssh/nweddle_sa.pem --winrm-user Administrator --winrm-password Ch4ng3m3 --winrm-transport plaintext

knife ec2 server create --fqdn WinDyn3 -g sg-03865f78 --subnet subnet-cef71695 -f m3.large -S nweddle_sa --image ami-94e26af4 --associate-public-ip --user-data win_user_data -N WinDyn3 -r 'role[webserver-win]' -i ~/.ssh/nweddle_sa.pem --winrm-user Administrator --winrm-password Ch4ng3m3 --winrm-transport plaintext

0 comments on commit daaf6bc

Please sign in to comment.