What Is a docker-compose.yml File?

Question
What is a docker-compose.yml file?

Answer
It is a file used by the docker-compose utility which orchestrates the creation of multiple containers. For microservices, SOA and various stacks of applications (e.g., the LAMP stack), container orchestration is useful. Here are some quotes which help elucidate what docker-compose does:

“Compose is a tool for defining and running multi-container Docker applications.” (Taken from Docker’s website.)

“In order to do something useful with containers,

How Do You Troubleshoot Jenkins Pipelines Not Running when You Try to Execute Them?

Problem scenario
Your Jenkins pipeline jobs will not run. You see “Build Scheduled” when you click on the “Build now” link. But nothing happens. You see an error that your /var/lib/jenkins/ is running low on disk space. You have no access to the back-end of the server that runs Jenkins. What should you do?

Solution
Look at the dashboard view. Next to the date and time of the most recent success of the job (build,

How Do You Use a PowerShell Command to Stop an Azure VM?

Problem scenario
You have a server in Azure you want to turn off. What should you do to stop it?

Solution
Prerequisite
You need to know the server’s name and resource group. You can do this by finding the server in the Azure Portal.

Procedures
Run this command:

Stop-AzureRmVM -ResourceGroupName $nameOfResourceGroup -Name $nameOfVM

# Replace $nameOfResourceGroup with the name of the Resource Group. …

Using Python How Do You Write a Palindrome Tester with Special Requirements?

Problem scenario
You want to write a Python that will test if a string is a palindrome with two other requirements. One requirement is to not use a “::” (a colon pair) in the code. The second requirement is to search for a substring that is a palindrome if the full string is not a palindrome. This substring is not any substring however: it must include the leftmost character. For this requirement we will consider a one-character string to be a palindrome.

How Do You Use a PowerShell Command to Destroy an Azure VM?

Problem scenario
You have a server in Azure you no longer need. You want to save money by deleting it. What should you do to eliminate it?

Solution
Prerequisite
You need to know the server’s name and resource group. You can do this by finding the server in the Azure Portal.

Procedures
Run this command:

Remove-AzureRmVM -ResourceGroupName $nameOfResourceGroup -Name $nameOfVM

# Replace $nameOfResourceGroup with the name of the Resource Group. …

A List of Books on Site Reliability Engineering

Here is a list of SRE books:

How Do You Troubleshoot the Ansible Message “Syntax Error while loading YAML. expected , but found ””?

Problem scenario
You run an Ansible playbook with a variable. But you get this message: “ERROR! Syntax Error while loading YAML. expected , but found ”” (Ansible found blank single quotes or a double quote mark.)

How do you get the playbook to run?

Solution
Notice the “offending line” in the message. Remove the braces and possibly the quotes around the braces.

How Do You Troubleshoot the Message “Error: Config file not found: /usr/lib/jvm/java-9-openjdk-amd64/conf/management/management.properties”?

Problem scenario
You are trying to run Apache Zookeeper or some other application. You enounter the problem Error: Config file not found: /usr/lib/jvm/java-9-openjdk-amd64/conf/management/management.properties. What should you do?

Possible solution
This is a workaround. Run these commands:
sudo mkdir -p /usr/lib/jvm/java-9-openjdk-amd64/conf/management/
sudo touch /usr/lib/jvm/java-9-openjdk-amd64/conf/management/management.properties

Why Does Your Python Function Return None?

Problem scenario
Your Python function prints out the value of the variable immediately before it returns the variable.  When it is assigned via the “return” statement, the value is “None”.  You were expecting an integer or some other value.  What is wrong?

Solution
Does your function use recursion?  If it is using recursion rather than merely calling the function and it returns “None”,