kafka + OCP and random

So we have Docker, K8 and OCP.  Quick review below.

View story at Medium.com

https://docs.google.com/presentation/d/1fDWgL26ebC8jkUxyLP4v-iw_jqiJDGnc-rCH-gzfO6w/edit#slide=id.g4b03b719b_266

https://sysdig.com/blog/understanding-how-kubernetes-services-dns-work/

Good read why Databases should not live in containers —

https://myopsblog.wordpress.com/2017/02/06/why-databases-is-not-for-containers/#comments

Software Defined Arch

All DevOps crews should publish something similar…

https://gitlab.com/gitlab-com/runbooks

Sweet A tut on InSpec – take it to Ansible

https://www.10thmagnitude.com/tech-blog/compliance-code-introduction-inspec/

http://www.anniehedgie.com/inspec-basics-1

http://rubular.com/

https://github.com/chef-training/workshops

ANSIBLE

https://www.linode.com/docs/applications/ansible/getting-started-with-ansible

https://valdhaus.co/writings/ansible-post-install/

https://code.tutsplus.com/tutorials/automate-all-the-things-with-ansible-part-one–cms-25931

https://code.tutsplus.com/tutorials/automate-all-the-things-with-ansible-part-two–cms-25940

Use the Vault please

https://serversforhackers.com/video/ansible-using-vault

Micro Services or Microservices

https://dzone.com/articles/introduction-to-microservices-part-1?utm_source=Microservices%20Bundle&utm_campaign=Monday%20Email%2B2017-02-20&utm_medium=email

https://dzone.com/articles/microservices-and-docker-at-scale?edition=268935&utm_source=Spotlight&utm_medium=email&utm_campaign=devops%202017-02-10

Spring Boot Quick Start

https://dzone.com/articles/spring-boot-a-quick-start?edition=271881&utm_source=Daily%20Digest&utm_medium=email&utm_campaign=dd%202017-02-17

Jenkins Declares

https://dzone.com/articles/announcing-general-availability-of-declarative-pip?edition=154264&utm_source=Weekly%20Digest&utm_source=Weekly%20Digest&utm_medium=email&utm_medium=email&utm_campaign=wd%202017-02-08&utm_campaign=wd%202017-02-08

https://jenkins.io/blog/2017/02/07/declarative-maven-project/

Need to collect some thoughts, links for various messaging on OCP.

Of course there is simple queues – JMS, rabbitmq, ActiveMQ

Need streaming and plugins to data sources..

Kafka —

OCP + Kafka

DEMO — https://github.com/sabre1041/fis-kafka

Deployment on OCP — https://github.com/redhat-cop/containers-quickstarts/tree/master/kafka

A potential mix – remove dcos – integrate OCP

http://www.cakesolutions.net/teamblogs/smack-stack-on-dcos

 

 

Advertisements

I Love Logging

With the MO of  “get all into splunk or else” – ran into some OCP/k8 challenges aggregating all logs to get to splunk.  Nothing native in OCP..

 

So digging around:

https://github.com/kubernetes/kubernetes/issues/24677

various options dealing with aggregation to include container logs.

 k8 logging — https://kubernetes.io/docs/user-guide/logging/overview/

OCP-EFK — https://docs.openshift.com/container-platform/3.4/install_config/aggregate_logging.html

Nice OCP Logging Overview – http://playbooks-rhtconsulting.rhcloud.com/playbooks/installation/logging.html

Have a Splunk agent on the nodes is great but doesn’t capture the container logs.  So leverage the EFK stack – where it aggregates — fluentd.

Using the fleuntd secure forward plugin (SFP) to forward EFK logs to an external fluentd which has the fluentd file output plugin which gets picked up by the Splunk forwarding agent.

Logging Roundup 

https://sematext.com/blog/2016/09/13/logstash-alternatives/

https://www.slant.co/topics/326/~best-log-aggregation-monitoring-tools

 

 

 

 

boot2docker FATA[0000] Virtual box host only network adapter issue. Sometimes after MAC sleeps

FATA[0000] xxxxxxx: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?

Docker SSH error
Docker SSH error

 Temporary solution.

1.Open virtualbox and check the network settings on the boot2docker vm to see what the host only adapter is named. e.g.  vboxnet0;  vboxnet1.

Named host only adapter

Then, apply this command:

sudo route -nv add -net 192.168.59 -interface vboxnet0

more on github https://github.com/boot2docker/boot2docker/issues/392#issuecomment-61999567

MAC Book Pro – Frozen – blank screen

MacBook Pro – unresponsive, semi-backlit blank screen

Symptoms:

no display – backlight came on after power up but no just a blank dark semi-light screen. Power reset multiple times – no love.

Diagnostics:

Attempted common startup combinations

D

CRTL-D

CRTL-R

 

FIX:

Need to reset system management controller!  Stuck in hibernation…

Step 1.  Hold down shift + CTRL + OPTION + Power   for 5 seconds

Observations:   Nothing should happen – no power up – zero

Step 2.  Hold down  CMD + OPTION + P + R + Power  ( Finger Twister)  until you hear 2 Apple startup chimes.

Thats it!  You should be back in  business.

Oracle Java on EC2

Why does it have to be so ‘silly’.  All I want is to install Oracle Java from the CLI (Linux).

 

Here is the challenge (Oracle):

Before the file can be downloaded, you must accept the license agreement.

Well works fine from a browser…easy to accept.

Options:

  1. Download the file from a command-line web browser
  2. Download the file from a different device which has a GUI web browser and copy it to your machine
  3. Cheat the Oracle’s web server

Steps that can be used to automate this and download from the CLI using wget.

Downloading the installation file:

What the Oracle’s download page does, is to create a cookie in the browser when the user selects “Accept Licence Agreement”. This cookie is sent to the server as a HTTP Header parameter when the file is requested. But, because we are not using a browser to request the file, we will have to do it in another way which allow us to send the header information. One way is to use the wget command. This command is a free utility for non-interactive download of files from the Web. It supports HTTP, HTTPS, and FTP protocols, as well as retrieval through HTTP proxies. It has a parameter, –header, that adds header information to the request. Given this information, all we need to do is to run the following command to download the Java 8 JDK:

WARNING: By using this method, you are still agreeing with the Oracle Binary Code License Agreement for the Java SE.

wget c nocookies nocheckcertificate header “Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie” http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.rpm” outputdocument=“jdk-8u5-linux-x64.rpm”

The otn-pub within the url is critical as this is not the link displayed on the oracle site.  Replace 8u5-b13/jdk-8u5-linux-x64.rpm  with whatever version is required.

Installation:

sudo rpm i jdk8u5linuxx64.rpm

Register the environment variable JAVA_HOME and define the command java to the new installation (in case you have other versions installed, such as OpenJDK or an older Oracle’s Java version).

sudo alternatives install /usr/bin/java java /usr/java/default/bin/java 20000

export JAVA_HOME=/usr/java/default

VERIFY

java version

Version is still incorrect?

Remove current default:

sudo alternatives remove java/usr/lib/jvm/jre1.7.0openjdk.x86_64/bin/java

sudo alternatives install /usr/bin/java java /usr/java/default/bin/java 20000

Select an available Java version:

sudo alternatives install /usr/bin/java java /usr/java/default/bin/java 20000

echo 2 | /usr/sbin/alternatives config java

Depending on your use of the EC2 instance you may need to set child links:

http://bad-concurrency.blogspot.de/2014/01/linux-alternatives-and-oracle-java.html

References:

http://linux.about.com/od/commands/l/blcmdl1_wget.htm

https://parijatmishra.wordpress.com/2013/03/09/oraclesun-jdk-on-ec2-amazon-linux/

http://blog.de-gouveia.eu/2014/05/21/java-8-jdk-linux-installation-in-ec2-linux-instance/

https://access.redhat.com/documentation/en-US/JBoss_Communications_Platform/5.0/html/Platform_Installation_Guide/sect-Configuring_Java.html

 Hope this helps