How Do You Find What Version of Chef That You Are Using on a Linux Server?

Question:  How Do You Find What Version of Chef That You Are Using On A Linux Server?  If you are not sure if Chef is installed or not on your Linux server, see this article.

Answers (one for Chef client and one for Chef server)
To find the version of Chef client that is installed, run this:

chef-client -v

If the response is “command not found” chef-client is not installed.  If chef-client is installed, the above command will result in a display of the version of chef-client.

[Sassy_Social_Share]

What Is Robotic Process Automation (or RPA)?

Question
What is robotic process automation (or RPA)?

Answer
Robotic process automation, or RPA, is the term for automating user interface (UI) operations (mouse clicks and inserting text) with image recognition in a typical graphical user environment.  Some applications have no exposed API.  RPA enables the user to script a series of computer desktop activities to be performed in a scheduled and unattended manner.

RPA is not available for character-based (non-GUI) operating systems such as 

How Do You Get the Puppet Master Service to Run for The First Time?

Problem scenario
Your newly installed Puppet Master is not working.  The main service will not start.  You try this command:  service puppetserver restart

You see this as the results of the above command:
“Job for puppetserver.service failed because the control process exited with error code. See “systemctl status puppetserver.service” and “journalctl -xe” for details.”

You then try this command to see what is wrong (per the error message above):
systemctl status puppetserver.service

It results in this:

? …

How Do You Solve The Problem When Puppet Agent Returns an Error About “require_relative for main:Object”?

Problem scenario:  On a Linux server you run “puppet agent -t” to apply a manifest on a Puppet Agent.  You receive this error:

“Error: Could not retrieve local facts: undefined method ‘require_relative’ for main:Object”

What do you do to fix this?

Solution:  Install a compatible version of Puppet agent on the server.  One way to do this is to run this command:

curl -k https://continualintegration:8140/packages/current/install.bash | sudo bash`

#where “continualintegration” is the hostname (or FQDN) of the Puppet Master server.

How Do You Troubleshoot the Yum Error “[Errno 14] Peer cert cannot be verified or peer cert invalid. Trying other mirror…”?

Problem scenario:  You are running a yum command and get this error:
“[Errno 14]  Peer cert cannot be verified or peer cert invalid.  Trying other mirror…”

Possible Solutions
The SSL certificate is not being verified.  One solution would be to ensure the Linux server you are running the yum command on has the correct SSL cert. 

Another solution would be to modify the /etc/yum.conf file. 

How Do You Ensure That a PowerShell Pop-Up Window (mini-GUI) Always Appears in the Front?

Problem scenario:
You have a PowerShell script that launches a pop-up window.  This pop-up appears behind the PowerShell ISE GUI.  Without being in the foreground, the users of this script fail to realize there is a prompt waiting for the user to take action.  You want the pop-up window to be in the front.  You tried things like these options to no avail:

  • New-Object System.Windows.Forms.Form -Property @{TopMost = $true}
  • -ArgumentList([System.Diagnostics.Process]::GetCurrentProcess().MainWindowHandle)
  • form.TopMost = “True”
  • form.TopMost = $true
  • form.TopMost = $True
  • $form.TopLevel = $true
  • set-foregroundWindow(Get-Process PowerShell).Main.WindowHandle
  • $form.BringToFront()
  • set-WindowsFocus
  • [void]$showWindowAsync::ShowWindowAsync((Get-Process -id $pid).MainWindowHandle,

How Do You Get a Script with Yum Commands That Rely on a Public Website to Work when you have No Access to the Internet?

Problem scenario
You have a Bash script that cannot be modified that runs yum commands.  The script runs on a RedHat distribution of Linux and uses URLs with SSL (e.g., https://continualintegration.com).  The script expects a yum repository to be set up at this URL.  This script must run without access to the Internet due to enterprise security policies.  What do you do if you are behind enough security to not need SSL to be set up properly (given that you have no Internet access) and need to get the script to work immediately?