InstallingChefServer: Difference between revisions
Jump to navigation
Jump to search
(Initial write up) |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
Installation of Chef Server on CentOS6 with install target as /apps directory. | |||
=Configure Postfix= | =Configure Postfix= | ||
Add to /etc/postfix/main.cf: | Add to /etc/postfix/main.cf: | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
relayhost = mail.invadelabs.org | relayhost = mail.invadelabs.org | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Enable, start, test | Enable, start, test | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
sudo chkconfig postfix on | sudo chkconfig postfix on | ||
sudo service postfix start | sudo service postfix start | ||
Line 14: | Line 16: | ||
=Install Chef= | =Install Chef= | ||
Work around to install in another directory | Work around to install in another directory | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
sudo ln -s /apps/opt/opscode/ /opt/opscode | sudo ln -s /apps/opt/opscode/ /opt/opscode | ||
cd /apps | cd /apps | ||
Line 23: | Line 25: | ||
=Configure Chef Server= | =Configure Chef Server= | ||
Set configuration | Set configuration | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
[root@chef private]# cat /etc/opscode/chef-server.rb | [root@chef private]# cat /etc/opscode/chef-server.rb | ||
api_fqdn "chef.invadelabs.com" | api_fqdn "chef.invadelabs.com" | ||
Line 33: | Line 35: | ||
Reconfigure Chef Server with our keys | Reconfigure Chef Server with our keys | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
sudo chef-server-ctl reconfigure | sudo chef-server-ctl reconfigure | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=Configure First User= | =Configure First User= | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
chef-server-ctl user-create drewholt Drew Holt [email protected] 'myawesomepassword' --filename drewholt.pem | chef-server-ctl user-create drewholt Drew Holt [email protected] 'myawesomepassword' --filename drewholt.pem | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=Install Chef Manage= | =Install Chef Manage= | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
cd /apps | cd /apps | ||
wget https://packages.chef.io/stable/el/6/chef-manage-2.4.1-1.el6.x86_64.rpm | wget https://packages.chef.io/stable/el/6/chef-manage-2.4.1-1.el6.x86_64.rpm | ||
Line 52: | Line 54: | ||
=Install OpsCode Reporting= | =Install OpsCode Reporting= | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
cd /apps | cd /apps | ||
wget https://packages.chef.io/stable/el/6/opscode-reporting-1.6.0-1.el6.x86_64.rpm | wget https://packages.chef.io/stable/el/6/opscode-reporting-1.6.0-1.el6.x86_64.rpm | ||
Line 61: | Line 63: | ||
=Create First Chef org= | =Create First Chef org= | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
chef-server-ctl org-create short_name 'full_organization_name' --association_user user_name --filename ORGANIZATION-validator.pem | chef-server-ctl org-create short_name 'full_organization_name' --association_user user_name --filename ORGANIZATION-validator.pem | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 67: | Line 69: | ||
=Backup and Restore Chef Server= | =Backup and Restore Chef Server= | ||
Backup | Backup | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
sudo chef-server-ctl backup | sudo chef-server-ctl backup | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Restore | Restore | ||
<syntaxhighlight> | <syntaxhighlight lang=bash> | ||
sudo chef-server-ctl restore -c -d /apps/tmp chef-backup-2016-10-14-17-30-38.tgz | sudo chef-server-ctl restore -c -d /apps/tmp chef-backup-2016-10-14-17-30-38.tgz | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 23:06, 24 January 2018
Installation of Chef Server on CentOS6 with install target as /apps directory.
Configure Postfix
Add to /etc/postfix/main.cf:
relayhost = mail.invadelabs.org
Enable, start, test
sudo chkconfig postfix on
sudo service postfix start
echo "test message" | mailx -s test [email protected]
Install Chef
Work around to install in another directory
sudo ln -s /apps/opt/opscode/ /opt/opscode
cd /apps
wget https://packages.chef.io/stable/el/6/chef-server-core-12.8.0-1.el6.x86_64.rpm
sudo rpm -Uvh --prefix /apps chef-server-core-12.8.0-1.el6.x86_64.rpm
Configure Chef Server
Set configuration
[root@chef private]# cat /etc/opscode/chef-server.rb
api_fqdn "chef.invadelabs.com"
nginx['ssl_certificate'] = "/etc/pki/tls/private/chef.invadelabs.com.pem"
nginx['ssl_certificate_key'] = "/etc/pki/tls/private/chef.invadelabs.com.nopassphrase.key"
nginx['ssl_ciphers'] = "HIGH:MEDIUM:!LOW:!kEDH:!aNULL:!ADH:!eNULL:!EXP:!SSLv2:!SEED:!CAMELLIA:!PSK"
nginx['ssl_protocols'] = "TLSv1 TLSv1.1 TLSv1.2"
Reconfigure Chef Server with our keys
sudo chef-server-ctl reconfigure
Configure First User
chef-server-ctl user-create drewholt Drew Holt [email protected] 'myawesomepassword' --filename drewholt.pem
Install Chef Manage
cd /apps
wget https://packages.chef.io/stable/el/6/chef-manage-2.4.1-1.el6.x86_64.rpm
sudo rpm -Uvh --prefix /apps chef-manage-2.4.1-1.el6.x86_64.rpm
sudo chef-server-ctl reconfigure
sudo chef-manage-ctl reconfigure
Install OpsCode Reporting
cd /apps
wget https://packages.chef.io/stable/el/6/opscode-reporting-1.6.0-1.el6.x86_64.rpm
sudo rpm -Uvh --prefix /apps opscode-reporting-1.6.0-1.el6.x86_64.rpm
sudo ln -s /apps/opt/chef-manage /opt/chef-manage
sudo ln -s /apps/opt/opscode-reporting /opt/opscode-reporting
Create First Chef org
chef-server-ctl org-create short_name 'full_organization_name' --association_user user_name --filename ORGANIZATION-validator.pem
Backup and Restore Chef Server
Backup
sudo chef-server-ctl backup
Restore
sudo chef-server-ctl restore -c -d /apps/tmp chef-backup-2016-10-14-17-30-38.tgz