Setup Chef Workstation on Microsoft Azure

If you do not know how Chef helps with DevOps, I recommend you to watch this conversion https://channel9.msdn.com/events/Seth-on-the-Road/That-Conference-2015/T009, between Matt Stratton, Senior Solutions Architect at Chef and Seth Juarez, Senior Technical Evangelist on the Channel 9 team.

There are lots of tutorials and learning guides available for Chef (https://learn.chef.io/). For all my learnings, I completely depend on virtual machines on cloud, unless there is a specific need or limitation to use an on-premise VM. So when I was going through the Chef tutorials, I had to accommodate some changes based on Azure environment. I am documenting my experiments with Chef on Azure in this series of blog posts.

Prerequisites

  • Microsoft Azure Subscription
  • Git Bash Shell

Create a Virtual Machine for Chef Workstation

Navigate to https://manage.windowsazure.com/ on browser

Click on the +NEW link at the bottom-left corner of the screen.

Click COMPUTE, then VIRTUAL
MACHINE, then FROM GALLERY

Click UBUNTU, then Ubuntu Server 14.04 LTS, then next arrow

Specify virtual machine configuration and click next. Note that I have used ‘mme-chef-ws’ as the name of virtual machine for Chef Workstation. This name will be used in later steps. Change it according to your environment. Also, for simplicity, I have chosen password option instead of SSH key for the VM.

Change virtual machine configuration if required. Add HTTP endpoint to the endpoints (we enable web server as part of chef learning later), and click next

Click OK

Wait for the created virtual machine to be in running state.

Install Chef Development Kit

The Chef Development Kit (ChefDK) brings the best-of-breed development tools built by the awesome Chef community. Actual download site is https://downloads.chef.io/chef-dk/. However, I have followed steps in another tutorial provided by Chef.

Open Git Bash on your computer and connect to the Chef workstation. Note down the DNS name of virtual machine from the virtual machine details (above picture). Connect to the virtual machine by running the command ‘ssh azureuser@vmname.cloudapp.net’

Run the command (curl -L http://www.getchef.com/chef/install.sh | sudo bash) to install chef client and tools on workstation.

Learn Chef Basics on Ubuntu

Now the workstation is ready for us to learn the basics of Chef. Now we can follow the tutorial provided on Chef learning site on this virtual machine.

Next Blog

Next, I will try out configuring Chef Server and node on Azure.

About Manesh

Manesh is a software consultant and solutions architect specializing in cloud, data, Linux and devops in the azure realm with key focus on hybrid workloads. He has been working on Azure technologies since its inception and has helped many enterprises to onboard and adapt to Azure cloud, build solutions for datacenter scale / high consumer applications and services. Currently, he is Microsoft certified for Developing Microsoft Azure Solutions (70-532), Implementing Microsoft Azure Infrastructure Solutions(70-533) and Architecting Microsoft Azure Solutions (70-534).

Posted on 2015/10/17, in DevOps, Microsoft Azure and tagged , , , , . Bookmark the permalink. 4 Comments.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

hyper-v.nu

My views on technology

yungchou

witnessing a clear cloudy day

Virtualization and some coffee

My views on technology

Thomas Maurer

Cloud and Virtualization

Cloud Administrator

Begin Your Journey to the Cloud with the Cloud Administrator

%d bloggers like this: