Created
August 26, 2014 07:50
-
-
Save yaodong/206366885c31ee5fc827 to your computer and use it in GitHub Desktop.
chef cookbooks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://api.berkshelf.com" | |
cookbook 'build-essential', '~> 2.0.6' | |
cookbook 'sudo', '~> 2.7.0' | |
cookbook 'users', '~> 1.7.0' | |
cookbook 'chef-solo-search', '~> 0.5.1' | |
cookbook 'sshd', '~> 1.1.0' | |
cookbook 'fail2ban', '~> 2.2.0' | |
cookbook 'ufw', '~> 0.7.4' | |
cookbook 'apt-periodic', '~> 0.2.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"id": "deploy", | |
"password": "$1$IYaI2C7l$S37uGtAoFNgfVYYXzNkfV0", | |
"ssh_keys": [ | |
"ssh-rsa AAA..........ACH test@local" | |
], | |
"groups": [ "sysadmin"], | |
"shell": "\/bin\/bash" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://ruby.taobao.org" | |
gem "knife-solo" | |
gem "chef" | |
gem "berkshelf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"run_list": [ | |
"role[server]" | |
], | |
"automatic": { | |
"ipaddress": "117.121.26.11" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "server", | |
"description": "", | |
"json_class": "Chef::Role", | |
"default_attributes": { | |
"authorization": { | |
"sudo": { | |
"groups": ["sysadmin"], | |
"users": ["deploy"], | |
"passwordless": false | |
} | |
}, | |
"sshd": { | |
"sshd_config": { | |
"PasswordAuthentication": "no", | |
"X11Forwarding": "no", | |
"UsePAM": "no", | |
"PermitRootLogin": "no" | |
} | |
} | |
}, | |
"override_attributes": { | |
"firewall": { | |
"rules": [ | |
{ | |
"http": { "port": 80 }, | |
"https": { "port": 443 } | |
} | |
] | |
} | |
}, | |
"chef_type": "role", | |
"run_list": [ | |
"build-essential", | |
"chef-solo-search", | |
"users::sysadmins", | |
"sudo", | |
"sshd", | |
"fail2ban", | |
"ufw", | |
"apt-periodic" | |
], | |
"env_run_lists": { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment