Showing posts with label Chef. Show all posts
Showing posts with label Chef. Show all posts

June 13, 2018

Basic Chef + Test Kitchen: Setting up Ubuntu with Vagrant + Virtual Box + the Test-Kitchen Ruby Gem on a MacBook

Let's say we wanted to test something out on Ubuntu, a popular Linux distribution, on a MacBook: How would we be able to set it up locally, configuring the workstation? We set it up in Docker before. What other ways are there?

One way to do it is with a Chef.io tool to spin up a test environment, Test-Kitchen, and its Ruby gem. And, yes, this cooking metaphor is extended all throughout the Chef toolset with its cookbooks and recipes for environment configurations.

Adventures in Automation started looking at The Ruby Behind Chef, the History Behind Test Kitchen, and exploring the free tutorials that Chef provides, the extensive Learn Chef Rally.

For this article we will be using:
  • Test-Kitchen on GitHub as a primary source: builds a Vagrantfile, allowing you to create or destroy the instances of your virtual machines
  • Vagrant: "a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the "works on my machine" excuse a relic of the past".
  • Oracle's VirtualBox: "VirtualBox is a cross-platform virtualization application. What does that mean? For one thing, it installs on your existing Intel or AMD-based computers, whether they are running Windows, Mac, Linux or Solaris operating systems. Secondly, it extends the capabilities of your existing computer so that it can run multiple operating systems (inside multiple virtual machines) at the same time."

January 31, 2018

Introduction to the Learn Chef Rally!

Need to automate configurations for Amazon Web Services? One way to do it is with Chef.io.

Chef does the "cooking" metaphor to the hilt! Configurations are "recipes", written in the Ruby programming language, which are stored in a "cookbook". We covered this in early January with The Ruby Behind Chef.

This metaphor continues: To automate all of this, you use the product "Test Kitchen".

Seems complicated? To help you out, Chef create the most amazing set of documentation I have ever seen: The Learn Chef Rally.

From Getting Started With Chef in Learn.Chef.io:

"If you're new to Chef, just know that Chef lets you automate all the things—infrastructure, applications, compliance and more. Learn Chef Rally will teach you how. It's the hub for Chef and DevOps related resources that will build your skills.

"The Learn Chef Rally curriculum is organized by tracks. A track groups related learning activities.

"We call each learning activity a module. Modules include a mix of hands-on labs, articles, and videos. Our hands-on labs help you get started quickly on the platform that you care about most.

"When you finish a module, you'll see a few quiz questions at the end. Answering these questions correctly gives you credit for having completed the module. You can track your progress on the home page".

Since my job will be automating Amazon Web Service tests, spinning up and tearing down environments, I'm starting the module on Test Kitchen: "Infrastructure Code Deserves Tests Too".

January 29, 2018

What Is the DevOps toolset "Test Kitchen" and Where Did It Come Come from? Fletcher Nicol at ChefConf 2014

When learning and investigating a new open-source tool or technology, I find YouTube to be an amazing resource!

Beyond the many tutorials, presentations, and instructional videos, I try to see how the creators of the tool introduces and talks about it to the open-source community. What was the creator trying to achieve? What problem was to be solved? And, most importantly, how can I take the creator's message and transfer it to the work that I am doing?

Right now, I'm trying to get up to speed on Test Kitchenkitchen.ci@kitchenci >, the product we use at work, combined with Chef.io, to automate spinning up and tearing down different Amazon Web Services environments.

With the "Learning Chef Rally", it is going to take me a few weeks to finally get to the part I need, learning exactly how the DevOps tool spins up environments, so I was also seeking alternate sources to tide me over.

Luckily, I found this, introduced at ChefConf 2104, a conference about Chef...

#ChefConf 2014: Fletcher Nichol, "Test Kitchen: One Year Later and the Future
Fletcher Nicol, 2014

https://youtu.be/YzlCHAbJ7KM

January 4, 2018

Notes on Franklin Webber's webinar, The Ruby Behind Chef

For the past week, I've been trying to do a cram session on Ruby, one of the many programming languages I will be using in my next job as a Software Developer in Test.

Why Ruby? Chef, A DevOps tool, is written in Ruby... a language I don't even know.

The quickest way to learn how to swim? Row your boat into the deepest part of the lake and jump right in. Try not to drown too much.

Likewise, the quickest way I have found for me to learn? Dive right in. See how how long I can tread water before choking, sputtering, and coming up for air.

Care to go on a dive with me?


The Ruby Behind Chef (September 2016)
Franklin Webber, Training Lead at Chef
https://youtu.be/CnBP2uv3Yog