How Do You Find Your Email Distribution List in WordPress?

Problem scenario
You know you have subscribers to your blog or email newsletter via your website. Your website is powered by WordPress. How do you browse to the email addresses that signed up through your website?

Solution
Log into the WordPress dashboard. Go to "Email Subscribers" and click on "Audience."

How Do You Securely Connect an EC-2 Instance in a VPC to an S3 Bucket?

Problem scenario
You have a server in AWS that is in a VPC. You want it to access an S3 bucket. How do you do this?

Solution
Use a VPC endpoint, specifically, use a Gateway Endpoint.

Source: https://docs.aws.amazon.com/vpc/latest/userguide/vpc-endpoints.html

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"

What is a Service Mesh?

Question
What is a service mesh?

Answer
In the context of Kubernetes, it is something that "provides infrastructure services for traffic management, observability, and security" for container connectivity (as explained on page 230 of Kubernetes Patterns by Bilgin Ibryam and Roland Huß (O'Reilly). Copyright 2019 Bilgin Ibryam and Roland Huß, 978-1-492-05028-5). A service mesh will often use a sidecar. "…most meshes use the sidecar model…" taken from Platform9.com.

"A service mesh refers to the way that software code from cloud hosted applications is woven together at different levels of the webserver in integrated layers." (This quote was taken from VMware.com.)

"The mesh provides critical capabilities including service discovery, load balancing, encryption, observability, traceability, authentication and authorization, and support for the circuit breaker pattern." taken from https://www.nginx.com/blog/what-is-a-service-mesh/

Service meshes have applicability outside the realm of microservices (according to page 1 of Service Mesh for Dummies).

"In short, service mesh tools like Istio can reduce the operational burden of managing microservices-based applications, and in particular traffic between services, which could otherwise involve significant and often unsustainable manual work." taken from https://enterprisersproject.com/article/2019/6/service-mesh-plain-english

Spoiler alert: See #58 in this link to Answers to Kubernetes Quiz for examples.

How Do You Install Erlang on a Linux SUSE Server?

Problem scenario
You want to install Erlang on a Linux SUSE machine. What should you do?

Solution
Run this script with sudo (e.g., sudo bash /tmp/erlang.sh):

# Written by www.continualintegration.com
#/bin/bash

widgetversion=3.0.4

echo "This script can take 20 minutes to complete"

zypper -n install ncurses gcc-c++ autoconf make git python3 bzip2 gtk2 gtk3 gtk2-devel ncurses-utils ncurses-devel
cd /tmp/
curl -Ls https://github.com/wxWidgets/wxWidgets/releases/download/v$widgetversion/wxWidgets-$widgetversion.tar.bz2 > /tmp/wxWidgets-$widgetversion.tar.bz2
cp /tmp/wxWidgets-$widgetversion.tar.bz2 /bin/
cd /bin/
bzip2 -d wxWidgets-$widgetversion.tar.bz2
tar -xf wxWidgets-$widgetversion.tar
#cd wxWidgets-$widgetversion

cd /bin/
git clone https://github.com/erlang/otp.git
cd otp
./otp_build autoconf
./configure
echo "This next portion may take 15 minutes"
date > /tmp/datetime.txt
make
make install
ln -s /usr/local/lib/erlang/bin/erl /usr/bin/erl
ln -s /usr/local/bin/erlc /usr/bin/erlc
ln -s /etc/alternatives/python3 /usr/bin/python
echo "Script run completed."
echo " "
echo "Many errors above (if there are any) may be ignorable"
echo "try the 'erl' command with no quotes to see if Erlang was installed"
echo 'If you get to a carrot prompt, use Ctrl-c, then type the "a" key and then press Enter.'

How Do You Troubleshoot the Terraform Error “Unable to evaluate directory symlink: lstat”?

Updated on 6/4/22 to include possible solutions 2 through 4.

Problem scenario
You are running a terraform command, but you receive this error:

Initializing modules…
- website_contint_bucket in
Error: Unreadable module directory
Unable to evaluate directory symlink: lstat foobar: no such file or directory
Error: Failed to read module directory
Module directory does not exist or cannot be read.
Error: Unreadable module directory
Unable to evaluate directory symlink: lstat foobar: no such file or directory
Error: Failed to read module directory
Module directory does not exist or cannot be read.

What should you do?

Possible Solution #1
1. Run this Linux command from the directory you ran the terraform command: grep -iR source *

2. Look at the source value in the file that you find. There should be a stanza like the one below.

source = "./foobar/submod"

Is the source a valid path relative to where the file is that has this stanza?

3. Verify that above path exists by running ls -lh ./foobar/submod

(Substitute "./foobar/submod" with the value you found.) In a .tf or .tf.json file your source path is probably wrong if you are getting the error above.

Possible Solution #2
Are you using variables files? You may need to check those. Are you using different environments (such as Dev, QA, production)? Perhaps your .tf files are configured properly for one environment but not another.

Possible Solution #3
The "terraform apply" command will update a tfstate file (terraform.tfstate). You may need to check those. Are you using terraform remote state? You may need to verify the remote state is accessible.

Possible Solution #4
Are you using different projects (directories where you run the "init" command)? You may need to check your configuration or verify the directory that you are in when you ran the offending command.


Special thanks to Don Gillies for bringing up improvements for this article.