Translate

Showing posts with label DevOps. Show all posts
Showing posts with label DevOps. Show all posts

Tuesday, February 12, 2019

Benefits and Challenges of Taking the DevOps Route

Source: https://dzone.com/articles/benefits-and-challenges-of-taking-the-devops-route
Learn more about both the advantages and disadvantage of implementing a DevOps workflow in your development process.




As more businesses rush to beat the competition with the help of technology, software development has become more than just a sound investment. It is a major revenue channel and the main strategic benefit of a modern business.

That is why it is crucial to ensure the quality, performance, and security of your product, as well as a fast time to market.

For the last decade, businesses and software development teams around the world have been relying on the agile methodology as a way to improve team efficiency and adaptability.

However, with the increased focus on the business value of software products, traditional methods are no longer enough. There is a need for more effective ways to build and deploy software.

As a result, the DevOps methodology has emerged as an attempt to create a more holistic, end-to-end approach to software development and delivery.

What is DevOps and how does it work? Why do you need it at all? And, most importantly, how do you implement DevOps in your organization?

Read on to find the answers to these questions.

What is DevOps? How It Works and Why You Need It


Being a relatively new phenomenon in software development, it often causes confusion. In fact, there is still no unified DevOps definition.

For example, Atlassian explains DevOps as a “set of practices that automates the processes between software development and IT teams.

According to Sam Guckenheimer at Microsoft, the term means “the union of people, process, and products to enable continuous delivery of value to our end users.

And both definitions are correct.
You can say that DevOps allows you to deliver value to the end users by automating the processes and improving collaboration within the engineering and IT teams.
All in all, DevOps shifts the emphasis on people, removing the barriers between the development and operations and giving them the tools and practices to work together as one multidisciplinary team.

How DevOps Works

DevOps, as a software lifecycle management model, focuses on the end-to-end process by removing the gaps between engineers, IT staff, and stakeholders.
This means DevOps covers all the activities that are required to deliver the software to the end users, i.e. development, deployment, maintenance, and scaling.
As a result, the organizations that adopt the DevOps model become more product-centric, embracing the “you build it, you run it” philosophy.

How Can DevOps Benefit Your Business?

The wide adoption of this methodology and its growth in popularity can be attributed to a variety of reasons.
Namely, here are some of the advantages that DevOps can have for your business:
  1. Reduced chance of product failure. Software delivered by DevOps teams is usually more fit-for-purpose and relevant to the market thanks to the continuous feedback loop.
  2. Improved flexibility and support. Applications built by DevOps teams are typically more scalable and easy to maintain due to the use of microservices and cloud technologies (we’ll get to that later).
  3. Faster time to market. App deployment becomes quick and reliable thanks to the advanced Continuous Integration (CI) and automation tools DevOps teams usually rely on.
  4. Better team efficiency. DevOps means collective responsibility, which leads to better team engagement and productivity.
  5. Clear product vision within the team. Product knowledge is no longer scattered across different roles and departments which means better process transparency and decision making.
The listed benefits of DevOps implementation bring tangible ROI to your business. In the long run, adopting this approach can save your time and resources while helping you grow your revenue through increased business velocity and competitiveness.

DevOps Challenges and How to Overcome Them

Despite all the benefits, DevOps implementation is no easy task.
Namely, there are several key DevOps implementation challenges you should be prepared to face (and some tips on how to cope with them):

1. Transition Challenges (Both Technical and Organizational)

Dealing with legacy systems and re-building your applications to implement microservices architecture or moving them to the cloud is probably what stops most businesses from adopting DevOps.
In addition to adapting your product, you might need to rebuild your team and change the internal processes to fit the DevOps model. This includes changing team roles, hiring new team members, adopting new tools, etc.
Solution: To test the waters and see if this approach is good for your organization, launch a pilot project first. Thus, you will see if your team is ready for the challenge and will be more prepared for creating a full-scale DevOps implementation roadmap.

2. Lack of Talent

DevOps specialists with hands-on experience are hard to find. Most specialists in the field have 1-4 years of experience, according to Payscale. That is why DevOps engineer positions are among the top most difficult jobs to fill.
Moreover, such specialists typically come at a price: the average DevOps Engineer salary in the US ranges from $121,583, based on the data by Indeed, to $143,707, according to Glassdoor.
Solution: Consider hiring a dedicated team offshore or partnering with a trusted technology consultancy to guide you through your transition.

3. Toolset Choice

There are many DevOps tools you can consider when switching to this model, which some can consider a benefit. However, this also makes it even more difficult to choose the ones that perfectly meet your team’s needs.
Moreover, switching the tools down the road can be a real challenge and a major waste of time. You will need to transfer all of your projects as well as give your team the time to get used to them.
Solution: Appoint an experienced CTO or consultant to help you with making the correct choices, as well as assembling and putting to use the required tools.
Taking into account the listed DevOps disadvantages, you shouldn’t blindly follow the trend and rush to implement this approach within your organization. If you only update your product once a year and don’t plan to build any new ones soon, DevOps implementation might not be the best idea.

