HOW TO SETUP A SECURE ELASTICSEACH 5.5.1 SEVER WITH X-PACK- Amazon EC2

ELASTICSEACH 5.5.1 SEVER WITH X-PACK

From last article and another one, we can understand what is Elasticseach  and how to install, how to make Dockerfile and Elasticsearch configuration. In this post we will go through to setup Elasticsearch 5.5.1 server, with X-PACK to secure your Elasticsearch Server.

Assume that you have AWS EC2 Instance with Ubuntu 16.04 LTS or on your Local Environment.

Elasticsearch Installation

With Aws EC2 instance that have an Ubuntu 16.04 base image.  We need to set up the JAVA environment (JAVA SDK): OpenJDK and OpenJRE.  Next, let’s add Elastic APT repository with Ubuntu ans install elasticsearch itself.

#Install OpenJDK and JRE

$ sudo apt-get install default-jdk -y

$ sudo apt-get install openjdk-8-jre -y

$ sudo apt-get update

#Add the Elasticsearch APT repo in your package source list

$ echo "deb https://artifacts.elastic.co/packages/5.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-5.x.list

#signing_key and update repository

$ sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv D88E42B4

$ sudo apt-get install apt-transport-https -y


#install elasticsearch

$ sudo apt-get update -y
$ sudo apt-get install elasticsearch -y

Continue reading

Advertisements

How to make Dockerfile for Elasticsearch | How to Install and Configure Elasticsearch with the Docker

ELASTICSEARCH 

Elasticsearch is a popular open-source search and analytics engine for use cases such as log analytics, real-time application monitoring, and click stream analytics.

Elasticsearch  is a search server based on Lucene. Elasticsearch is developed in Java and is released as open source under the terms of the Apache License. Elasticsearch is the most popular enterprise search engine followed by “Apache Solr”, also based on Lucene.

To know more please click here

So here in this article we have to learn that how to write Dockerfile for Elasticsearch v2.4.5  and build Elasticsearch’s Docker image and run a Docker Container.

For the above things we have to follow these steps and assume that you have Linux OS in your system and Docker engine are running.

  1. Make a Docker file with Ubuntu 16.04 Base image
  2. Build Image from Dockerfile
  3. Run Docker Container
  4. To configure your elasticsearch server execute the container and configure as per your requirements

Continue reading

How to Generate pem file to ssh the server without Password in Linux

ssh by pem file to Access Server

It is a standard procedure, now how to make this work without using password, using just a .pem file?

PEM

PEM or Privacy Enhanced Mail is a Base64 encoded DER certificate.  PEM certificates are frequently used for web servers as they can easily be translated into readable data using a simple text editor.  Generally when a PEM encoded file is opened in a text editor, it contains very distinct headers and footers.

PEM is a widely used encoding format for security certificates. Syntax and content is defined by X.509 v3 standards for digital certificates, defined in IETF RFC 5280 specifications. The main file extensions are .pem, .crt, .ca-bundle. Continue reading

Understand Continuous Integration And Deployment With Jenkins –Life Cycle: Before You Regret

Deployment Should be…

  • Simple
  • Stable
  • Fast
  • Reliable & one click

Continuous Integration and deployment with Jenkins – Life cycle:

1.Continuous integration

Continuous integration is the process of merging development works with the branch(code) several times in a day constantly. Most of the work here is done by automated.
Continue reading

Dive into Java Method Overloading

Method overloading allows a class to have two or more methods having same name. But there are some conditions applied if you overload a method. Let’s discuss on then.

First of all we should know “ Why do we use method overloading in Java?” .

Suppose we have to perform addition of given number but there can be any number of arguments, if we write method such as methodAddTwoNo(int a, int b) for two arguments, methodAddThreeNo(int a, int b, int c) for three arguments then it is very difficult for you and other programmer to understand purpose or behaviors of method they can not identify purpose of method. So we use method overloading to easily figure out the program. For example above two methods we can write sum(int a, int b) and sum(int a, int b, int c) using method overloading concept.

So it is clear that to achieve method overloading concept methods should have same name but with different parameters.

But what will happen if we put methods name same and also the same parameters.

Let’s see: Continue reading

Implement Android Data Binding library in your android app: Part-2

In Part-1 we discussed about how to implement Android Data Binding library in your android app. In this part we will see how we can bind data within our layout xml files and also the clickListeners on buttons.

Data-binding layout files are slightly different and start with a root tag of layout followed by a data element and a view root element. This view element is what your root would be in a non-binding layout file. A sample file looks like this: Continue reading

RecyclerView with EndlessScroll With Android Data Binding

A common application feature is to load automatically more items as the user scrolls through the items (aka infinite scroll). This is done by triggering a request for more data once the user crosses a threshold of remaining items before they’ve hit the end.

Implementing endless pagination for RecyclerView requires the following steps:

  1. Copy over the EndlessRecyclerViewOnScrollListener.java into your application. This is an abstract class.
  2. Now call addOnScrollListener() on your RecyclerView to enable endless scrolling and pass EndlessRecyclerViewOnScollListener as parameter in addOnScrollListener() and implement onLoadMore() method which would be called when user scroll down bottom in the list.
  3. In onLoadMore() method load your data using an api or some source from where you are fetching data.

Continue reading

Let’s implement Android Data Binding library in your android app: Part-1

Now there is no need for the third party libraries to bind views and data for better coding, because android recently introduced a new feature for this.

Android Data Binding is one of the most interesting feature recently introduced but still in beta version.

Android Data Binding exist between app presentation layer and data model layer that holds the information to show. Continue reading

Backup Of MySQL Database To Amazon S3 Using BASH Script Is Not Rocket Science! Learn Them Now!

s3backupBackup of MySQL Database to Amazon S3 using BASH Script

This is a easy way to backup your Mysql Database  to Amazon S3 for a regular interval backup – this is all to be done on your server.

First need to have the checklist  i.e must important for the any task you want to do in a proper way.

  • S3cmd  command line configure on server
  • A bucket over S3 to store dump file
  • Make Bash Script  i.e Contains MySQL Credential ( Hostname, Username, DB Name ), Location on your server where you want to store dump (PATH), Log Path.
  • Give chmod  +x on mysqlbackup Script (mysql.sh)
  • Test it and check S3 bucket
  • Schedule with cron as per your requirement

Continue reading

All You Need To Know About Configuration Management Tools For DevOps Engineer.

devops-toolsConfiguration Management Tools for DevOps

DevOps   is a combination of software development and operations — and as its name suggests, it’s a melding of these two disciplines in order to emphasize communication, collaboration, and cohesion between the traditionally separate developer and IT operations teams.

In the past, To maintaining IT infrastructure, deploying applications, and provisioning environments we have to involved in many manual efforts, iterative tasks. But in today’s DevOps platform, true automation of these tasks has arrived. The most benefits of automated configuration management range from time savings to elimination of human error. Continue reading