Skip to content

Instantly share code, notes, and snippets.

@yaxhpal
Last active January 21, 2018 21:03
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 yaxhpal/d3ade562f58baa2383360d852348aabe to your computer and use it in GitHub Desktop.
Save yaxhpal/d3ade562f58baa2383360d852348aabe to your computer and use it in GitHub Desktop.
Install Chef Server 12 on AWS EC2 (Redhat Enterprise Linux)
#!/bin/bash
cd /tmp
# Download the Chef server Lastest RPM
sudo wget https://packages.chef.io/files/stable/chef-server/12.17.15/el/7/chef-server-core-12.17.15-1.el7.x86_64.rpm
# Install the chef server
sudo rpm -Uvh tmp/chef-server-core-12.17.15-1.el7.x86_64.rpm
# Configure - Run setup
sudo chef-server-ctl reconfigure
# Create admin user to manage Chef server
sudo chef-server-ctl user-create USERNAME FIRST_NAME LAST_NAME EMAIL 'PASSWORD' --filename /etc/chef/USERNAME.pem
# Create user organization
sudo chef-server-ctl org-create ORGANIZATION_NICK_NAME 'ORGANIZATION_FULL_NAME' --association_user USERNAME --filename /etc/chef/ORGANIZATION_NICK_NAME-validator.pem
# Install Web UI
sudo chef-server-ctl install chef-manage
# Integrate WebUI with Chef Server
sudo chef-server-ctl reconfigure
# Finally initialize it.
sudo chef-manage-ctl reconfigure --accept-license
# You are done! - access chef server @ https://x.x.x.x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment