How to setup kubernetes on windows WSL

How do I setup Kubernetes and run kubectl commands from windows machine

WSL(Windows subsystems linux) can be leveraged when you want to run kubectl commands from windows machine. Steps as below,

  1. Enable WSL with Kalilinux
  2. Install Windows Docker
  3. Create docker hub account and link account to Windows docker
  4. In Windows docker, go to settings
  5. Then enable Kubernetes
  6. Setup Persistent volume claim (pvc) by creating a yaml configuration for this.
  7. Run kubectl apply to yaml file
  8. When creating pods, or does kubectl deployment, make sure volume mounting done based on pvc
  9. Verify pod status by accessing commandline to docker containet directories

How to configure Sonarqube Jenkins integration

How to configure sonarqube in jenkins?

SonarQube is code quality checker and that can be integrated to Jenkins workflow to deliver continuous inspection.
Configuration steps as follows:SonarQube:1. Do a SonarQube docker image pull from docker hub 2. Then use docker run command to run the image to build SonarQube container.(Assumption JDK is already setup on the machine) if not , we need to docker containerized JDK.3. Now that step 2 allows us to run the SonarQube as a standalone server under localhost port 9000. (Type localhost:9000 on browser)4.login to SonarQube web app using admin as user I’d and admin as password.5. The go to Admin tab , Market place of SonarQube and install the plugins you wanted (SonarPython, Java, Groovy etc)6. You may need to restart SonarQube app after applying plugin installation.
Jenkins integration with Sonar1. Now that Sonar Server is ready, you may need to integrate Jenkins with Sonar.2. Login on to Jenkins, and go to Manage plugin section to install Sonar plugin.3. After restarting Jenkins, go the Configure system in Manage Jenkins section.4. Enable injection of Sonarserver,  add Sonar server auth token etc.
Now, Enable Analysis with Sonar scanner by defining the SonarQube server on Global configuration Then configure Jenkins build

What is contract testing

What is contract testing?

Contract testing is famous in microservices world. When we consider less numbers of microservices,  then contract testing is not so necessary.However when you look at the Amazon or Netflix microservices mesh, it is countless. Such cases it is extremely difficult for developer or tester to maintain unit/automation test suite as per the microservices development chnages.
Contract testing is the best possible solution currently offered for this situation. In contract testing, a mocked service is created to represent the provider.  There are commercial or opensource tools available to stimulate this. In short, contract is set of predefined requests and responses created by automation or developer team to do their testing.

How to read pdf content in java for automation project

How to read pdf content in java?

Apache PDFBox and FontBox jar available can be useful here. Add these two libraries to your Maven Pom.xml or build.gradle dependencies.
Then write java code to parse your PDF files to create POJOs.
What is POJO in javaPOJO stands for Plain java object and it has not restrictions or class path dependency.

What is google App Engine

What is Google’s App Engine ?

Google provides platform as service or PaaS via Google’s App Engine.App Engine is a cloud computing platform where development and hosting of applications can be done.Other feature is App engine scales up on demand basis when the requests are more.
App Engine supports almost all development technologies like Go, Java , Python, .NET, ruby.
Python web frameworks like Flask, Django all can run on App Engine.

How to setup angular project

How to setup Angular project and generate components ?

  1. install latest nodejs from nodejs.org
  2. Go to git bash/powershell ISE/CMD
  3. type following commands,
  4. install Angular : npm install -g @angular/cli
  5. ng new my-newweb-app
  6. ng g c myFirstModule or type mg generate component myFirstModule (optional)
  7. go to project folder ” my-newweb-app ” via commandline itself
  8. type mg serve -o

Other programming notes

select [(ngModel)]=”value” (change)=”selected()”

option *ngFor=”let item of data” [ngValue]=”item”>{{item.name}}</option
</select

selected(){
alert(this.value.name)
}

data:Array = [
{id: 0, name: “Test “},
{id: 1, name: “Test2”}
];

div>  <input ref-email placeholder=”text here” />  </div

What is ELK

What is ELK (Elastic search, Logstash, Kibana) ?

ELK stack is a combination of 3 open-source products as below,

  1. Elasticsearch, a search and analytics engine.
  2. Logstash, that index the data to Elasticsearch. Logstash has a config file that has input,filter and output section. Config file looks like json file.
  3. Kibana, a visualization tool which provides a web based GUI for a user. User can design the bar, plot reporting charts.
    In order to make Kibana and Elasticsearch interact, you need to make both server up and running. Then logstash will index the data to Elasticsearch. 
    Then Kibana would read the data from Elasticsearch and visualize it.

DevOps vs DevSecOps vs NetOps

What is DevOps vs DevSecOps vs NetOps ?

DevOps is the practice of using set of tools, processes and practices to get good agility in software implementation to customers. It combines Dev (software development ) and Ops (information operations). DevOps shortens the development lifecycles and provides Continous Integration & Delivery. 
DevSecOps is when security features are included in DevOps CI/CD flow.
NetOps is when network services are packaged to DevOps.

Jenkins job vs pipeline

What is Jenkins jobs and Jenkins pipeline ?

Jenkins jobs and Jenkins pipeline are essentially same, however pipeline is more staged flow of jobs. For Jenkins pipeline, Jenkinsfile is used.
What is Jenkinsfile?Jenkinsfile is a text file placed in the root project directory. The Jenkinsfile has multiple stages like build, unit test, sonar test, functional,  regression, integration,  performance testing, deployment etc.

What is Apache Kafka

Whats is Apache Kafka and Linkedin’s Initial contribution?

Apache Kafka was built by LinkedIn initially and then offered to Apache Foundation. Development was done using Java and Scala.
Why Kafka is able to handle high volume transactions?
Kafka is meant to handle high volume fractions as the way it is architectured. Message key value pairs are called as “procedures” in Kafka. The data are “partition”ed with in Kafka “topics”
Messages are strictly indexed with timestamps.
What is Kafka brokers ?Kafka brokers are clusters of one more servers. Kafka Partitions of topics are distributed across clusters.
Kafka is more effective compared to Java messaging services (JMS) or Advanced message queuing protocol (AMQP).