How Do You Install and Configure Chef Client on a Linux Server in AWS or Azure?

Updated 11/9/17

Problem scenario
In AWS or Azure you have Linux instances that you want to be configured to use a Chef Server.  How do you install Chef client and configure it to work with a Chef server?

Solution
These directions have been tested in Azure (with an Ubuntu 16.x server as either the Chef client node or the Chef server) and AWS (with a Red Hat Enterprise Linux 7.x server as the Chef client node or the Chef server).

What Are Some Common kubectl Commands?

Problem scenario
You want to know about some common kubectl commands. What should you do?

Solution
The below was taken from running “kubectl help”. Here are some kubectl commands:

Basic Commands (Beginner):
create Create a resource from a file or from stdin.
expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service
run Run a particular image on the cluster
set Set specific features on objects

Basic Commands (Intermediate):
explain Documentation of resources
get Display one or many resources
edit Edit a resource on the server
delete Delete resources by filenames, …

How Do You Change the Apache Web Server Default Directory for a Website’s Files?

Problem scenario
You updated the Directory section of apache2.conf. You changed the DocumentRoot stanza in apache2.conf too. But when you browse to the website, you are not getting to the files in the directory you changed it to. You are getting files from /var/www/html/. Apache has been installed on Debian Linux. What do you do?

Solution

  1. Find this file: 000-default.conf
  2. Back it up.

How Can Kubernetes Allow for Traffic to Non-Kubernetes Resources?

Problem scenario
You have a Kubernetes cluster, and you need some applications to access external websites. How do you do this?

Solution
Use an Ambassador. It is a sidecar that is designed to reach services (e.g., URLs or sockets) outside the Kubernetes cluster. If the external IP address changes, you just need to change it in the Ambassador containers. A convenient single-source of truth is maintainable.

How Do You Troubleshoot an Ansible Playbook Failing with “The filter … is invalid…AttributeError: Client Error object has no attribute message”?

Problem scenario
Your playbook fails with the following message: “The filter … is invalid…AttributeError: Client Error object has no attribute message”?

What should you do?

Solution
Remove the word “filter” and try your playbook again.

How Do You View the Images That Are Part of Your WordPress Website?

Problem scenario
You are using WordPress, and you want to view the images of your website. You forget where a specific picture/photo (e.g., a JPEG or PNG file is). What should you do?

Solution
1. Log into the WordPress dashboard.
2. Go to Media -Library
3. Find the drop down menu that says “All media items” and choose “Images”