How Do You Install The aws-iam-authenticator?

Problem scenario
You want to manage Kubernetes (e.g., Amazon EKS) via a server in AWS.  You want to install the aws-iam-authenticator on a Linux server.  How do you do this?

Solution
1.  To install aws-iam-authenticator go here to obtain the link that is relevant for your server.  You will search the above link for “aws-iam-authenticator binary from Amazon S3”

2. 

How Do You Get the sonar.sh Console to Actually Work When the Screen Says That “SonarQube is already running”?

Problem scenario
You stop SonarQube services from running.  You want to log into the web UI console to set things up.  You run this command:

sudo bash /opt/sonarqube/bin/linux-x86-64/sonar.sh console

But all you see is


Running SonarQube…
SonarQube is already running.

You never get a network service to listen on port 9000.  How do you use “sonar.sh console” to initially configure Sonar?

How Do You Install Varnish on Debian/Ubuntu Linux?

Problem scenario
You want to install Varnish on a Debian/Ubuntu Linux server.  How do you do this?

Solution
Run these commands:

sudo apt-get -y update

sudo apt-get -y install gcc python-docutils pkg-config libreadline-dev libncurses5-dev libpcre3-dev #*

curl http://varnish-cache.org/_downloads/varnish-6.0.0.tgz /tmp/varnish-6.0.0.tgz

sudo cp /tmp/varnish-6.0.0.tgz /opt/
cd /opt
sudo tar xvzf varnish-6.0.0.tgz
cd varnish-6.0.0
sudo ./configure
sudo make
sudo make install
varnishd -V

* This 

How Do You Troubleshoot the Error “intx ThreadPriorityPolicy=42 is outside the allowed range [ 0 … 1 ] “?

Problem scenario
You try to start Cassandra but you get this error:

“[0.000s][warning][gc] -Xloggc is deprecated. Will use -Xlog:gc:./bin/../logs/gc.log instead.
intx ThreadPriorityPolicy=42 is outside the allowed range [ 0 … 1 ]
Improperly specified VM option ‘ThreadPriorityPolicy=42’
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.”

Possible solution #1
Migrate to Linux SUSE or a Red Hat family version of Linux (e.g.,

How Do You Use a Generator and the Yield Keyword in Python?

Problem scenario
You want to use a generator in Python.  You also want to use the yield keyword in Python.  How do you use these?

Solution
The short answer to the question about how do you use a generator is to create a function with the yield keyword (source Programiz.com).  “Both yield and return will return some value from a function.”  (The source of this quote is 

How Do You Create Your Own Dockerfile to Create a Flask Application?

Problem scenario
You want to use Flask inside a Docker container.  You want to build your own image for the Docker container.  How do you create your own Dockerfile to create a Flask application?

Solution
Prerequisite

Install Docker.  See this posting if you need directions.

Procedures
1.  Create a Dockerfile with the following content (you may want to replace “16.04” with “latest” and if you want to change the location of where the .py file is,

How Do You Install Ansible on a Debian Linux Server Running in GCP?

Problem scenario
You are using Google Cloud Platform, and you have a Debian server.  You do not want to configure any PPAs for your system.*  How do you install and configure Ansible on a Debian Linux system?

Solution
Prerequisite

We strongly recommend having 2.5 GB of memory (either in RAM or with a combination of RAM and swap space).   For directions on how to configure swap space in the amount of 2 GB,

How Do You Use GCP’s App Engine?

Problem scenario
You want to leverage GCP’s serverless App Engine component with its scalability.  What do you do?

Solution
1.  Go to the cloud shell.  In the web UI of GCP in the upper righthand corner go to the icon that looks like this: “>_” and click on it.  From cloud shell run these commands:

git clone https://github.com/GoogleCloudPlatform/python-docs-samples

cd python-docs-samples/appengine/standard_python37/hello_world

virtualenv –python python3 ~/envs/hello_world

source ~/envs/hello_world/bin/activate

pip install -r requirements.txt

python main.py

2. 

How Do You Create a Docker Image That Has Java 10 in It?

Problem scenario
You want to create Docker containers with Java 9.  How do you create a Docker image to make containers with Java 9 installed in them?

These directions were updated on 12/26/18.

Solution
Prerequisite

This assumes that you have Docker installed. If you need assistance with this, see these postings depending on your operating system:

Debian/Ubuntu
CentOS/Fedora/RHEL
SUSE

Procedures
1. 

How Do You Troubleshoot the SonarQube Service Not Working with a “vendor preset: disabled” Error?

Problem scenario
The SonarQube service failed to start.  

You see this message:

? sonar.service – SonarQube service
   Loaded: loaded (/etc/systemd/system/sonar.service; enabled; vendor preset: disabled)
   Active: failed (Result: start-limit) since Mon 2018-05-21 14:34:34 UTC; 12min ago

May 21 14:34:33 sonarserver systemd[1]: Started SonarQube service.
May 21 14:34:34 sonarserver systemd[1]: sonar.service holdoff time over, scheduling restart.
May 21 14:34:34 sonarserver systemd[1]: start request repeated too quickly for sonar.service
May 21 14:34:34 sonarserver systemd[1]: Failed to start SonarQube service.