How to Install Chef Server Workstation on ECS


  • You must have Alibaba Cloud Elastic Compute Service (ECS) activated and verified your valid payment method. If you are a new user, you can get $300 — $1200 worth in Alibaba Cloud credits for your new account. If you don’t k about how to setup your ECS instance, you can refer to this tutorial or quick-start guide. Your ECS instance must have at least 8GB RAM and 4 Core processor.
  • A domain name registered from Alibaba Cloud. If you have already registered a domain from Alibaba Cloud or any other host, you can update its domain nameserver records.
  • Domain name must be pointed to your Alibaba Cloud ECS’s IP address
  • Access to VNC console in your Alibaba Cloud or SSH client installed in your PC
  • Set up your server’s hostname and create user with root privileges.

Setting Up Your Server

# sudo apt update && sudo apt upgrade

Install Chef Server:

# wget
# sudo dpkg -i chef-server-core_12.17.33-1_amd64.deb
# sudo rm chef-server-core_12.17.33-1_amd64.deb
# sudo chef-server-ctl reconfigure

Create a Chef User and Organization:

# mkdir .chef
# sudo chef-server-ctl user-create aareez Arslan Shafiq '654321Ab' --filename ~/.chef/aareez.pem
# sudo chef-server-ctl org-create org_name "org_full_name" --association_user aareez --filename ~/.chef/org_name.pem

Install Git:

# sudo apt update && sudo apt upgrade
# sudo apt-get install git
# git config --global "Aareez"
# git config --global ""

Set Up Chef Workstations:

# wget
# sudo dpkg -i chefdk_3.3.23-1_amd64.deb
# sudo rm chefdk_3.3.23-1_amd64.deb
# chef generate app chef-repo
# cd chef-repo
# mkdir .chef

Add RSA Private Keys

# scp*.pem ~/chef-repo/.chef/
# ls ~/chef-repo/.chef

Set Up Version Control:

# echo ".chef" > .gitignore
# git status

Generate knife.rb:

# cd ~/chef-repo/.chef
# sudo nano knife.rb
current_dir = File.dirname(__FILE__)
log_level :info
log_location STDOUT
node_name 'aareez'
client_key "aareez.pem"
validation_client_name 'org_name-validator'
validation_key "org_name-validator.pem"
chef_server_url ''
cache_type 'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path ["#{current_dir}/../cookbooks"]
# cd ..
# knife ssl fetch
# knife client list

Bootstrap a Node:

# cd ~/chef-repo/.chef
# knife bootstrap -x aareez -P 654321Ab --sudo --node-name imaareez
# knife client list

Set Up Firewalls and Ports

Original Source




Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Getting Hands-on with WinAppDriver Test Automation Framework

Encapsulation in Python

CS373 Spring 2020: Final Entry

Rabbit Vs Kafka

THM Windows Fundamentals Part 2

Strange Loop 2017 Conference Notes

Top Benefits (And Downsides) of Self-Hosted BI Software for Embedded Analytics

Yurbi - Self Hosted Embedded Analytics

What is the difference between Hard links and Symbolic links — Linux

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:

More from Medium

Reduce the size of your Docker images with docker-slim

Deploying private repository

Migrating a Dockerized GitLab Chat bot to ARM Graviton2 in an afternoon

Version Control with Git