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. 

How Do You Install Docker on Different Distributions of Linux in Different Public Clouds or on an On-Premise Server?

Problem scenario
You want to install Docker.  You want directions for installing it with and without making changes to how packages are installed on the Linux server.  You want directions that apply to Linux servers in AWS, Azure, or GCP.  You want directions that can apply to CentOS/RHEL, SUSE, or Ubuntu.  What do you do?

Solution
Find the link below that is the most appropriate for your needs.

How Do You Troubleshoot the Cassandra Problem about “Connection refused”?

Problem Scenario
You have installed Apache Cassandra on Linux.  It is deployed as a single node configuration (not a cluster).  When you run “cqlsh” you get this error:

“Connection error: (‘Unable to connect to any servers’, {‘127.0.0.1’: error(111, “Tried connecting to [(‘127.0.0.1’, 9042)]. Last error: Connection refused”)})”

How do you troubleshoot cqlsh when you get this message “”Tried connecting to [(‘127.0.0.1’, 9042)]. Last error: Connection refused”)})”?

How Do You Install kubectl on a CentOS/RHEL/Fedora of Linux server?

Problem scenario
You want the kubectl command to work on a server running a Red Hat distribution of Linux.  How do you install kubectl on a CentOS/RHEL/Fedora Linux server?

Solution
#1  This assumes that you have access to the internet.  You can do it with these three commands:

cd /tmp

curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl

sudo mv kubectl /usr/local/bin/

(An alternative way with a .repo file that is more secure would be to use steps #1 through #3 of 

How Do You Deploy Graylog in a Docker Container?

Problem scenario
You want to set up (install and configure) Graylog from a Docker container.  What do you do?

Solution
1.  Verify you have a least two processors with this command:  cat /proc/cpuinfo | grep -ic processor

Was the output two or more?  If so, proceed.  If not, get a server with two processors.  If you are using an AWS EC-2 instance, see this link to add a processor. 

What is DevOps and Why Do People Want to Adopt It?

What is DevOps?
DevOps, among other things, is a business cultural shift that affects how labor is divided at different companies that adopt it. At the enterprise level, a company that embraces DevOps culture may have teams of employees focused on builds and releases or automation. These teams may be integrated with software engineers, systems administrators, quality assurance analysts, database administrators and security experts. A reduction itself in departments within I.T.

How Do You Install Golang on to Any Type of Linux?

Updated on 10/18/19

Problem scenario
You want to do some coding in the Go programming language.  You want a script to install Golang on any distribution of Linux (e.g., CentOS/Red Hat Enterprise Linux/Fedora, Debian/Ubuntu, or SUSE).  What do you do?

Solution
1.  Create a file in /tmp/ called go.sh with the following content:

version=1.10.8 # Change this version as needed
curl https://storage.googleapis.com/golang/go$version.linux-amd64.tar.gz /tmp/go$version.linux-amd64.tar.gz
cp /tmp/go$version.linux-amd64.tar.gz /usr/local/go$version.linux-amd64.tar.gz
cd /usr/local/
tar xzvf go$version.linux-amd64.tar.gz
#echo “export PATH=””$””PATH:/usr/local/go/bin” ~/.profile
echo “export PATH=””$””PATH:/usr/local/go/bin” /etc/profile.d/go.sh
echo “You will have to log out and log back in for go to work.”
echo “You can use the ‘go version’ command to determine what version was installed”

2. 

How Do You Demonstrate Recursion in a Sorting Algorithm Written in Python?

Problem scenario
You want to use recursion in Python in a sorting algorithm. How do you do this?

Solution
Save this program as contintsort.py and run it python contintsort.py. The code closer to the top is in Python 2, and the code closer to the bottom is in Python 3.

# Written by www.continualintegration.com
# Usage is self-explanatory. Just run the program. python contintsort.py
# No extra files are needed. …