How Do You Run a MapReduce Job (with Python)?

Problem scenario
You have studied what a MapReduce job is conceptually.  But you want to try it out.  You have a Linux server with the Hadoop namenode (aka master node) installed on it.  How do you run a MapReduce job [to understand what it is all about]?

Solution
This is just an example.  We tried to make this as simple as possible.  This assumes that Python has been installed on the Hadoop namenode (aka master node) running on Linux.

How Do You Pass Parameters Using Boto?

Problem scenario
You want to run a Boto program. But there is an error about necessary parameters not being assigned.

You see a message like this:

botocore.exceptions.ClientError: An error occurred (ValidationError) when calling the CreateStack operation: Parameters: [KeyName, DBPassword, DBUser] must have values

Where can you see an example of parameters being passed?

Solution
Updated on 3/15/21.

How Do You Generate a Load for Your Nginx or Apache Web Server?

Problem scenario
You set up a load balancing mechanism for your Nginx or Apache web server.  You want to test it and set up an artificial load of traffic.  You want to generate a significant amount of traffic to test the HTTP load balancing mechanism.  How do you do this?

Solution
Here are three scripts that can, by themselves, download a web page 100 times when they execute. 

How Do You Install and Configure the AWS CLI on a Linux Server (without the pip Command)?

Problem scenario
Using different package managers can lead to dependencies being met while systems administrators will encounter error messages that detect, find or determine something to the contrary (e.g., false unmet dependency errors or conditions).  Some enterprise policies disallow the pip command.  How do you set up the AWS CLI on a Linux server without the pip command?

Solution (Part 1 and Part 2)
Prerequisites
i. 

How Do You Install an Older Version of Ansible on an AWS Instance of Red Hat Linux?

Problem scenario
You are using Red Hat Enterprise Linux in AWS.  You need to install an older version of Ansible — not the newest.  The pip command and other supported ways of deploying Ansible automatically use the newest version.  You also want to install Maven. 

Solution
Run this script with “sudo”. (You could run it as root, but that is not recommended.)  The server must be in a Security Group with access to the internet.

How Do You Quickly Install Several Python Packages Such as Pycrypto and Paramiko on RedHat Linux?

Problem scenario
How do you install pycrypto, paramiko and the several related packages without copying several individual packages on a RedHat Linux server?

Background
It can be tedious getting the different dependencies of python packages installed.  By downloading various .tar.gz files, you have to unpack them, then run a series of “python setup.py …” commands. While it is not advisable to install more packages than are strictly necessary,

Troubleshooting Ansible With Windows Managed Nodes

Problem scenario
When running various Ansible operations, such as “ping,” result in an error like this “SSL: 500 WinRM Transport. [Error 104] Connection reset by peer.”  What should you do to get Ansible to work with Windows managed nodes?

Solution

Prerequisites
Install pip. If you need assistance, see this posting.

Procedures
Upgrade pywinrm to 0.2.2. 

How To Resolve “Certificate_Verify_Failed” error when trying an AWS CLI command?

Problem Scenario  You try to use an AWS CLI command, but you get an error.  The error says “[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:…)”

Possible solutions

#1  Redo the AWS configuration.  Issue this command: aws configure
Leave the AWS Access Key ID and the AWS Secret Access Key the way they are.  Look at the “Default region name.”  Verify there is no letter at the end. 

How Do You Troubleshoot the Error “eve.exceptions.ConfigException: DOMAIN dictionary missing or wrong.”?

Problem scenario
You are trying to use Python Eve.  You are using Python’s interactive command prompt, and you run these two commands:

from eve import Eve
app = Eve()

But you get this error:

“File “/usr/local/lib/python2.7/dist-packages/eve/flaskapp.py”, line 138, in __init__
    self.validate_domain_struct()
  File “/usr/local/lib/python2.7/dist-packages/eve/flaskapp.py”, line 269, in validate_domain_struct
    raise ConfigException(‘DOMAIN dictionary missing or wrong.’)
eve.exceptions.ConfigException: DOMAIN dictionary missing or wrong.”

What should you do?

How Do You Install Pywinrm Without Pip and Without a Yum Repo?

Problem Scenario:  You have CentOS (or a RedHat derivative) and Python is installed.  You want to install pywinrm.  When using Python and Python packages you get this error “gaierror … ‘Temporary failure in name resolution’)).”  How do you install pywinrm without pip and without a relevant yum repo?

Root cause:  It can be caused by excessive open connections.  A reboot could fix the problem.