How Do You Troubleshoot Triggers in a CI/CD Pipeline That Are Not Functioning?

Problem scenario
You are using Bitbucket and Jenkins. You have configured triggers to happen on certain events. The events have happened, but you see no corresponding action, no alerts or error messages and nothing in any relevant log. What should you do?

Possible solution #1
In Bitbucket, log in. Go to the relevant repository. Then go to Settings -Workflow -Hooks.

How Do You Troubleshoot the kubectl Message “Error from server (NotAcceptable): the server was unable to respond with a content type that the client supports”?

Problem scenario
You run a kubectl command, but you see this message:
Error from server (NotAcceptable): the server was unable to respond with a content type that the client supports

What should you do?

Solution
1. Run this command: kubectl version

There should be a “Client Version” and a “Server Version”. The two are probably different.

When Performing Equivalence Operations on Each Item in a List or in a Tuple, which Process Takes Less Time in Python?

Problem scenario
You are trying to refactor Python code. There is an equivalence operation that happens ten million times. You are concerned that a tuple may be a better data structure than a list. Which would operate more quickly and how do you find out for sure?

Solution
The tuple will be faster.

Operations in a tuple are slightly faster.

How Do You Find out What Version of Hammer Is Installed on Your Server?

Problem scenario
You believe that the Hammer CLI has been installed on your Red Hat Enterprise Linux server. But you do not know what version. What should you do?

Solution
Run this command: hammer –version

“Hammer is a powerful command-line tool provided with Red Hat Satellite 6. You can use Hammer to configure and manage a Red Hat Satellite Server either through CLI commands or automation in shell scripts.

How Do You Troubleshoot The Terraform Error “Authentication using either SSH …must be enabled in Linux profile”?

Problem scenario
You try to run terraform apply to create an Azure VM but you receive a message like this:

Error: Error applying plan:

1 error(s) occurred:

* azurerm_virtual_machine.myterraformvm: 1 error(s) occurred:

* azurerm_virtual_machine.myterraformvm: compute.VirtualMachinesClient#CreateOrUpdate: Failure sending request: StatusCo” Message=”Authentication using either SSH or by user name and password must be enabled in Linux profile.” Target=”linux”

What should you do?

Solution
1.

How Do You Set up Nginx as an HTTP Load Balancer for Other Instances of Nginx Running in Docker?

Problem scenario
You have many Docker containers running Nginx.  You want to leverage these instances for users to go to one web site and then be automatically routed to different underlying Nginx instances in Docker containers.  How do you create a single website for web clients to go to with a reverse proxy balancing the load behind-the-scenes?

Solution
Overview
We accomplish an example with four Docker containers each using a free version of Nginx. 

How Do You Set up Nginx as an HTTP Load Balancer So Client Requests (from Web Browsers) Go to Certain Nginx Servers More Frequently Than Others?

Problem scenario
You have certain Nginx servers with ample resources whereas others have minimal resources.  Based on geographic locations and data center bandwidth locations and costs, you want to assign fractions of the web traffic from client workstations (requests from web browsers) to different Nginx servers more than others.  You do not want round-robin, equal distribution of traffic.  You want customized HTTP load balancing in accord with unequal configurations.  How do you distribute this traffic proportionately according to your desired specifications?