How to install Chef server on Ubuntu.
Opscode documentation is extremely confusing. The following simple instructions tell you how to install Chef server version 10.16.2 on Ubuntu-12.04.
Keep in mind that Opscode guys changed their versioning. Starting with version 0.10.12 they call it 10.12.0. So the newest version as it is right now is 10.16.2.
To install it become root:
sudo su -
and run the following:
apt-get install sudo wget lsb-release
echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list
mkdir -p /etc/apt/trusted.gpg.d
gpg --keyserver keys.gnupg.net --recv-keys 83EF826A
gpg --export packages@opscode.com | sudo tee
/etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null
apt-get update
apt-get install opscode-keyring
apt-get upgrade
apt-get install chef chef-server
Check the version:
chef-server -v
Chef Server (API) Version: 10.16.2
GIT repository
The next thing you probably need is GIT repo where you keep all the cookbooks, etc.git config --global user.name "Igor Grinkin" git config --global user.email igor@yourdomain.com git clone git://code.yourrepo.com/chef_server.git cd chef_server git pull origin master
Knife initial setup
Become a regular user and make /etc/chef/ file readable by that user.sysadmin@chef:~$ knife configure --initial
Overwrite /home/sysadmin/.chef/knife.rb? (Y/N) y
Please enter the chef server URL: [http://chef:4000] http://chef:4000
Please enter a clientname for the new client: [sysadmin]
Please enter the existing admin clientname: [chef-webui]
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem]
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem]
Please enter the path to a chef repository (or leave blank): ~/mt1_chef_server/
Creating initial API user...
Created client[sysadmin]
Configuration file written to /home/sysadmin/.chef/knife.rb
No comments:
Post a Comment