How Do You Use Python to Create a Server in AWS?

Problem scenario
You want to be able to create EC-2 instances in AWS with a Python script.  How do you do this?

Solution
Prerequisites

This assumes you have installed Boto3.  If you do not know how, see this posting.

Procedures
As a reference, you may go here to learn more about Boto’s features:  http://boto3.readthedocs.io/en/latest/guide/migrationec2.html
Use this program:

“”” Usage instructions
1. …

How Do You Get a Head Set (Or Pair of Ear Buds) to Work with Your Windows Machine?

Problem scenario
You insert 3.5 mm jack for your headphones (audio cable) that is known good into your laptop.  You cannot hear sound out of it.  You go to different parts of the Control Panel, but you cannot see evidence that your Windows computer (laptop or desktop) sees the device.  How do you get your headphones to work?

Root cause
Some I.T. policies disable the 3.5 mm audio jack on the Windows computers. 

How Do You Solve the Error “failed to push some refs” after a “git push origin master”?

Problem scenario
You have two Linux servers (server A and server B).  You have a Git repository on server A.  You are logged into server B as jdoe. You cloned a Git repository from server A (with a “git clone git@gitlabFQDN:/path/to/nameOfRepo.git” command).  You added some files and used “git commit” on server B.  From server B you run this command as the Linux user jdoe: git push origin master

You get this problem:

remote: GitLab: You are not allowed to upload code for this project.

How Do You Use a Dockerfile with Reserved Words ENTRYPOINT and CMD to Create an Image and Test It Out?

Problem scenario
You want to use the ENTRYPOINT and CMD keywords in a Dockerfile.  You know that the value of CMD amounts to a parameter for the ENTRYPOINT value which is executed.  You want to verify that the value of ENDPOINT is used in an execution.  You want the Dockerfile to be simple to illustrate these reserved words.  What do you do?

Solution
Prerequisite
Install Docker. 

How Do You Configure Oracle 12 to Work with JIRA 7.x when Writing a dbconfig.xml File for JIRA?

Problem scenario
You have configured dbconfig.xml for JIRA 7.x to use Oracle 12.  But JIRA is not working correctly when you try to start it.  What should you do with your dbconfig.xml file?

Solution
Atlassian’s website, as of 8/30/18, recommends having “oracle10g”, an unsupported version, in the dbconfig.xml file.  This is despite the fact that Oracle 10 and Oracle 11 are not supported for JIRA 7.x according to Atlassian’s site here.

How Do You Monitor The Disk Activity of a Linux Server with a Command Similar to top?

Problem scenario
You think that there is disk contention with the various processes on your Linux server.  You think that the I/O activity is too high and potentially creating a bottleneck.  What do you do to learn more about disk utilization?

Solution
1.  To learn the names of the underlying disks on your Linux system, run this command:

ls -lh /dev/disk/by-path

2. 

Using Ansible How Do You Search The Contents of a File on Linux for “{{” or “}}”?

Problem scenario
You want to see if an Ansible playbook is injecting (or leaving) two braces, “{{” or “}}”, in a specific file on Linux.  These symbols can be injected accidentally with little notification.  Variable substitution could fail during the course of a playbook run.  This is a subtle problem that may have no alert.  You want some debugging to check for these symbols.  How do you know a file on a managed node does not have a “{{” or “}}”?

How Do You Use a Jenkinsfile?

Problem scenario
You read about what Jenkinsfiles are.  Coveros.com defines them as “Jenkinsfiles, using a domain specific language based on the Groovy programming language, are persistent files that model delivery pipelines “as code”, containing the complete set of encoded steps (steps, nodes, and stages) necessary to define the entire application life-cycle.”

How do you use a Jenkinsfile with Declarative pipeline syntax?

Solution
Overview

A Declarative pipeline syntax has four mandatory sections with each of these reserved words: agent,

How Do You Clone Down a Specific Branch of a Repository from Git?

Problem scenario
You want to clone a specific branch from Git.  But you do not want to clone the master branch.  How do you clone the branch named “develop”?

Solution
1.  Clone down the repository as normal with a command like this (but replace <SSH or HTTP constructor of repo> with the remote repository):
git clone <SSH or HTTP constructor of repo>

2. 

How Do You Troubleshoot the Message “pycurl error 22”?

Problem scenario
You are trying to install a new package or apply yum updates on a CentOS/RHEL/Fedora server.  But you get 404 errors or “pycurl error 22” as the result of your yum commands.  How do you use yum to install a new package or apply a new update?

Solution
Run this command:  sudo yum clean all

Now your yum commands should work.