The main objective of devops is to implement collaboration between development and operations team.
SDLC MODELS (Software Development Life Cycle)
f. SCRUM
AGILE means speed
SCRUM is agile based model
SPRINT: it’s like metro line working fashion. 240 km divided into small multiple (line) pieces and the develop complete packet line. Scrum word is derived from rugby ball. SPRINT: sprint means small piece of work. In agile continues delivery, continuous feedback, requirement changes in the middle are accepted, and client satisfaction is very high, less development time, less development cost.
DEVEOPS:
Deveops talks about both development as well as operations.
So developer should know the complete activity of project i.e. development to operation.
Agile model won’t force us to user automation tools. But it is completely based on automatic.
Agile is giving high priority
Need of Version Control System:
Benefits of version control system:
Types:
Limitations:
GIT
GIT is distributed version control system tool. It is developed by linus Torvalds.
FEATURES:
STAGING AREA:
In git commit is two-step process. First we have to add files to the staging area and then we have to commit from that staging area.
Advantage of staging area is we can cross check or double check our changes before commit. If everything is fine then we can commit.
It is stored in hash type (encryption - decryption)
BRANCHING:
All branches are isolated from each other, Hence multiple developers can work.
GIT ARCHITECTURE:
LIFE CYCLE OF FILE IN GIT:
GTI STATUS : status of all files in all are.
The files which are added to staging area are said to be in staged state.
Git add a.text
Git add .
Git add a.txt b.sql c.docx
Git add *.txt
We can commit staged changes by using git commit.
Git config – global user.email your@example.com
Git config – global user.name “your name”
Git commit –m “this is xyz project_files”
New file created in working directory with some contenet is UNTRACKED STATE
Once we add this file to staging area is called STAGING STATE.
Git add a.txt
We have to commit changes from staged area to local repository è in repository / committed state.
Git commit –m “commit message”
ls = files in working directory
git ls-files = all files which are tracked by git.
Any file which is already tracked (commited) by git, but it is modified in working directory is said to be in modified state.
Download: https://git-scm.com/download/win
Project one is m repository
Git init -à to create git repository
Git add .
Git commit –m “message”
Git status
Git log
Git ls-files
Ls
Git commit –a –m “commit message”
Example of Basic GIT command
git status –s à concise output
Git commit –m “commit message”
Unique commit id will be generated. Commit id/hash which is hexadecimal number of 40 characters. For every commit git records, author name and mail id, time stamp, commit message is tracked.
echo -n"fdsfdfdfdfdsfddsfdfd" |wc –c
100644
Ascii = 100
File permission = 644
R - > 6
w - ->2
x - -> 1
means
git
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
[--super-prefix=<path>] [--config-env=<name>=<envvar>]
<command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
clone Clone a repository into a new directory
init Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
add Add file contents to the index
mv Move or rename a file, a directory, or a symlink
restore Restore working tree files
rm Remove files from the working tree and from the index
sparse-checkout Initialize and modify the sparse-checkout
examine the history and state (see also: git help revisions)
bisect Use binary search to find the commit that introduced a bug
diff Show changes between commits, commit and working tree, etc
grep Print lines matching a pattern
log Show commit logs
show Show various types of objects
status Show the working tree status
grow, mark and tweak your common history
branch List, create, or delete branches
commit Record changes to the repository
merge Join two or more development histories together
rebase Reapply commits on top of another base tip
reset Reset current HEAD to the specified state
switch Switch branches
tag Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
fetch Download objects and refs from another repository
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.
e. Git Log: It show history all commits.
It shows commit id, author name, time stamp and commit message.
Git log - - help (to short view)
Git log file.txt (only commits related to given file)
Options.
Git log - - since = “2020-04-25”
Git log - - since = 3 hours ago”
Git log - - since = 10 days ago”
Git log - - after = “yyyy-mm-dd”
Git log - - since = 10 minutes ago”
Git log - -until = “yyyy-mm-dd”
Git log - - since = 10 days ago”
Git log - -author = “sandip”
Git log - -decorate = “sandip”
Git log - - help
f. Git config: This command is used to git confifurations like user name, mail id,etc.
Git config user.name”sandip”
Git config user.email sandipg@tmfl.co.in
Git config - - global user.name”sandip”
Git config - - global user.email sandipg@tmfl.co.in
Without global and with global: global means for all repository its applicable. Without global means only for particular repository.
Git diff - - git a/file1.txt b/file2.txt
Git diff - - staged HEAD file1.txt