How to Implement DevOps in Your Organization

Considering the pros and cons, a DevOps strategy does seem like a reasonable investment, in most cases. So, if you are looking to build a DevOps roadmap for your organization, consider the following high-level plan as a starting point.

Assess the Risks and Understand the Potential Benefits

Before you start working on your DevOps plan, think about the real reasons why you want to implement this approach. Do you want to speed up your deployment? Do you feel that the team isn’t working to its full capacity? How often do you face the problems caused by communication gaps between various departments?
Understanding the real motives behind your DevOps initiative will help you choose the optimal path that will lead to a solid implementation strategy and outcome.
In addition to that, knowing your current bottlenecks and challenges will help you set benchmarks and track progress down the road.

Start with People

Your team members, from the developers to managers and executives, are the ones who will be in charge of your DevOps implementation strategy. That’s why it is so important to ensure everyone understands the potential benefits of this transition and is ready to contribute to the required changes.
To start with, appoint a lead to curate the process and assign the roles within your team. Allow your team members to take some time to process the changes and get used to their new roles. Plus, you might need to fill several new positions too, so it is important to start this process early.

Change the Culture

Your DevOps implementation plan won’t be complete without streamlined communication and transparency within your team. Building a culture of mutual responsibility and adopting effective collaboration practices should be one of the initial DevOps implementation steps.
To start with, put effective communication and knowledge sharing tools in place.

Adopt DevOps Best Practices (and Choose the Right Tools)

There are several elements of a successful DevOps implementation plan:
  • Continuous integration and continuous delivery
  • Test automation
  • Agile project management
  • Constant app data monitoring and logging
  • Cloud migration
  • Infrastructure as Code (IaC)
  • Microservices architecture
Most of the listed best practices aim to streamline routine tasks and optimize the team’s performance.
For example, Infrastructure as Code (which is currently one of the hottest DevOps topics) eliminates the manual work when setting up your deployment environments while helping you keep their configuration consistent. This allows you to avoid a number of common deployment issues and speed up the process itself.
Another important aspect that will shape the future of your DevOps strategy is your choice of tools to implement the above-listed best practices.

Start Small and Scale Later

Before going all in with putting your whole organization on the DevOps path all at once, consider testing the approach on a pilot project first, as mentioned previously. This will help you uncover the possible roadblocks and avoid them in the future.

Are You Struggling With Your DevOps Strategy?

Before you start your DevOps implementation plan, it is important to understand that it is an ongoing process. There is always something to improve, better tools to try, and new practices that you can adopt.
Yet, the DevOps approach is without a doubt a sound long-term investment that can help you make your organization more efficient and future-ready. If the DevOps approach is right for you, then the undertaking will certainly be worth the blood, sweat, and tears.
However, having a clear plan is not enough to mitigate the risks associated with the implementation of the DevOps methodology. You need to get someone with the relevant skills and proven expertise, preferably a professional consultancy or an experienced team to guide you through the process.

Tuesday, October 23, 2018

Jenkins in a Nutshell


by
Source: https://dzone.com/articles/jenkins-in-a-nutshell
Learn about Jenkins for continuous integration as part of CI/CD, its advantages, and alternatives.

In many projects, the product development workflow has three main concerns: building, testing, and deployment. Each change to the code means something could accidentally go wrong, so in order to prevent this from happening developers adopt many strategies to diminish incidents and bugs. Jenkins, and other continuous integration (CI) tools are used together with a source version software (such as GIT) to test and quickly evaluate the updated code.
In this article, we will talk about Jenkins, applicable scenarios, and alternatives to automated testing, deployment, and delivering solutions.

About Jenkins

Jenkins is a popular self-contained, open-source automation server to perform continuous integration and build automation. Its elementary functionality is executing a predefined list of phases or jobs. In other words, every change in a repository triggers a pipeline of jobs that evaluates and executes different tasks to accomplish what has been previously defined.
Each phase is monitored and allows you to stop the entire process and the change will be reported to the user by Jenkins. In large companies, it is common for multiple teams to work on the same project without knowing what the other teams are doing on the same code base. Those changes can create bugs that will only be revealed when both codes are integrated into the same branch. Since Jenkins can run its predefined jobs for every commit, it will be able to detect and notify developers that something is not right and where it is.
More on the subject:
Thousands of add-ons can be integrated with Jenkins, they provide support for different types of build, version control systems, automation, and more. It can be installed through native system packages, Docker, or be run by any machine with a Java environment installed.
Jenkins is often used for building projects; running tests to spot bugs, to analyze static code, and deployment. It also executes repetitive tasks, saves time, and optimizes developing processes.
Beginning with the second version, Jenkins introduced Pipelines, a different way to programmatically define a project build workflow. Before pipelines, the CI description was defined and stored outside the repository—it was designed to evaluate—now, with Pipelines, CI files are present in project source code. The file describes the workflow through a language which can be used to create different jobs in sequence or in parallel.
Below is an example of a pipeline with four jobs (stages) which facilitates debugging when one of them fails (from https://jenkins.io/doc/pipeline/examples/).
jenkins

Jenkins Use Cases

Let’s take a look at some of the main scenarios Jenkins plays a critical part in.

Continuous Integration (CI)

Continuous integration is a practice that forces developers to frequently integrate their code into a central repository. Instead of building out new features to the end without any quality measurement, every change is tested against the central repository in order to anticipate errors.
Every developer commits daily to a shared mainline and every commit triggers an automated process to build and test. If building or testing fails it can be detected and fixed within minutes without compromising the whole structure, workflow, and project. In that way, it is possible to isolate problems, solving them faster and provide higher-quality products.

Continuous Delivery (CD)

Continuous delivery is the ability to make changes of all types—such as new features, configuration changes, error fixes, experiments—into production in a safe and efficient manner using short work cycles.
The main goal in continuous delivery is to make deployments predictable as routine activities that can be achieved upon request. To be successful, the code needs to always be in a deployable state even when there is a scenario with lots of developers working and making changes on a daily basis. All of the code progress and changes are delivered in a nonstop way with high quality and low risks. The end result is one or more artifacts that can be deployed to production.

Continuous Deployment (CD)

Continuous deployment, also known as continuous implementation, is an advanced stage of continuous delivery that the automation process does not end at the delivery stage. In this methodology, every change that is validated at the automatic testing stage is later implemented at the production stage.
The fail fast strategy is always of the utmost importance when deploying to production. Since every change is deployed to production, it is possible to identify edge cases and unexpected behaviors that would be very hard to identify with automated tests. To fully take advantage of continuous deployment, it is important to have solid logging technology that allows you to identify the increasing error count on newer versions. In addition, a trustworthy orchestration technology like Kubernetes that will allow the new version to slowly be deployed to users until the full rollout or an incident is detected and the version is canceled.

Automation

As a job executor, Jenkins can be used to automate repetitive tasks like backup/restore databases, turn on or turn off machines, collect statistics about a service and other tasks. Since every job can be scheduled, repetitive tasks can have a desired time interval (like once a day, once a week, every fifth day of the month, and so forth).

Jenkins Alternatives

Although Jenkins is a good option for an automated, CI/CD server, there are other options on the market such as Gitlab CI/CD, Circle CI, Travis or Bamboo.

GitLab CI/CD

GitLab is a full-featured software development platform that includes a module called GitLab CI/CD to leverage the ability to build, test, and deploy without external requirements (such as Jenkins). It is a single application that can be used in all stages of the developers’ work cycle on the same project: product, development, QA, security, and operations.
GitLab is a solution that enables teams to cooperate and work from a single step instead of managing thousands of threads across disparate tools. It provides a single data store, one user interface, and one permission model across the developers’ life cycle. This permits teams to collaborate reducing cycle time and focusing on building software more quickly and efficiently.
Though Gitlab covers the CI/CD cycle thoroughly, it fails to do so for automation tasks since it does not have scheduling options. It can be a very good alternative since it integrates source code versioning and CI into the same tool.
Gitlab comes in a variety of flavors: there is a community, open-source edition that can be deployed locally, and some paid versions with an increasing number of features.

Circle CI

Circle CI is a hosted continuous integration server. After Circle CI is authorized on GitHub or Bitbucket, every code change triggers tests in a clean container or VM. After this, an email is sent every time there is a successful test completed or a failure. Any project with a reporting library provides code test coverage results. Circle CI is simple to configure, has a comprehensive web interface, and can be integrated with multiple source code versioning tools.

Bamboo CI

Bamboo is a solution for continuous integration, deployment, and delivery. Bamboo allows you to create a multi-stage build plan, set up triggers upon commits, and assign agents to builds and deployments. It also allows you to run automated tests in every code change which makes catching bugs easier and faster. Bamboo supports continuous deliveries as well.
Bamboo’s brightest feature is its seamless integration with Atlassian products: Jira Software, Bitbucket, and Fisheye, and can be improved with hundreds of add-ons that are available at Atlassian marketplace.

Travis CI

Travis is another open-source solution that also offers a free hosted option for open-source projects (paid for enterprise clients). It uses a solution similar to Jenkins Pipelines: you add a file called .travis.yml that describes the project’s own build workflow. It also has parallel jobs builds but it does not have the same size of add-ons available for Jenkins.

Endnotes

Integration solutions are a key step towards reaching delivery reliability. Every developer commits daily to a shared mainline and every commit triggers an automated workflow for building and testing; if building and testing fail it is possible to repair what is wrong quickly and safely and thereby increase productivity in the workflow. When we have a way to find problems and solve them quickly, we release higher-quality products and more stable experiences to the client.
There are lots of options on the market to choose from to help the developers’ workflow. As outlined above, some of these are free solutions and open-source, while others are paid. Jenkins is one of the oldest open-source tools out there and as such also extremely popular. We at Logz.io are no exception here, and we use Jenkins to run tests, create Docker containers, build code, and push to staging and production.