Tuesday, 10 October 2017

                             DEVOPS Tools:
--------------------------------------------------------------------------------------------------------------

https://automationstepbystep.com/
- it is also sdlc approch like waterfall and agile model
-waterfal: delevery time would be more
-agile: deploymnet time is more
-devOps: in less time able to delploy watever developed using tools like git, Jenkins, puppet, nagios

-using devops we can do the develpment/deployment continuosly without having dependency/delay.

like the following Tools
Continuous Development : using VCS: GIT/BITBUCKET with multiple developers
Continuous Integration: Jenkins
Continuous Deployment: Puppet/cheff (config mangment tool to provide the servers like tomcat, was..ect)
Continuous Testing: Junit/Selenium automation
Continuous Monitoring: Nagios

Git:
----------
git clone
git clone http://t967249@gitlab.telecom.tcnz.net/online-delivery/adobe-aem-impl.git  : getting copy of the remote git project into local
cd adobe-aem-impl/ : switching to Project Directory
git checkout feature/shared_plan_4.3.6  : Switching to project
git pull feature/shared_plan_4.3.6 : getting the latest from the project
git status : It will shows the modified files list in workspace
git add filename1 filename2 : Adding the changes to the local repository from workspace
git commit -m "changes for total data cap defect#103992" : Committing the changes to local repository
git push: pushing the changes to the remote-repository from local-repository


git stash: If we dont want to commit our changes then we can place these changes in some other directory
git stash apply: git stash pop: we can get the modified files again by applying stash


in remote git url:
 -create our new branch in remote
 -get the reverse-merge from master branch to our new branch
 -so, now our new branch also having he same copy of the master
 -now checkout our new branch from remote
 -work on new branch, after doing changes
 - get the back up of the worked files and
 -do reverse-merge before going to commit the changes into remote branch of using
 -after commiting the changes we can see the diff of our branch with the master branch in remotely
 -If everything is fine we can raise a merge request to the to append our changes to the master branch

 git stashing:
 git stash: placing our changes a side means this will have the changes of


 ------------------------------------------------------------------------------
 Jenkins:
 -It is an integration tool
 -we can have jenkins.war file to  place in Tomcat webapps and congigure port number and config in server.xml cond context.xml files
 -Or we can install jenkins software directly then we can provide the required urls to run
 -we have plugins can install to use
 -Mangage congireations and confiure category we can configure the url's of git/maven/server..ect.
 -we can also provide the build parameters like develop/test/prod files  to run the Build

 -Previously if any bug we need to look into enitire source code(entire source code build and the tested)
 -here in jenkins testing happening on each commit like commit level testing(for each commit build then tested)
  so, we can easilay trace out the bug location to resolve no need to look into entire source code/build

  -Jenkins can test each commit:(Distribute Jenkins for browser-level testing)
    But while testing we may face problems in browser-level testing
for this Jenkins we can create  more nodes like Master Slave1, Slave2...etc
with Slave1 we can test in IE
with slave2 we can test in Chrome...etc
 --------------------------------------------------------------------------------------------
 --------------------------------------------------------------------------------------------

 DOCKER:
 ----------
 -Docker came into picture to avoid usage of multiple VM's
 -each VM occupies some RAM/Resources instead of that Docker Can uses the Resources on Demand
 -Docker desinged to make easier to create, deploy, and run apps using containers
 -these Containers are lightweight and alternatives to CM and it uses th host OS directly
 -no need to pre-allocate RAM for Containers unlike VM's

 Docker Hub(like GitHub):
 -----------------------

 Docker-File -> Docker Image(Docker Container) -> Docker Hub(has Docker Image) -> distributes Docker Image  to multiple Machines

 -Docker File contains the  Project Code

 -Like GitHub here Docker Hub having Commands to pull  the Docker Images to the Docker Containers
 -It is having YAML file to linker to link the Dcoker Images(code) to the DB's as well

 ---------------------------------------------------------------------------------------------------------------------------------


 PUPPET
 -------------------

-is a config mngmnt tool  to config/mange Servers
-CHEF is most widely used in Cloud instead of Puppet
-Defining distinct configurations for each and every host separately
-change/small config gets propagated to all machines also, automatically.
-uses Master Slave architecture and communicate through secured encrypted channel with SSL

-Before Devops difficult to rollback to previous db/server
-down time may leads to impact business so pull/push the code to select nodes if success apply it to all

push/pull/polling-

push: central Repo push the changes to the  all the nodes (ANSIBLE/SALTSTACK)
pull/polling: nodes are polling the changes from Central Repo in periodically (PUPPET/CHEFF)

-Puppet programs are called Manifests and file names having .pp extension

ANSIBLE
-------------------
-It is config mangament, deployment and Orchestration tool and push based config/mange tool






GIT Commannds
--------------------
- git checkout featureBranch - copies the files from remote to Local
-git status - It will shows the list of local changes
-git commit - To commit the changes into local
-git push - To push the changes into Remote



-git stash save filename - It will save the changes int temporary location with the filename
-git stash list - To view all the stashed filenames list
-git stash apply - To move the changes back to workspace from temporary location
-git stash drop filename - It removes  file from temporary location
-git stash pop filename - It removes 1st file from list of stashed files


-git pull(git fetch + git merge) -  it will pulls the latest from remote to local

-git merge -  It copies the changes from master to feature means merging the changes.
-get rebase - It will have direct link with master branch Means all the changes will move from feature to master (git rebase master)

-git log -To see the history of commits
-git branch - To view the current branch

On Wed, 1 Jan, 2020, 12:34 pm KK Naveen, <kknaveen90@gmail.com> wrote:

On Wed, 1 Jan, 2020, 12:19 pm KK Naveen, <kknaveen90@gmail.com> wrote:


git branch -  Lists local branches
git branch -r - Lists  remote branches


git branch -vv : lists local branch and respective remote branch



                   






























1 comment: