{"id":51,"date":"2024-04-03T11:14:49","date_gmt":"2024-04-03T05:44:49","guid":{"rendered":"https:\/\/musikaar.com\/blog\/?p=51"},"modified":"2024-04-10T14:38:07","modified_gmt":"2024-04-10T09:08:07","slug":"devops-intro-preface-to-devsecops","status":"publish","type":"post","link":"https:\/\/musikaar.com\/blog\/devops\/devops-intro-preface-to-devsecops\/","title":{"rendered":"DevOps Intro: Preface to DevSecOps"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\">TL;DR<\/h1>\n\n\n\n<p>This is the first installment from a series of blog posts, where we discuss journey from DevOps to DevSecOps. Securing a DevOps system is on top of many engineering teams\u2019 minds but before we dive into specifics of DevSecOps it will be good to have a frame of reference.&nbsp;&nbsp;<\/p>\n\n\n\n<p>So, this post will aim to provide the foundation for future posts and a refresher if you have not been hands-on for a while. If you are seasoned DevOps&nbsp;practitioner&nbsp;and have a well-functioning DevOps team, you can jump right to the next post.&nbsp;<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Purpose of DevOps<\/h1>\n\n\n\n<p>Before using a tool or implementing a process it is always helpful to understand the intent or purpose behind it. So, let\u2019s start by asking \u2013<\/p>\n\n\n\n<p>What\u2019s the true purpose of DevOps toolchain and practices?<\/p>\n\n\n\n<p>Few years ago, software development and software deployment cycles were managed separately. This led to various issues and inefficiencies ranging from slow feature delivery, long turn-around times for fixes and general fatigue of context-switching between \u2018what\u2019s on production environment vs we already fixed this issue few releases ago\u2019. With the evolution of many cloud-based technologies, now engineering teams have the tools and can define the processes that remove these hurdles. In other words, there was disconnect between integration of the latest code and deployment of that latest code.<\/p>\n\n\n\n<p>So, the purpose can be described as facilitating Continuous Integration and Continuous Delivery. i.e., set of practices and tools that allow engineering teams to achieve higher velocity by means of CI\/CD and<em> <\/em>automated workflows.&nbsp;&nbsp;<\/p>\n\n\n\n<p>The scope of tasks that are automated involve two main areas \u2013 Development and Operations.&nbsp;<\/p>\n\n\n\n<p>And it\u2019s important to remember that toolchain alone is not sufficient to achieve this. Those tools and their operations need to align with some strategy. For example, setting up a Jenkins pipeline alone to build and deploy code will cause more problems than it will solve if there are not adequate automated tests and checks in place to ensure that the code that is being deployed is good quality code.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Tools<\/h1>\n\n\n\n<p>Let\u2019s quickly recap the concepts and tools that are used in a DevOps cycle.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Planning<\/h2>\n\n\n\n<p>This is where things usually begin. Planning helps identify the deliverables, owners, dependencies, and timelines. The most popular tools to manage planning are Jira, Rally, Azure Boards. Different tools will provide varying degrees of advantages depending on other tools that you want to integrate with. But it\u2019s important to remember that this is one tool that will be used by stakeholders outside of engineering teams too. So, choose carefully. <\/p>\n\n\n\n<p>Also, teams usually use some form of agile process to manage the goals, breakdown bigger deliverables in smaller iterative release and ensuring complete visibility of progress including post deployment tasks and Root Cause Analysis of any issues discovered from prior releases.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Version Control<\/h2>\n\n\n\n<p>Like most engineering toolchains, Git holds a very important place within DevOps. There are many free and paid implementations of Git to choose from. Depending upon the needs and budgets each Git solution has something good to offer. Said that, you will likely come across GitHub, GitLab, AWS CodeCommit, Bitbucket and Azure Repos. There are other alternatives too, but they serve more niche use-cases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Build System<\/h2>\n\n\n\n<p>The build systems&#8217; primary responsibility is to compile\/package code and create artifacts out of it that would be deployed later. This is also the stage where many automated checks can be performed to ensure that the deployed code has passed quality checks. Commonly used are Jenkins, Azure Pipelines, AWS CodePipeline, GitLab Pipelines, TeamCity Pipelines etc.<\/p>\n\n\n\n<p>They also invoke additional checks related to testing and security of the compiled code.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Test Framework<\/h2>\n\n\n\n<p>Once the build is ready it\u2019s important to test it before it can be deployed. Ideally, this is achieved via automated tests. There are many frameworks and tools to choose from, but it\u2019s recommended to choose the ones that integrate well with rest of your toolchain. It is also important to note that usually testing the code requires deploying it to a test or staging environment so, integration with deployment system is an important criterion. The commonly used frameworks are Selenium, Cypress, Robot, TestNG, Espresso, XCUITest, Appium etc. There are many free and paid tools that leverage these frameworks and provide automation platform as service.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Artifact Repository<\/h2>\n\n\n\n<p>Once the build has passed quality checks and is ready to be deployed it needs to be stored somewhere. In large teams, it is usually the dedicated artifact repositories. In smaller teams, the version control system\u2019s ability to store and tag artifacts could be leveraged. Popular ones are Docker Hub, JFrog Artifactory, AWS ECR.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Deployment System<\/h2>\n\n\n\n<p>In most cases the build system itself will be capable of deployments but in some cases, these could be two separate systems. &nbsp;The reasons could range from budget sensitive infrastructure to a large and complex engineering tool chain which is a result of years of evolution. <\/p>\n\n\n\n<p>But it\u2019s worth noting that the deployment system will be interacting with platforms (cloud\/on-prem) and services where the application will be hosted. This is usually done via integrations with tools like Terraform, AWS CloudFormation, Ansible and many others.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Observability &amp; Monitoring<\/h2>\n\n\n\n<p>These tools gather metrics, data and other signals and also help visualize them. This helps with quick identification of issues and in analytics which can help stakeholders better understand how the target audience is using the software and what shall be the future goals. There are so many tools to choose from based on the goals and scope. Commonly used ones are Datadog, New Relic, Splunk, ELK, Prometheus, Grafana, Kibana etc.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Conclusion<\/h1>\n\n\n\n<p>Now that we are familiar with all the main tools and concepts, let\u2019s put it all together:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"3132\" height=\"2280\" src=\"https:\/\/musikaar.com\/blog\/wp-content\/uploads\/2024\/04\/DevOps-Circle-1.png\" alt=\"\" class=\"wp-image-54\" srcset=\"https:\/\/musikaar.com\/blog\/wp-content\/uploads\/2024\/04\/DevOps-Circle-1.png 3132w, https:\/\/musikaar.com\/blog\/wp-content\/uploads\/2024\/04\/DevOps-Circle-1-300x218.png 300w\" sizes=\"auto, (max-width: 3132px) 100vw, 3132px\" \/><figcaption class=\"wp-element-caption\">Customary loop to describe DevOps cycle<\/figcaption><\/figure>\n\n\n\n<p>As we can see, each stage is providing the input for the next stage. Planning stage tells developers what to code and build, be it new features or changes to existing code based on feedback from monitoring. The test stage will take inputs from build and so on.<\/p>\n\n\n\n<p>At the end, monitoring stage will give inputs back to the planning stage to ensure lessons learnt from one cycle are incorporated into the next cycle along with new feature development and thus cycle repeats.<\/p>\n\n\n\n<p>In the <a href=\"https:\/\/musikaar.com\/blog\/devops\/understanding-devsecops-in-cloud-security\/\" data-type=\"post\" data-id=\"68\">next post<\/a> we will discuss how to incorporate security in these stages&#8217; inputs and outputs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>TL;DR This is the first installment from a series of blog posts, where we discuss journey from DevOps to DevSecOps. Securing a DevOps system is on top of many engineering teams\u2019 minds but before we dive into specifics of DevSecOps&#8230; <a class=\"more-link\" href=\"https:\/\/musikaar.com\/blog\/devops\/devops-intro-preface-to-devsecops\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[10,11],"class_list":["post-51","post","type-post","status-publish","format-standard","hentry","category-devops","tag-devops","tag-primer"],"_links":{"self":[{"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/posts\/51","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/comments?post=51"}],"version-history":[{"count":8,"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/posts\/51\/revisions"}],"predecessor-version":[{"id":83,"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/posts\/51\/revisions\/83"}],"wp:attachment":[{"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/media?parent=51"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/categories?post=51"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/musikaar.com\/blog\/wp-json\/wp\/v2\/tags?post=51"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}