Monday, November 28, 2022

Maven

 

  • Maven is an OS, Java Based, Build tool.
  • Maven is going to support only "Java Projects".
  • To create Packages/ Build Artifacts we will use Maven.
    • Java--------->  Ant, Maven, Gradle
    • .Net ---------> Nant, MS-Build
    • Python------> PYBuilder
    • Puby--------> Rake
    • JS, Node JS, Angular-------> Grunt, Gulp 
1. How to know which version we are using?

        cat /etc/release                     (Latest version is ---11)

Types of Applications in Java:
  • Java Standalone apps
      • Jar------Java Archive
      • Java Code
      • .Class-files
  • Java Web apps
      • War------Web Archive
      • War = Jar + Web content ------(Html,CSS,js,XML,HTMLImage)
  • Java Enterprise Apps
      • Ear------Enterprise Archive
      • Ear =  Jar + 1 War
Default Build Script File Name

        Pom.xml -------------------- Package Object Model

<project>

<groupId>         com.Company_Name      </groupId>
<artifactId>       Project_Name                 </artifactId>
<packaging>     jar                                   </packaging>
<version>         0.0.1-SNAPSHOT        </version>
</project>

        
2. Is it possible to change the Pom.xml file name?
    Yes 
    Maybe didn't we can give it. I didn't try it
  • Along with the Source Code Developer will prepare Build Script also.
Directory Structure:
  • Bin:      binaries--mvn   
  • Conf:    Settings.xml
  • Lib:       libraries---java files
  • Boot:
Installation:
  • Java 8 -----Java 1.8
  • java -version
  • mvn -version
Maven Repositories:
  • Maven Local Repo
    • C:\Users\Reddy Shekar\.m2\repository------------Windows
    • /home/ReddySekhar/.m2/repository----------------Linux
  • Maven Central Repo
    • it will be by the Maven community team.
Remote Repo
    • It will be used within the organization
3. Is there any chance of changing the default path to a custom one?
      
    Yes Can change that custom path
  • Setting.xml
    • LocalRepository <Tag>

 Maven life Cycles:

life Cycles              Goals

Clean----------------It will delete the previous build files.
Site------------------To generate a document for your source code.
Default-------------
  • Validate------------It will validate your project Structure and resource files.
  • Compile-----------It will compile your source code.
  • Test----------------It will use to run Junit Test cases.
  • Package-----------It will create packages / Build Artifacts.
  • Install-------------It will store your build Build Artifacts in a local Repo.
  • Deploy-----------It will store your build Build Artifacts in a Remote Repo.
4. What is the difference between the Maven Local Repo & Remote Repo?
  • Install-------------It will store your build Build Artifacts in a local Repo.
  • Deploy-----------It will store your build Build Artifacts in a Remote Repo.
5. How to skip the Test cases?
    
    



Thursday, November 17, 2022

AWS--Sree

 

 AWS
=========================================================================

Class:01

Introduction

Class:02

North Virginia  (Zone US-EAST-1)--------------> 6 Availability 

mslookup www.paytm.com

IP addressing:-

IPV4------------>32 Bit size----------------192.168.33.1 *************

IPV6------------>128 Bit Size---------------fe80::314f:50bb:42fa:743a%5


