Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohanpedala/ae82c4376d3329a6e5de94f3ca535fa5 to your computer and use it in GitHub Desktop.
Save mohanpedala/ae82c4376d3329a6e5de94f3ca535fa5 to your computer and use it in GitHub Desktop.
Userdata for Installation chef-server on rhel 7

Userdata for Installation chef-server on rhel 7

Instructions to install chef-server 12.15.7-1 on RHEL 7.3. The official documentation for installation can be found here

Chef Server Installation

Optional packages installed

--> chef-manage

--> chef-push-jobs

--> chef-opscode-reporting

#!/bin/bash
echo BEGIN
sudo yum update -y
sudo yum install -y wget
wget https://packages.chef.io/files/stable/chef-server/12.15.7/el/7/chef-server-core-12.15.7-1.el7.x86_64.rpm
sudo rpm -Uvh chef-server-core-12.15.7-1.el7.x86_64.rpm
sudo chef-server-ctl reconfigure
sudo chef-server-ctl user-create binarybutter binary buter binarybutter@gmail.com 'Welcome1' --filename binarychef.pem
sudo chef-server-ctl org-create bb 'binary-butter' --association_user binarybutter --filename bb-validator.pem
echo "export PS1='chef-server $'" >> /home/ec2-user/.bashrc

sudo chef-server-ctl install chef-manage
sudo chef-server-ctl reconfigure
sudo chef-manage-ctl reconfigure --accept-license

sudo chef-server-ctl install opscode-push-jobs-server
sudo chef-server-ctl reconfigure
sudo opscode-push-jobs-server-ctl reconfigure

sudo chef-server-ctl install opscode-reporting
sudo chef-server-ctl-reconfigure
sudo opscode-reporting-ctl reconfigure --accept-license
echo END

You can download additional packages from here

This job takes 15min to execute based on the instance you have selected. Please click here for the procedure to monitor logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment