DevOps / CI-CD
What is SDLC ( Software Development life cycle)
Software Development Life Cycle (SDLC) is a process used by the software industry to design, develop and test high-quality software. The SDLC aims to produce high-quality software that meets or exceeds customer expectations and reaches completion within times and cost estimates.
Various steps followed in SDLC are :
Planning
Analyzing
Designing
Implementation (Coding, building, testing, deployment)
Maintenance
What are two methods/approaches in project management?
Agile and Waterfall models are two different methods for the software development process.
Agile Model
– The agile process is broken into an individual set that developers/testers work on
– The customer has early and frequent opportunities to look at the product and make a decision and changes to the project
– It can be quickly implemented in small projects, but for large products it takes time.
– Error can be fixed in the middle of the project.
Waterfall Model:
– Development of the software flows sequentially from the start point to the endpoint.
– The design process is not broken into individual models/sets.
– The customer can only see the product at the end of the project
– Waterfall models are more secure because they are so plan oriented
– All sorts of projects can be estimated and completed.
– Only at the end, the whole product is tested. If the requirement error is found or any changes have to be made, the project has to start from the beginning
What is Agile Methodology?
Agile is a set of values and principles about how to produce i.e. develop software. Agile is a repetitive approach that is followed in project management. The agile approach used in Software development, helps teams deliver products to their customers faster and with fewer issues. Instead of waiting for a “big bang” launch, an agile team delivers work on the small, but consumable product.
Requirements, plans, and results are evaluated continuously so teams have a natural mechanism for responding to change quickly.
Development, testing, and deployment/delivery activities are parallel work unlike the Waterfall model
How is DevOps different from Agile?
Agile is a set of values and principles about how to produce i.e. develop software. For example: if you have some ideas and you want to turn those ideas into working software, you can use Agile values and principles as a way to do that. But, that software might only be working on a developer’s laptop or in a test environment.
You want a way to quickly, easily, and repeatedly move that software into production infrastructure, in a safe and simple way. To do that you need DevOps tools and techniques.
Agile software development methodology focuses on the development of software but DevOps on the other hand is responsible for the development as well as deployment of the software in the safest and most reliable way possible.
What is DevOps and what is the need for DevOps?
DevOps is a set of practices that combines development and IT team to provide continuous delivery with high software quality.
Instead of releasing big sets of features, companies are trying to see if small features can be shipped to their customers. This has many advantages like quick feedback from customers, the better quality of software, etc. which in turn leads to high customer satisfaction. We can achieve this by use of DevOps.
To achieve this companies are required to have a process of
- Continuous integrations
- Continuous Delivery in some cases Continuous deployment.
- Continuous testing.
- Faster s/w roll-back in the event of a new release crashing
DevOps fulfills all these requirements and helps in achieving seamless software delivery.
Google, Amazon, and other companies have adopted DevOps to achieve levels of performance that were unthinkable even five years ago.
They are doing tens, hundreds, or even thousands of code deployments per day while delivering world-class stability, reliability, and security.
What is the most important thing DevOps helps us achieve?
The most important thing that DevOps helps us achieve is to get the changes done by the development team into production as quickly as possible while minimizing risks in software quality and maintaining security, stability, and reliability.
It also aims at better coordination between teams i.e. both the Ops team and the Dev team.
What is meant by Continuous Integration?
It is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.
1. Developers check out code in their private workspaces.
2. When they are done with it they commit the changes to the shared repository (Version Control Repository).
3. The CI server monitors the repository and checks out changes when they occur
4. The CI server then pulls these changes and builds the system and also runs unit and integration tests.
5. The CI server will now inform the team of the successful build.
6. If the build or tests fails, the CI server will alert the team.
7. The team will try to fix the issue at the earliest opportunity.
8. This process keeps on repeating.
What are Continuous Integration, Continuous Delivery, and Continuous Deployment?
Continuous Integration Continuous integration is a DevOps practice where developers regularly merge their code changes into a central repository, after which automated builds and tests are run. Continuous integration most often refers to the build or integration stage of the software release process.
The key goals of continuous integration are to find and address bugs quicker, improve software quality, and reduce the time it takes to validate and release new software updates.
Continuous Delivery (CD) is a DevOps practice in which continuous integration and then automated testing is done. We also have automated deployment capabilities and deployment happens in the testing environment for further testing by QA Teams.
Continuous Deployment is a DevOps practice in which continuous integration, automated testing, and continuous deployment to the production server are done.
In this every code change goes through the entire pipeline of build, test, and deployment and is put into production, automatically, resulting in many production deployments every day.
With Continuous Delivery, your software is always release-ready, yet the timing of when to push it into production is a business decision, so the final deployment is a manual step. With Continuous Deployment, any updated working version of the application is automatically pushed to production. Continuous Deployment mandates Continuous Delivery, but the opposite is not required.
Why do you need a Continuous Integration of Dev & Testing?
Continuous Integration of Dev and Testing improves the quality of software and reduces the time taken to deliver it, by replacing the traditional practice of testing after completing all development. It allows the Dev team to easily detect and locate problems early because developers need to integrate code into a shared repository several times a day (more frequently). Each check-in is then automatically tested.
What are the success factors for Continuous Integration?
Maintain a code repository
Automate the build
Make the build self-testing
Everyone commits to the baseline every day
Every commit (to baseline) should be built
Keep the build fast
Test in a clone of the production environment
Make it easy to get the latest deliverables
Everyone can see the results of the latest build
Automate deployment
What is Continuous Testing?
Continuous Testing is the process of executing automated tests as part of the software delivery pipeline to obtain immediate feedback on the business risks associated with the latest build.
In this way, each build is tested continuously, allowing Development teams to get fast feedback so that they can prevent those problems from progressing to the next stage of the Software delivery life-cycle. This dramatically speeds up a developer’s workflow as there’s no need to manually rebuild the project and re-run all tests after making changes.
Can you explain the CI-CD tools used in your organization?
For CI-CD we use various tools such as :
- Git, Bitbucket – as a version control tool
- Jenkins – Continuous Integration Tool
- Selenium – Continuous Testing Tool
- Ansible – Configuration Management tool
- Jfrog Artifactory – to store artifacts.
- Terraform – to manage infrastructure as a code
- Sonarqube – as a static code analysis tool.
- Packer –as a packaging tool, Docker & AWS AMI are created using packer.
- AWS – Cloud computing tool for deployment
- Zabbix – continuous monitoring tool
- Docker – containerization Tool
- Kubernetes – Container orchestration Tool
How do all CI-CD tools work together?
1. Developers develop the code and this source code is managed by Version Control System tools GIT and bitbucket.
2. Developers send this code to the Git repository and any changes made in the code are committed to this Repository.
3. Jenkins pulls this code from the repository using the Git plugin and builds it using tools like Ant or Maven.
4. Packer creates docker and AWS images using ansible and then the testing environment is deployed using the untested image
5. After this testing is done using testing tools such as selenium. And if testing succeeds, bronze/tested images are created.
6. Zabbix is used to monitor Tools and deployment servers.
8. Docker is used to containerizing various services of the product.
9. Using docker images, the software product is deployed in Kubernetes.
Explain the build workflow at your organization.
1st Stage – Developers commit codes to the team/Feature branch – and then build the code. Once the code is built and tested, the code is moved to the Master/integrations branch by developers. The component level build for master/int branches is automatically triggered by Jenkins and new jars are published in the artifactory.
2nd Stage – We build master/int level build four times in 24 hours – in which the latest jars of the component build are picked. We manage the component list and its version in a specific file, which is for release-specific branches. And then the final build with the latest jars of components is built and packaged and published in the artifactory.
3rd Stage – Packer then consumes those latest zips and using Ansible/Chef creates images for docker and aws.
4th Stage – Aws images are used, and the latest deployment is created, where initial level fo testing is performed. And after successful testing, we create tested images for the particular release, which can be used by developers for testing purposes.
5th Stage – We do delivery per two weeks and create delivery branches for it and final tested images from delivery branches are moved to deployment for customer use.
What is Kanban
Both Scrum and Kanban are Agile approaches used in software development.
Kanban is a preferred approach in project development cycles that require continuous improvement in gradual increments. This approach helps teams have a visual idea of what is going on in the project and what is next to come.
You can have an entire project plan laid out and apply the Kanban approach to ensure the team is on the same page and that tasks are being completed on time.
The Kanban method does not specify any team roles. No individual is responsible for any stage of the project development or accountable for the performance of any team. Instead, the team collectively works towards project completion by completing tasks assigned to different team members. Identifying issues or problems, sharing task status or changes to be made are displayed by the assigned individuals on the Kanban board.
Description | SCRUM | Kanban |
Purpose | Planning to delivery | Consistent improvement |
Task Presentations | User Stories/Product Backlogs | Columns or Kanban Cards |
Iterations | Fixed length sprints | Continuous flow |
Activity Completion | End of Sprint (depending on the Product Owner’s approval) | Continuous delivery (depending on the team) |
Team Roles | Product Owner, Scrum Master, Development Team | No specified roles |
What is scrum and what Types of meetings are in Scrum?
A scrum is an Agile approach used in software development.
Scrum is allowing teams to regularly check in on what they are doing, so that they can make sure they are heading in the right direction and that they are building something that people want.
Along with checking if the output is heading in the right direction, Scrum also encourages teams to find ways they can improve the product. What this basically means is that every so often, the team will stop and inspect what they are doing and how they might do it better.
Various meeting held in scrum is:
1. Sprint planning
2. Daily Standup
3. Backlog Grooming
4. Sprint review
5. Sprint Retrospective
The Scrum approach revolves around 3 main roles: Product Owner, Scrum Master, and the Development team.
The Product Owner is responsible for defining and finalizing a list of tasks to be completed in a given time interval (Sprint).
This list of activities is known as the Product Backlog.
The Scrum Master facilitates the Scrum team in multiple ways.
What is Jira – as an agile project management tool
JIRA: Agile Project Management, Using Jira Software
Jira Tool supports Agile Software Development methodologies like Scrum and Kanban.
Agile methodology for software development has gained immense popularity in recent years.
Using Jira Agile boards and reports we can plan and track all your Agile Project management tasks using one tool.
Agile Projects follow an incremental approach to the development of the requirements.
The highlights of an Agile/Scrum Project are:
- The requirements are created/agreed upon and then grouped together into a Product Backlog
- The requirements (User stories) are ranked in the order of priority and business importance
- Once ranked, the stories are assigned developmental cycles (Sprints) that last for approx. 2-4 weeks.
- Detailed documentation is avoided. Instead, a scrum board is maintained that will show the status and progress.
JIRA successfully supports all the activities listed above for projects following an Agile Methodology.
Note: You will not be able to link Epic to another Epic.
The next important feature of an Agile Project is the Scrum board. JIRA provides a solid basis to facilitate it. The feature is called a “Board”, and it is right there under the “Agile” menu item.
What is serverless architecture?
Serverless architecture is a way to build and run applications and services without having to manage infrastructure. Your application still runs on servers, but all the server management is done by AWS. You no longer have to provision, scale, and maintain servers to run your applications, databases, and storage systems.
Serverless computing is a cloud computing execution model in which the cloud provider allocates machine resources on demand, taking care of the servers on behalf of their customers. “Serverless” is a misnomer in the sense that servers are still used by cloud service providers to execute code for developers. However, developers of serverless applications are not concerned with capacity planning, configuration, management, maintenance, fault tolerance, or scaling of containers, VMs, or physical servers.
Serverless computing can simplify the process of deploying code into production. Serverless code can be used in conjunction with code deployed in traditional styles, such as microservices or monoliths. Alternatively, applications can be written to be purely serverless and use no provisioned servers at all.
What is IaaS, PaaS, SaaS
- Software as a Service (SaaS) – It is a software distribution model in which services are hosted by a cloud service provider. Eg- salesforce, dropbox
- Platform as a Service (PaaS)- It provides a runtime environment. It allows programmers to easily create, test, run, and deploy web applications. Eg- aws elastic beanstalk,
- Infrastructure as a Service (IaaS) – It is a type of cloud computing service that offers essential computing, storage, and networking resources on demand, on a pay-as-you-go basis. Eg- AWS-ec2.