Sunday, 2 April 2017

DevOps Realtime Interview Questions

1
DevOps Real-time Interview Questions which I had faced .
 (One of Top MNC).
1  1.  Tell me about yourself?
2  2.    How to build artefacts in Jenkins?
3  3.      How to install Jenkins plugins without internet?
4  4.      Have you configure slaves in your Jenkins environment? If yes then what’s the  
    5.  procedure to crates slaves? What is the advantage is mater slave architecture?
5  6.      Are you configure Maven, TFS, Git, Java, Junit…etc in Jenkins? if yes how you      did?
6  7.      How to get the outside files to inside Docker container?
7  8.      What are the issues you are facing in Jenkins?
8  9.      What is pipeline? Are you involve to develop pipeline script?
9 10.     Are you involve to write shell script? If yes for what purpose are you write shell      script?
1  11. Why pipeline we are using?
1  12. Are you involve in maven script?

Friday, 17 March 2017

Install GNOME Desktop on Centos 7 minimal

1.       Install GNOME Desktop Environment use below command.

# yum -y groups install "GNOME Desktop"




 If you will get like this you need to follow below steps.
2.       Check the network configuration in your machine.
3.       Type “nmcli d” command in your terminal for quick identification of Ethernet cards installed in your machine.
          You will get output ens33 ethernet disconnected
          If you see the above result now you will setup network for your system.
4.        Network interface config files are located in /etc/sysconfig/network-scripts/ directory. Open ifcfg-ens33 file ( For interface ens33 ) in your case may be different Device name and you can see the content like below.



Now check the DHCP configuration.

5.        For DHCP Find the below lines in config File.


                                                          ONBOOT=no
            and replace with
                                                         ONBOOT= YES

          And if you have BOOTPROTP=none replace with  BOOTPROTP=dhcp  and save the file.

6.       Now Restart network service by typing below command.

                          #  systemctl restart network

       Now your server will get IP Address from DHCP
7.       Now we will configure  Static configuration.
Add below two lines end of the your configuration file.
DNS1 =8.8.8.8
DNS2=8.8.4.4
       Now Restart network service by typing below command.
                         #  systemctl restart network
       Now Interface will have static IP.

8.       Additionally you can use /etc/sysconfig/network file for hostname and DNS  and save.


Now try step 1 again .
# yum -y groups install "GNOME Desktop"

Once complete installation.
9.       Type command startx.


#startx

10.   GNOME Desktop Environment will start. For first booting, initial setup runs and you have to configure it for first time.
a.       Select System language first.
b.      Select your keyboard type.
c.       Add online accounts if you'd like to.
d.      Finally click "Start using CentOS Linux".
11.   GNOME Desktop Environments starts like follows.



Happy learning.

Wednesday, 6 April 2016

Install splunk 6.4.0 in ubuntu 14.04LTS


First check your operating system configuration. Based on that download splunk .In my caase I downloaded 64bit.
If you want to check your operating system configuration use uname –a command


Download .deb file .If you are new user it will ask registration once completed registration. Now you can download the file.


After download is completed you can install it using dpkg command like below.
dpkg -i /home/madhu/Downloads/splunk-6.4.0-f2c836328108-linux-2.6-amd64.deb

then you will get like below.

Selecting  previously  unselected package splunk.
(Reading database ... 20803 files and directories currently installed.)
Unpacking splunk (from splunk-6.4.0-204106-linux-2.6-amd64.deb) .
Setting up splunk (6.0.3-204106) .
Complete


Next we need to create the init.d script so that we can easily start and stop Splunk.Change the 
Splunk directory and run the splunk executable with the below arguments.

1
2
 cd /opt/splunk/bin/
   ./splunk enable boot-start



Now it will ask licence and agreement then enter  Y  for accepting licence.

Now start the splunk service

Sudo /opt/splunk/bin/splunk start
Now you can access splunk web ui  http://ipaddress:8000  or its created ui base on your  account like
http://madhu-vb:8000

By default login credentials  is
User name: admin
Password  : changeme




Tuesday, 16 February 2016

Write a java program to Remove duplicate characters in a given String ?

Write a java program to Remove duplicate characters in a given String ?

import java.util.LinkedHashSet;
import java.util.Scanner;
import java.util.Set;

public class RemoveDuplicateCharacters {
      public String removeDuplicates(String input) {
            Set<Character> set = new LinkedHashSet<>();
            for (int i = 0; i < input.length(); i++) {
                  set.add(input.charAt(i));
            }
            StringBuilder sb = new StringBuilder();
            for (Character c : set) {
                  sb.append(c);
            }
            return sb.toString();
      }
      public static void main(String[] args) {
            RemoveDuplicateCharacters rd = new RemoveDuplicateCharacters();
            Scanner scanner = new Scanner(System.in);
            System.out.println("Please enter a String:");
            String input = scanner.next();
            System.out.println("RESULT IS : "+rd.removeDuplicates(input));
      }
}

Ouput:
Please enter a String:
mmmaaadddhhhuuu

RESULT IS : madhu 

Monday, 15 February 2016

What is Differences between Hadoop and RDBMS ?


Diffrences Between Hadoop And RDBMS





RDBMS

HADOOP
Data size
Gigabytes
Petabytes
Access
Interactive and batch
Batch
Updates
Read and write many
Write and read many
Structure
Static schema
Dynamic schema
Integrity
High Normalisation
Low Normalisation
Scalling
Non Linear
Linear


What is differences between Apache Hive and RDBMS ?



What is differences between Apache Hive and RDBMS ?
                      
                              Hive

                           
                              RDBS
SQL  Interface

SQL  Interface

Focus  on  analytics

May  focus  on  online  or  analytics.

No  transactions.

Transactions  usually  supported.

Partition  adds,  no  random  INSERTs. In‐Place  updates  not  natively  supported  
(but   are  possible).

Random  INSERT  and  UPDATE  supported.  

Distributed  processing  via  map/reduce.

Distributed  processing  varies  by  vendor  
(if  available).

Scales  to  hundreds  of  nodes

Seldom  scale  beyond  20  nodes
Built  for  commodity  hardware
Often  built  on  proprietary  hardware   (especially  when  scaling  out).

Low  cost  per  peta byte.

What’s  a  peta byte? J



Sunday, 14 February 2016

Write a Java Program Without using reverse function?

Write a Java Program Without using reverse Funtion?

import java.util.Scanner;

public class ReverseStringWithoutReverseFunction {

       public static String reverse(String str) {
              StringBuilder sb = new StringBuilder();
              char[] string = str.toCharArray();
              for (int i = string.length - 1; i >= 0; i--) {
                     sb.append(string[i]);
              }
              System.out.println(sb.toString());
              return sb.toString();
       }

       public static void main(String[] args) {
              Scanner keyboard = new Scanner(System.in);
              System.out.println("Enter a String:");
              String input = keyboard.next();
              reverse(input);
       }

}