What Do You Do If SonarQube Has No Logs and the Service Will Not Start?

Problem scenario
You try to start the SonarQube service.  It does not turn on or stay on.  You go to the logs directory in the “sonar” subdirectory on the Linux server.  Every time you run “sudo systemctl start sonar”, there are no corresponding log entries.  You may find no logs at all.  What should you do to troubleshoot SonarQube to start when the logs are not helping you?

Solution
1. 

How Do You Troubleshoot the Ansible Problem “IOError: [Errno 13] Permission denied…”?

Problem scenario
You are running an Ansible playbook, but you get an error like this:  “IOError: [Errno 13] Permission denied…”

How do you get the playbook to work?

Solution
If the playbook has a destination for a file and that file is already there on the managed node, this error may occur. 

1.  Go to the managed node. 
2. 

How Do You Write a Hello World Program in Lua?

Problem scenario
You want to run a basic Lua program as a test.  What do you do?

Solution
Prerequisite

You must have installed the Lua compiler.  If you are using a CentOS/RHEL/Fedora server, try this link.

Procedures
1.  Create a file called contint.lua with the following line:
print(“This is a Hello World program”)

2.  Run it with this command: 

How Do You Write a Hello World Program in Golang?

Problem scenario
You want to test out the Golang compiler.  You want to know how to write a basic Go program and run it.  What do you do?

Solution
Prerequisites

You must have the Golang compiler installed.  If you need help, see this posting.

Procedures
1.  Create a file called hw.go with the following five lines:

package main
import “fmt”
func main() {
fmt.Println(“This is a Hello World program!”)
}

2. 

How Do You Install the Lua Compiler on a CentOS/RHEL/Fedora Server?

Problem scenario
You want to run Lua programs on your Red Hat derivative distribution of Linux server (e.g., CentOS/RHEL/Fedora).  

Solution
1.  Make a script like this called lua.sh with the following lines:

yum -y install readline-devel gcc
curl https://www.lua.org/ftp/lua-5.3.5.tar.gz > /tmp/lua-5.3.5.tar.gz
mv /tmp/lua-5.3.5.tar.gz /opt/
cd /opt/
tar -xzvf lua-5.3.5.tar.gz
cd lua-5.3.5
sudo make linux test
echo “ENV=$ENV:/opt/lua-5.3.5/src/” >>

What Are The Differences between CMD and ENTRYPOINT in Docker?

Question
Dockerfile has reserved words CMD and ENTRYPOINT.  They seem to do the same thing.  What are the differences between CMD and ENTRYPOINT in Docker besides their words’ lengths?

Answer
There are many similarities between these two reserved words in Dockerfile “language.”  But here are three differences:

#1  “…CMD can be overwritten by an argument to docker run, while ENTRYPOINT can be overwritten only by using the –entrypoint option of docker run.” is a quote taken from page 43 of 

How Do You Install docker-compose on Any Distribution of Linux?

Problem scenario
You want a Bash script to install Docker on any distribution of Linux.  You want to use the same script for each Linux server.  How do you write a script that will install docker-compose on any type of Linux including CentOS/RHEL/Fedora, Debian/Ubuntu and Linux SUSE?

Solution
Overview

This will work with AWS or Azure servers or on-premise servers.  It requires that the server have access to the internet.

How Do You Troubleshoot the Ansible Message “AnsibleOptionsError…ansible.cfg…File contains no section headers”?

Problem scenario
You try to run an Ansible playbook but you get this error “AnsibleOptionsError…ansible.cfg…File contains no section headers”

Your ansible.cfg file has headers. What should you do?

Solution
Eliminate indentations.  The [header] should be on the far left of the screen with no leading spaces.

How Do You Troubleshoot the Bash Error “syntax error near unexpected token”?

Problem scenario
You run a Bash script with a function that you developed yourself.  When you run the script, you get the error “syntax error near unexpected token”.  What should you do to solve this?

Solution
Call the function without the parentheses.  Do not use this: contintfunc()

Use this when you call, not define, your previously defined function:

contintfunc

How Do You Use an .sls File to Push down Configuration Changes Using SaltStack?

Problem scenario
You want to leverage the CM tool SaltStack.  You have Salt Master installed, and now you want to push down files to Salt Minion client servers.  How do you do this?

Solution
Prerequisites

This solution requires Salt Master to be configured.  If you need assistance, see this posting.

Procedures
1.