How Do You Troubleshoot a Puppet Manifest when The Errors and Logging Do Not Help You? (abridged version)

ABRIDGED VERSION (To see the unabridged version, see this posting.)

Problem scenario
A Puppet manifest is not working, but there are no obvious error messages. When running the puppet agent command, you use the -d flag for debugging. In your manifest, you use logoutput => true stanza. But still, you cannot figure out why your manifest is not working.

You tried this command: puppet parser validate nameOfManifest.pp

The above command had no output.

Should Environmental Data Be Placed Into Version Control?

Problem scenario
You are not sure if environmental specific values should be placed into version control. What should do you?

Solution
Some people think that everything should go into version control. But others disagree. Here are examples of each philosophy:

“You need to get everything in version control. Everything. Not just the code, but everything required to build the environment.” (This was taken from page 297 of The Phoenix Project.) This is very clear in how it disagrees with the twelve-factor app principles.

What Is The Difference between Unit Testing and Functional Testing?

Question
What is the difference between unit testing and functional testing in the context of professionals using one over the other?

Answer
A user wants to verify that the software behavior is correct from a black-box perspective; this more closely describes functional testing. A programmer is more concerned about the theoretical aspects of the code and its inner workings; this more closely describes unit testing.

How Do You Use the “next” Function to Iterate Through an Iterable in Python?

Problem scenario
You want to use the reserved word “next” to parse through an iterable. What do you do?

Solution
Run this six-line program as an illustration:

contint = [ 15, 50, -100, ‘foobar’]
var1=iter(contint)
print(next(var1))
print(next(var1))
print(next(var1))
print(next(var1)) …

How Do You Set Up Apache Kafka on Any Distribution of Linux?

Problem scenario
You want to set up Apache Kafka with a single broker just to test out. How do you do this on any distribution of Linux?

Prerequisite
You must install Zookeeper. If you need assistance, see this posting.

You may want to install screen because this solution will rely on it; you could open duplicate terminals instead of using the screen command.

What Are Namespaces?

Problem scenario
You have heard of namespaces in programming, DNS, AWS, operating systems, and in the context of managing containers. You want to see the disambiguation of of this term insofar as computing is concerned. What are namespaces in I.T.?

Overview
Names can be bound to different spaces (or subsystems), and this binding varies depending on the technology. Namespacing helps facilitate locally unique identification/resolution of names.

How Do You Merge Three Files (.jpegs and PDFs) into One PDF?

Problem scenario
You have a non-business project (e.g., a non-commercial, non-professional, non-work-related project). You need to combine individual JPEGs and PDFs into one PDF. How do you do this?

Solution

  1. Print the JPEG(s) to Microsoft Print to PDF. Now the JPEG(s) has (or have) been converted into the PDF format.
  2. Use PDFmate.com to download and install “Free PDF Merger for Windows.”
  3. Open PDFmate Merger.

How Do You Set an Environment Variable for Every User Upon Rebooting a Linux Server?

Problem scenario
Without creating a hard or soft link of a file, how do you set an environment variable for every user after every reboot?

Solution

  1. Update the /etc/environment file so it has this stanza (but replace “JAVA_HOME” with the variable of your choice and replace /usr/bin/java with the path or value of the variable as you desire):

JAVA_HOME=/usr/bin/java

  1. Save the changes of the file.