What Utility Can Provide Encryption and High Compression for Files on Linux and How Would You Use It?

Problem scenario
You want to use the same command for encryption and compression. You want the compression to be high (for maximum data density for backups and storage purposes). You can install a new package. What should you do?

Solution
Use 7zip.

Prerequisite
Try whereis 7z to see if 7zip is installed. If it is not,

How Do You Create a Windows VM in Google Cloud Platform with the Console?

Problem scenario
You want to create a Windows server in Google Cloud Platform. How do you do this?

Solution
1. Log into Google Cloud Platform.
2. Click the hamburger icon in the upper left hand corner (the icon with three horizontal bars stacked onto each other).
3. Go to Compute Engine -VM Instances
4. Click “Create Instance”
5.

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. Enable the “Post-Receive Web Hooks.” If this is disabled,

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. Find where your kubectl file is (e.g.,

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. This program generates a list and an equivalent tuple of 10,000,000 random numbers numbers.

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.