DevOps session 13: Automate git SETUP using bash scripting.

Image
  Bash scripting: A Bash Shell Script is a plain text file containing a set of various commands that we usually type in the command line. It is used to automate repetitive tasks on Linux filesystem. It might include a set of commands, or a single command. For example ,to install GIT we need to update the packages, then install git and check if installation is done using Linux commands. We can write all the command in a .sh file and we can execute the file to do all the steps mentioned above. Lets start with example from hello-world. 1.Open terminal and check the root of the bash using below command. CMD: which bash you can see path like  /usr/bin/bash or /bin/bash . 2.Create a hello-world.sh file and paste the below lines. CMD: nano hello-world.sh You can see editor ,add below lines #!/bin/bash # declare MSG variable MSG="Hello World" # print variable on a screen echo $MSG To save the file use CTRL+X, then CTRL+Y and press ENTER 3. To execute the file we need to ad...

DevOps session 4: DevOps life cycle and Tools

 



Continuous Development -

This is the phase that involves ‘planning’ and ‘coding’ of the software. The vision of the project is decided during the planning phase and the developers begin developing the code for the application. There are no DevOps tools that are required for planning, but there are a number of tools for maintaining the code.

Tools: 

Code maintain: Git, SVN, Mercurial, CVS, and JIRA. 

Build tools: Ant, Maven, Gradle

Continuous Testing -

This is the stage where the developed software is continuously tested for bugs. For Continuous testing, automation testing tools are used. These tools allow QAs to test multiple code-bases thoroughly in parallel to ensure that there are no flaws in the functionality. In this phase, Docker Containers can be used for simulating the test environment.

Automation Tools: Selenium, Cypress, Python, TestNG, Pytest, Junit etc.

Continuous Integration -

This stage is the heart of the entire DevOps life cycle. It is a software development practice in which the developers require to commit changes to the source code more frequently. This may be on a daily or a weekly basis. Every commit is then built and this allows early detection of problems if they are present. Building code not only involves compilation but it also includes code review, unit testing, integration testing, and packaging.

The code supporting new functionality is continuously integrated with the existing code. Since there is continuous development of software, the updated code needs to be integrated continuously as well as smoothly with the systems to reflect changes to the end-users.

CI /CD Tools:  Jenkins, Bamboo, Circle CI, GitHub actions, Gitlab.

Continuous Deployment -


This is the stage where the code is deployed to the production servers. It is also important to ensure that the code is correctly deployed on all the servers.
 It is the act of releasing deployments to servers, scheduling updates on all servers and most importantly keeping the configurations consistent across all the servers.
Containerization tools also play an equally important role in the deployment stage. These tools help produce consistency across Development, Test, Staging and Production environments. Besides this, they also help in scaling-up and scaling-down of instances swiftly.

Containerization tools: Docker, Kubernetes and Vagrant
configuration management tools: Puppet, Chef, Salt Stack, and Ansible.

Continuous Monitoring -


This is a stage of the DevOps life cycle where you continuously monitor the performance of your application. Here vital information about the use of the software is recorded. This information is processed to recognize the proper functionality of the application. The system errors such as low memory, server not reachable, etc are resolved in this phase.

It maintains the security and availability of the services. They can also improve productivity and increase the reliability of the systems, which in turn reduces IT support costs. Any major issues if found are reported to the development team so that it can be fixed in the continuous development phase. This leads to a faster resolution of the problems.

Monitoring Tools: Splunk, ELK Stack, Nagios, NewRelic and Sensu.

OTHER SKILLS - 


  1. Linux basics 
  2. At least one programming language: Python, Java, Jscript, GO Lang etc.
  3. Infrastructure Automation tools : Terraform and packer
  4. Shell scripting: Bash, PowerShell.

Comments

Popular posts from this blog

DevOps session 10: Git basic commands for daily use

DevOps session 7: Source Code Management/ Version control systems (GIT) || Setup Git on ubuntu

DevOps session 11: Git branching & best practices