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...
Get link
Facebook
X
Pinterest
Email
Other Apps
DevOps session 4: DevOps life cycle and Tools
Get link
Facebook
X
Pinterest
Email
Other Apps
-
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 -
Linux basics
At least one programming language: Python, Java, Jscript, GO Lang etc.
Infrastructure Automation tools : Terraform and packer
Create new Repo on GitHub: 1.Go to your GitHub account and on the header ,click on "+" icon ,Then click on New repository. 2. Provide your new Repo name ,Select the public option if you want to show your work with every one. If you want to show the content in repo to specific users ,then select private . Then click on create repository button at the bottom. 3. Once repository is created, we are navigated to repo dashboard page. 4. Create a sample README file by clicking on below text in screenshot. Then go down and click on commit change button. COMMANDS: 1. git init: As a first step we need to create a local empty repo. 2. git clone: First time when we want to get the code from GitHub repo, we use clone command. Go to your GitHub repo you want to clone and copy the SSH link. Then use git clone [link copied from above] . 3. git branch a : This commands will display all branches present for that GitHub repo. ...
Version control systems(VCM) manage changes to software development projects. Businesses use this software to allow multiple users collaborate on projects and track changes made by each user. GIT is free, open source version control system. Version Control System - VCS helps a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database. VCS System helps team to rollback to previous version in case of any issue with specific Version. Advantages: There are several reasons why we should manage the source code that we write: Work together in teams . A source code management system allows multiple developers to access and change different areas of the code, without interfering with each other’s work. This is a big benefit for large teams of developers. Version history . The system will keep a history of all saved changes to the code. This not only allows you to see what has ch...
Let us consider an example your in team where developer 1 working on feature1 , developer2 working on feature 2 etc. With out branching if the developers push and pull the code daily, which will leads to a confusion and code duplication or removal of code which might impact other features. So git provides an option to create multiple branches, So that each developer can create there own branch and then update the code, push code to their own branch ,finally merge with main branch. Eg: Developer 1 creates a new branch name: dev-login Developer 2 creates another branch name: dev-signup. So, Developer 1 and Developer 2 can work on their branch and once every thing is done. They will come together to merge the Login and signup branches to main. Git branching commands: 1. git branch: Use to display all the branches on currently working repo(in our example devopsDemo ) 2. git branch --show-current: Display the name of current working bra...
Comments
Post a Comment