Thursday, October 22, 2020

Design pattern discussion

 Design pattern

Design pattern represents a industrial best practice that is used by experienced developer. Design pattern concept is needed to develop a framework or understand the framework coding.

Type:

  1. Creational Patterns: Discuss about a object create by hiding object creation logic.  
  2. Structural Patterns: Structural patterns are concerned with how classes and objects are composed to form larger structures.
  3. Behavioral Patterns: These design patterns are specifically concerned with communication between objects.

Design Pattern - Factory Pattern  (EASY)

Design Pattern - Abstract Factory Pattern (EASY)

Design Pattern - Singleton Pattern

Singleton pattern is one of the simplest design patterns in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.

This pattern involves a single class which is responsible to create an object while making sure that only single object gets created. This class provides a way to access its only object which can be accessed directly without need to instantiate the object of the class.


Implementation Example: Database connection. Connection will be created only one time.


REf: https://www.tutorialspoint.com/design_pattern/singleton_pattern.htm

Design Patterns - Builder Pattern


Sunday, October 18, 2020

Devops: Jenkins

  •  https://www.youtube.com/watch?v=FX322RVNGj4 (start from 32.00 min)(****)
  1. Show how to configure email (SMPT) 
  2. show to how to run simple build
  3. show how to build from git command
  4. show how to build from git and deploy to tomcat server autmatically (VVI)
  5. show how to create master slave node in jenkins (VVI)
  6. creating pipeline to run multiple job (2:00 hour later) (VVI)
  7. also show pipeline using groovy scripting

What is the role of configuration managemnet:

 Helps in administrating and managing several server and maintains intregety of the entire infrastructure

How does continues monitoring help in maintaining the entrie architecture of the system.

Continues monitoring in devops is a process of detecting, identifying and reporting any faults or threates in the entire infrastructure of the system.


Sunday, October 4, 2020

Code deploy to EC2 using pipeline (code build ad code deploy)

 https://www.youtube.com/watch?v=ND8hujOoZ14


https://docs.aws.amazon.com/codepipeline/latest/userguide/tutorials-simple-codecommit.html



Create a git repository


for code deploy need two role

  • – AmazonEC2RoleforAWSCodeDeploy

  • AWSCodeDeployRole










******************************************************************









************************************************************



















#!/bin/bash
yum -y update
yum install -y ruby
yum install -y aws-cli
cd /home/ec2-user
aws s3 cp s3://aws-codedeploy-us-east-2/latest/install . --region us-east-2
chmod +x ./install
./install auto











Review the ec2 instance creattion





pipeline


Create pipeline







pipeline source storage






Add build stage:















Code build evnronment







****************************************************************************


CODE deploy





Create deployment group









Autoboxing and Unboxing

  Autoboxing  is the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper cl...