Skip to content

Instantly share code, notes, and snippets.

@rtacconi
Last active October 29, 2020 13:58
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save rtacconi/6b3c566a7467b3d8830a391942964d40 to your computer and use it in GitHub Desktop.
Save rtacconi/6b3c566a7467b3d8830a391942964d40 to your computer and use it in GitHub Desktop.
Install chef server 12.6.0 on Amazon Linux
echo "127.0.0.1 AWSVC009 AWSVC009" >> /etc/hosts
yum update -y
wget https://packages.chef.io/stable/el/5/chef-server-core-12.6.0-1.el5.x86_64.rpm
rpm -Uvh chef-server-core-12.6.0-1.el5.x86_64.rpm
chef-server-ctl reconfigure
mkdir /home/ec2-user/cookbooks
chown ec2-user /home/ec2-user/cookbooks
mkdir /home/ec2-user/.chef
chown ec2-user /home/ec2-user/.chef
chef-server-ctl user-create ec2-user COMAPNY EC2 aws@example.com 'abc123' --filename /home/ec2-user/.chef/chef.pem
chmod 400 /home/ec2-user/.chef/chef.pem
chown ec2-user /home/ec2-user/.chef/chef.pem
chef-server-ctl org-create centerparcs 'COMPANY LTD' --association_user user_name --filename /home/ec2-user/.chef/company-validator.pem
chmod 400 /home/ec2-user/.chef/company-validator.pem
chown ec2-user /home/ec2-user/.chef/companypem
wget https://packages.chef.io/stable/el/6/chefdk-0.14.25-1.el6.x86_64.rpm
rpm -Uvh chefdk-0.14.25-1.el6.x86_64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment