How Do You Delete the Git Credentials You Entered Into Jenkins for “Source Code Management”?

Problem scenario
In a Jenkins job there is a “Source Code Management” section.  You checked Git and entered credentials.  You entered the same username twice (or more).  Now you want to delete some of those users to be able to know which (unique) password is being used.  What should you do?

Solution
It isn’t always easy to find where the credentials for your Git repository are stored. 

How Do You Install Gatling on a CentOS/RHEL/Fedora server?

Problem scenario
You are using a Red Hat derivative of Linux.  You want to install Gatling.  What do you do?

Solution
Prerequisite

Install Java.  If you need assistance, see this posting.

Procedures
1.  Run a script with the following content (e.g., name it installgatling.sh and run sudo bash installgatling.sh):

gatlingversion=3.3.1 # change this version as needed. …

How Do You Troubleshoot the Ansible Error “Unsupported parameters for (copy) module: become Supported parameters”?

Problem scenario
You are trying to run an Ansible playbook with the “become: yes” stanza.  You get this error after your ansible-playbook command:

fatal: [instance-11]: FAILED! => {“changed”: false, “checksum”: “da39a3ee5e6b4b0d3255bfef95601890afd80709”, “msg”: “Unsupported parameters for (copy) module: become Supported parameters include: _original_basename, attributes, backup, checksum, content, delimiter, dest, directory_mode, follow, force, group, local_follow, mode, owner, regexp, remote_src, selevel, serole, setype, seuser, src, unsafe_writes, validate”}

Solution
Unindent the “become: yes” stanza so it is at the same level of its corresponding module.

How Do You Iterate through a List of Servers When Running an Ansible Playbook?

Problem scenario
You want an Ansible playbook to run on specific managed nodes.  You can create a list of the servers you want the playbook to apply to.  How do you provide a list of specific hostnames and have the Ansible playbook run on each server?

Prerequisites
This assumes that you have installed Ansible and have it working with the managed nodes you want to run a playbook on. 

How Do You Browse SonarQube and Interact with It as a Web UI from the Front-End?

Problem scenario
You run a “sudo ps -ef | grep sonar” and find Sonar to be running.  You run “sudo sytemctl status sonar” and find that it is active.  You run nmap or netstat and see port activity from the sonar service.  Sonar is listening.  When you go to a web browser over the right port (e.g., http://x.x.x.x:9000/) you do not see any web page.  There is no evidence you can connect. 

How Do You Eliminate the “Namespace”, Quotes and Brackets from the Variable You Are Printing with Python?

Problem scenario
You are trying to print a variable, but it prints out like this:

Namespace(string=[‘foobar’])

How do you print out just “foobar” with no quotes?

Solution

Overview
The key word here is “string”.  The “string” text in this is the attribute you will want.

Background
Your program may have something like this:

args = parser.parse.args() # Assuming this is the variable assignment of “foobar”
print (args)

 Procedures
1. 

How Do You Troubleshoot the Artifactory REST API Error of a Hanging Command?

Problem scenario
You issue a call to an Artifactory URL.  You see something like this: “TCP_NODELAY set”.  There is a delay, and nothing happens.  What should you do?

Solution
Does the URL have a port number in it?  The socket may be incorrect depending on what port number you use.  If you can go to the back-end of the Artifactory and install nmap,

How Do You Install a Yum Package from a Reachable yet Unconfigured Repository on an Ad Hoc Basis?

Problem scenario
You want to install a package with a yum command.  But you receive an error about the package not being available.  You know that a reachable, yet unconfigured, repository has the package.  You know the repository’s name too.

You cannot use “subscription-manager register” to configure a new repository because you do not have the proper credentials or there is a firewall blocking the Red Hat derivative Linux server.