0.0.0.0 to 255.255.255.255------------------------>R F C 1918


  • Class A        1.0.0.1        to    126.255.255.254            {Public IP's}-----Hallticket No: ABCD1234
  •                     10.0.0.0      to    10.255.255.255              {Private IP's}----Roll no:56      
  • Class B       128.1.0.1     to    191.255.255.254
  • Class C       192.0.1.1     to   223.255.254.254
  • Class D       Reserved
  • Class E       Reserved


NAT:- (Network Address Translation)

  • Private IP is not internet routable,
  • To route to the internet, we are going to use a device called a Gateway router,
  • Which will convert Private IP addresses to public IPs wise versa, called Network Address Translation (NAT).
Read more »

Thursday, November 10, 2022

Youtube

 GIT

001. What is git reset? types of git reset?

002. How to delete the local branch & remote branch in git?
  • Local branch:  git branch -D <bn>
  • Remote branch: git push origin --delete <bn>
003. Difference between git diff and git status?
  • git diff: 
  • git status:
004. What are hooks in git?
  • Hooks are special scripts
  • it will be execute before or after a certain commands
005. What is the importance .git directory?
  • branch
  • config
  • hooks
  • info
  • logs
  • HEAD
  • Objects
006. What are the branches, and differences between remote and local branches?
007. What Branching strategy that you are familiar with?
  • Master (or) main
  • Development
  • Feature/01
  • Feature/02
  • Creata a PR
  • qa
  • dev
  • pre-pord
  • master-main
  • tag
008. What is PR (Pull Request)? What's the importance of PR?
009. Which version of git you have used? 
  • git version
  • git version 2.17.1
011. What is git squash?
git merge --squash <bn>
012. Command to list all commits?
     git log
git log --oneline




Linux & Shell Script:

001. Command to find empty files in a given directory ?
    find . -empty
002. Commands you will use it for configuring ssh connectivity between 2 machines and what files                 will  be  present in .ssh folder ?
  • First we need to private key & public key to connect
  • ssh-keygen
  • ~/.ssh
  • id_rsa-------id_rsa.pub----know_hosts----authorised_key
003. How to schedule a shell script in unix machine?
Crontab
004. Command to get load average?
    top
005. Need to identify IP Address in log file and count IP addresses in log file ?
  • git clone git@github.com:Sundupalli/Unix_and_shell-Deekshith.git  
  • grep -E -o "([0-9]{1,3}[.]){3}[0-9]{1,3}" logfile | sort | uniq -c | sort -nr
006. What is command for checking the running process? how to get PID of process?
  • ps
  • ps -eaf
007. Command to get whether certain port is listing or not?
netstat -tunlap
008. How to identify the number of parameters that has been sent to shell script?
vi test.sh
sh test.sh
sh test.sh 3 4 6 
vi sh test.sh 3 4 6 7
echo "Hello world"
echo "The number of parameters $#"
ans:-  Hello world
The number of parameters 4
009. Command to delete empty line in a file?  
  • sed '/^$/d' test.sh
  • sed -i '/^$/d' test.sh
010. What is exit status?
echo $?
011. Given machine, how will you identify which machine it is?
uname -a

Shell Scripting By Udemy

 echo $SHELL   

chsh -s /bin/bash

Class 02 [ Shells vs Scripts ]

  • What is the Bash shell is 
    •  A "Program" that "interprets" the commands you type in your terminal and "passes" them on to the "Operating System".

    • BASH = Bourne Again Shell
    • Based on the Bourne Shell (sh), Created by Stephen Bourne in 1979.
    • its feature-rich.
    • Its fast
    • Its very common.
  • The difference between shell and scripts
    • A Shell script is a file containing commands for the shell.
    • A Bash script is simply a file containing commands for the Bash shell.
  • Why Bash is more popular
  • Why Scripting is a useful skill to learn...
Questions
  1. What is a bash script?
    1. A Bash script contains a list of commands specifically for the Bash shell.
  2. A shell is a program that interprets commands and passes them on to the operating system?
    1. True
  3. A benefit of bash is that it has a lot of features
    1. True
  4. Why should you write a script?
    1. The main benefits of writing scripts is to help you automate tasks and save you time
Class 03 [ Bash Script Structure - Part 1 - Core Components ]
  • file <File_name>
    • #!/bin/bash----------------------------------------------> Shebang line
    • #!/usr/bin/python3
    • Exit Statement  ( 0 = Sucessfull ; 1-255 = Unsucessfull )

  • #!/bin/bash
  • echo "This is my first Script"
  • exit 0
after that, we need to check the permission of the particular file.
ls
give permission to the file
chmod +x <File_name>
run the file
./<File_name>

Class 04 [ Bash Script Structure - Part 2 - Professional Components ]

 Comments:
   Single line Comments -----------#
   Double line Comments----------

# Author: Y Reddy Sekhar
# Date Created: 10-11-2022
# Last Modified: 10-11-2022

# Description 
# Prints "This is my first script" to the terminal

# Usage
# Provide file name here...

Class 05 [ Setting up Secure Script Permissions ]
  • The basics of file permissions
  • Setting file permission on your script
ls-l
chmod 744 <File_name>
chmod 777 <File_name>

Class 06 [ Project: Backup Script ]
File downloaded on your personal computer go and see it...

 

Class 07 [ Backup Script - Project Solution ]
                    While doing practice watch again.

Class 08 [ Adding scripts to your PATH ]
  • What is the PATH Variable?
  • How to add directories to your PATH Variable
echo "$PATH"

Class 09 [ Section Summary ]
        Document downloaded


 










    Labels: