How Do You Determine the URL for the AWS Web Console for a Non-root User?

Problem scenario
You created an AWS Console user (e.g., an IAM user).  You want to log into the web UI with the user.  You have the username and password.  What is the URL for the AWS web console for a non-root user?

Solution
1.  Log into the web UI.
2.  Go here: https://console.aws.amazon.com/iam/home?
3.  Go to Users on the left.  

Is Jenkins job-dsl Different from Jenkinsfile Pipelines’ Scripted Syntax?

Question
You have heard of Jenkins job-dsl.  You are not sure if it is the same DSL found in scripted syntax Jenkinsfile pipelines.  Is Jenkins job-dsl different from Jenkinsfile pipelines’ scripted syntax?

Answer
Yes.  Jenkins job-dsl is different from the DSL used in Jenkinsfile pipelines’ scripted syntax.  This thread confirms this fact.  This link helps explain the differences.

How Do Quotes Affect Python if Conditional Tests of Equality for a Variable?

Problem scenario
You are programming in Python, and you want to use conditional logic.  You want to know how variables are evaluated and tested.  You want to use the keyword “if” to evaluate a variable assignment.

Solution
This program below shows how the evaluation of a variable in Python behaves when quotes are involved. Errors are not thrown or displayed to the programmer.  Therefore in some instances the programmer must know how quotes affect logical evaluations with variables.

How Do You Iterate through Data Members (the Individual Components) of a Groovy Object?

Problem scenario
You have an object that you want to sequentially pass through.  That is, you want to print either the value or the key/name and value pair of every member data item of the object.  How do you print every individual data member of a given object in Groovy?

Solution
Invoke the “.properties.each” keyword.  This built-in feature will allow you to do just this. 

How Do You SSH to a GCP server?

Problem scenario
You cannot SSH into a Linux Google Cloud Platform server.  How do you create new GCP servers that you can SSH into?

Solution
Summary
Use the “Startup script” in Google Cloud Platform.  This script comes with precautions.  Be careful when pasting it.  The lines can potentially not wrap properly.  Carriage returns could be introduced to make this script fail.  Be very careful because this script creates a user with sudoer privileges. 

How Do You Troubleshoot “Redirecting to /bin/systemctl start docker.service ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units”?

Problem Scenario
You try to configure Docker such that you can run “docker” commands without sudo.  You run these three commands:

sudo groupadd docker
sudo gpasswd -a $USER docker
newgrp docker

You then installed Docker and rebooted the server.  You then run this:

docker run hello-world

But you received this:

/usr/bin/docker-current: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

How Do You Use docker-compose?

Problem scenario
You want to create an example of a docker compose file.  How do you use docker-compose?

Prerequisites
i.  This assumes you have Docker installed and running.  If you need assistance, see this posting.
ii.  This assumes that you have installed docker-compose.  If you need assistance, see this posting.
iii.  This assumes the Docker host has access to the internet.

How Do You Get Jenkins Working in a Docker Container?

One of the following problems apply:

Problem scenario #1
You have no idea how to start Jenkins in a Docker container.  What should you do?

OR

Problem scenario #2
You have run some Docker commands to try to start deploy Jenkins in a container.  You get output like this:

[4213] [10236] Disconnected
[9146] Connection from [::1]:41118
[9146] Extended attributes (16 bytes) exist <host=localhost>

How Do You Delete Servers in AWS with Python?

Problem scenario
You want to write a Python program to delete servers.  How do you delete EC-2 instances in AWS with Python?

Solution
Prerequisites

a.  You have installed Boto3.  If you do not know how, see this posting
b.  You know the instance IDs.  If you do not know them, see this posting.

Procedures
Read the “Usage instructions” of this Python program we call “deleteec2.py”.

How Do You Run a Docker Container as a Non-root User?

Problem scenario
You run this command: docker run -it ubuntu bash

docker: Got permission denied while trying to connect to the Docker daemon sockes/create: dial unix /var/run/docker.sock: connect: permission denied.

You do not want to run a Docker container as a privileged user (as a recommended practice).  What should you do?

Solution
Background: “To do builds in the cluster,