How Do You Troubleshoot the Python Error “NameError: name is not defined” When Using Boto3?

Problem scenario
You are running a Python program with Boto and you get an error like this:

  ” aws_access_key_id=AKIAJfoobar9999, NameError: name ‘AKIAfoobar9999’ is not defined”

What should you do?

Solution
Put single quotes around the aws_access_key_id value.

How Do You Use Terraform to Create AWS Servers?

Problem scenario
You want to use Terraform to deploy EC-2 instances (VMs in AWS).  How do you do this?

Solution
These directions can work on a Linux server in your enterprise, a Linux server in Azure or a Linux server in AWS.

1.  Install Terraform.  See this link if you do not know how.

2.  Create a file like this called contint.tf with this as the content:

provider “aws” {
 

How Do You Install Docker on Debian 9 in GCP?

Problem scenario
You are running Debian 9 in GCP.  You want to install Docker on this server.  What should you do?

Solution
1.  Create a script in /tmp/ call installer.sh with the following lines of content:

#!/bin/bash
apt-get -y update
apt-get install -y apt-transport-https ca-certificates wget software-properties-common
wget https://download.docker.com/linux/debian/gpg
apt-key add gpg
echo “deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable” | sudo tee -a /etc/apt/sources.list.d/docker.list
apt-get -y update
apt-cache policy docker-ce
apt-get -y install docker-ce

2. 

What is an Azure Logic App?

Question
You have heard about Azure’s Logic Apps.  What are they and what do they do?

Answer
Azure Logic Apps are a PaaS solution.  Logic Apps execute in response to a triggering event (e.g., recurring on a schedule based on time, receiving a REST API call, or a Tweet being posted).  They initiate a variety of different tasks as you can determine the OS architecture (either Windows or Linux) without having to manage that same OS.

How Do You Prepare Any Distribution of Linux in GCP to Have Similar Features to New AWS Instances?

Problem scenario
You want to have your Google Cloud Platform servers be ready for what you consider to be “regular” usage.  What should you do to get a server to be ready for these four things listed below?

1.  Able to SSH into it via Putty with a non-root user.
2.  Able to sudo with this non-root user.
3.  Files when modified in vi in “insert mode” can to receive clipboard-copied content with a right-click of a mouse.

How Do You Install Puppet Master on a Debian Linux Server in GCP?

Problem scenario
In Google Cloud Platform you have a Debian Linux server.  You want to install Puppet master on it.  What should you do?

Solution

Prerequisites
We suggest having at least 4.5 GB of memory.  This can be from RAM or a combination of RAM and swap space.  To create 4 GB of /swap/space you can see this posting as a guide,

How Do You Upload a Docker Image to Amazon Elastic Container Registry?

Problem scenario
You created your own Docker image.  You want to upload it to a repository so it is available to other servers.  You want to upload a Docker image from your server into ECR (in AWS).  You do not know the name of the repository.  How do you do this?

Solution
Prerequisites

a.  This assumes that ECR has been set up.  If you need assistance,

After Installing Jira on a RHEL Server, How Do You Access the Web UI for Jira?

Problem scenario
You installed Jira 7.x on RHEL 7.x in AWS.  You try to go to the URL to finish installing and configuring it, but the web UI does not load.  On the back-end you see that there is a service listening on port 8080 (with a sudo netstat -anlp | grep 8080 command).  You know that now AWS Security Group is blocking port 8080 from the external IP address of the server.

How Do You Troubleshoot Connecting to an RDS Instance?

Problem scenario
You created a DB instance in RDS.  You cannot connect to it.  What should you do?

Solution
1.  Make sure that it is “Available.”  It could have been turned off.
2.  Click on the Instance and confirm the relevant Security Group allows you to connect to it.
3.  Click on the Instance and search for “Publicly accessible”.  Make sure this is set to “Yes.”  If it is set to “No” you may have to take a snapshot of the instance and launch that snapshot with the “Publicly accessible” option.