How Do You Troubleshoot the Golang Error “missing function body”?

Problem scenario
You run a Golang program with a function that uses a map. You get this error:

./foobar.go:33:6: missing function body
./foobar.go:33:44: syntax error: unexpected {, expecting comma or )

What should you do?

Solution
Omit the “{}” in passing map data types to the function. The syntax for declaring a map will include {}.

Here is an example of how to properly define a map:

goodmap := map[string][5]string{}

But when you are defining a function that will accept a map as a parameter,

 » Read more..

How Do You Troubleshoot “no context directory specified, and no dockerfile specified”?

Problem scenario
You run a command like this: docker build -t “ricepaper:contint”

But you receive a message such as this:

Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
no context directory specified, and no dockerfile specified

How do you resolve this problem?

Solution
Use a space and a period at the end of the command.

 » Read more..

How Do You Create a Kubernetes Cluster?

Problem scenario
You want to create a Kubernetes cluster. What should you do?

Solution
You should install Kubernetes. You will need a proper .yaml file in a directory on a server with kubectl installed and configured. You would then run a “kubectl create” command. See this posting for more information.

 » Read more..

What is ChatOps?

Question
What is ChatOps?

Answer
ChatOps is the integration of a chatroom (e.g., Slack, HipChat, etc.) with the controls of an API (e.g., a REST API) to invoke DevOps or systems administration tasks. ChatOps chatrooms allow for text communication in real-time. In a ChatOps chatroom there is a syntax for messages to reboot a server or deploy code. Issuing such commands allows for centralized logging and close communication with many people.

 » Read more..

How Do You Know if You Have Helm Installed and what Version You Are Using?

Problem scenario
You want to use Helm to manage Kubernetes applications. Helm helps you with packages for changes to Kubernetes (in ways that are similar to yum or apt). Helm uses what are call Charts (.yaml files) that enable you to do more with Kubernetes with less trouble. Helm consists of these two things: a CLI tool and a server component that runs as a pod in a Kubernetes cluster (page 531 of Kubernetes in Action by Luksa).

 » Read more..

What Are the Recommended Practices of Logging?

Problem scenario
The primary purposes of logging include troubleshooting (root cause analysis of poor performance, debugging unintended behavior, or resolving catastrophic failures). In some cases logging is used for monitoring of resource utilization and planning of changes. What patterns or characteristics of a good logging system?

Solution
Here are 11 traits of good logging.

1. Use appropriate file systems and tune them based on your needs.

 » Read more..

How Do You Increase the Hard Disk Space of an Existing GCP Server?

Problem scenario
You need a larger hard disk on a Google Cloud Platform server. What should you do?

Solution

  1. In the GCP web console go to “VM instances”
  2. Click on the VM’s name (e.g., instance-1) that is hyperlinked.
  3. Find “Boot disk and local disks”. There should be a list with a “Name” column.
  4. Click on the hyperlinked name (e.g.,

 » Read more..

How Do You Install Helm on a Debian or Ubuntu Linux Server without Internet Access?

Problem scenario
You want to use Helm to manage Kubernetes applications. Helm helps you with packages for changes to Kubernetes (in ways that are similar to yum or apt). Helm uses what are call Charts (.yaml files) that enable you to do more with Kubernetes with less trouble. Helm consists of these two things: a CLI tool and a server component that runs as a pod in a Kubernetes cluster (page 531 of Kubernetes in Action by Luksa).

 » Read more..

The Mismeasure of a Professional Candidate?

How should a prospective I.T. employee be assessed? Ostensibly CodeFights, Codebyte, Codility, Coderpad, Devskiller, HackerRank, TestDome, and other coding ability test websites can help job seekers with limited professional experience yet considerable skills and abilities can prove himself or herself. Others disagree. This article entitled Beware of HackerRank has 723 likes. Clearly there are many people, with legitimate reasons, who do not think websites can accurately measure the value of a candidate for a position.

 » Read more..

How Do You Restart WMI Services with PowerShell?

Problem scenario
You want to restart Windows Management Instrumentation services using PowerShell. What command will cycle WMI in PowerShell?

Solution
Open PowerShell as an Administrator. Run this command: restart-service winmgmt

 » Read more..