How Do You Access the Networking Port of a Docker Container When There Appears to Be No Port Mapping, Just a Single Port Exposed by Itself?

Problem scenario
You run “docker ps -a” and see values in the PORTS column.  You see values such as these for two separate containers:

Container 1 has this:  0.0.0.0:32775->5000/tcp

Container 2 has this:  5731/tcp

You cannot reach the containers that have no “->” symbol in them via web browsers or other network connectivity tools.  You can reach those containers with the “->” symbol in the PORTS value. 

 » Read more..

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” {
 

 » Read more..

Why Is There an Apparent Difference Between “docker run” and the Series of Two Commands “docker create” And “docker start”?

Problem scenario
When you run “docker run“, the container has a port that is exposed and the web application works properly.  When you use “docker create” then “docker start“, the service is not exposed properly. You believe that “docker run” the same as a series of two steps, first “docker create” then “docker start“.

 » Read more..

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. 

 » Read more..

How Do You Deploy Artifactory in a Docker Container?

Problem scenario
You want to install and configure Artifactory in a Docker container on Linux.  How do you do this?

Solution
Prerequisites
i.  You must have Docker installed.  If you need assistance, click on the link for your distribution of Linux:

ii. 

 » Read more..

How Do You Install Redis on an Ubuntu 16.x or an 18.x Server in AWS?

Updated 12/26/18

Problem scenario
You want to deploy (install and configured) Redis (an in-memory data store) to an Ubuntu 16.x or an 18.x server.  What do you do?

Solution
These directions were based on this external posting as they appeared on 3/25/18.

1.  Install some dependencies with these two commands:

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.

 » Read more..

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”)})”?

 » Read more..

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. 

 » Read more..

How Do You Install kubectl on a CentOS/RHEL/Fedora 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/