{"id":832,"date":"2020-03-30T22:00:00","date_gmt":"2020-03-30T22:00:00","guid":{"rendered":"http:\/\/bullyrooks.com\/index.php\/2020\/04\/11\/simple-spring-boot-service-to-kubernetes-application-step-22-e37d26471e9e\/"},"modified":"2021-02-04T02:20:38","modified_gmt":"2021-02-04T02:20:38","slug":"simple-spring-boot-service-to-kubernetes-application-step-22-e37d26471e9e","status":"publish","type":"post","link":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-22-e37d26471e9e\/","title":{"rendered":"Conclusion and Review"},"content":{"rendered":"\n<p class=\"graf graf--p graf-after--h3 graf--trailing\" id=\"e8b4\">Up to this point we\u2019ve been writing, testing, building, deploying and integrating services. Lets take a moment to reflect on what we have accomplished and why.<\/p>\n\n\n\n<p class=\"graf graf--p graf--leading\" id=\"d0b1\">Here we are at 22 articles in. That seems like a lot, but I wanted to write these articles in an easily ingested way that allows you to see progress each step of the way. It seems like we\u2019ve done a lot and we should review what we did and why.<\/p>\n\n\n\n<h3 class=\"graf graf--h3 graf-after--p wp-block-heading\" id=\"7714\">Microservices<\/h3>\n\n\n\n<p class=\"graf graf--p graf-after--h3\" id=\"8773\">We\u2019re using microservices both for the back end as well as the front end. This is important to understand. We\u2019re choosing this architecture for a few good reasons and accepting some significant drawbacks while we do that.<\/p>\n\n\n\n<h4 class=\"graf graf--h4 graf-after--p wp-block-heading\" id=\"0698\">Advantages<\/h4>\n\n\n\n<p class=\"graf graf--p graf-after--h4\" id=\"196f\">Microservices are smaller to write, they\u2019re easier to develop, test and build. Additionally, they\u2019re easier to read, update and debug. If we design with the single responsibility principle in mind (i.e. A class (service or system) should have only one reason to change) we have more flexibility to evolve our system.<\/p>\n\n\n\n<h4 class=\"graf graf--h4 graf-after--p wp-block-heading\" id=\"0b80\">Disadvantages<\/h4>\n\n\n\n<p class=\"graf graf--p graf-after--h4\" id=\"2aac\">We\u2019re going to have <strong class=\"markup--strong markup--p-strong\">LOTS<\/strong> of services and this is a <strong class=\"markup--strong markup--p-strong\">HUGE<\/strong> problem. Lots of services means lots of maintenance, lots of monitoring, lots of service governance, lots of building, lots of deploying. As you can see there\u2019s a lot of work that goes into building and deploying a service with the helm deployment descriptors and the pipeline workflow.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"6df9\">Writing and developing services this way is also a huge shift in the role of the software engineer. I strongly feel that software engineers must own large aspects of the testing, building, deploying and monitoring of their systems when they go this route. There are way too many moving parts to throw testing over the wall to the QA team, creating dependencies on devOps to build and deploy your application and relying on production reliability teams to monitor the state of the system. Software engineers <strong class=\"markup--strong markup--p-strong\">MUST <\/strong>become experts in the components of their application and <strong class=\"markup--strong markup--p-strong\">MUST <\/strong>be involved in all aspects of the software development lifecycle from product vision to production monitoring.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"7bfb\">It can seem like there\u2019s a lot of disadvantage and not much advantage here. That\u2019s true if you don\u2019t consider the power of the tools that we\u2019re using.<\/p>\n\n\n\n<h3 class=\"graf graf--h3 graf-after--p wp-block-heading\" id=\"9658\">Using The Platform to Our Advantage<\/h3>\n\n\n\n<p class=\"graf graf--p graf-after--h3\" id=\"beb5\">Software development has been evolving over the past few decades of web based software applications. Significant changes have created huge improvements in productivity which engineers can leverage to absorb their new responsibilities without drowning under the load.<\/p>\n\n\n\n<h4 class=\"graf graf--h4 graf-after--p wp-block-heading\" id=\"140f\">Frameworks<\/h4>\n\n\n\n<p class=\"graf graf--p graf-after--h4\" id=\"edc5\">Software frameworks have reduced the amount of code that is needed to support application and service functionality. This is significant because previously all of the functionality that these frameworks provide used to be built in-house which meant that you ended up building larger applications and services. Since the \u2018utility\u2019 logic of documentation, testing, security, logging, etc\u2026 is not core to the business it tended to get written once and ignored because the main priority of the business is on the product logic. You didn\u2019t want to \u2018spread around\u2019 flaky utility logic by making lots of services because upgrading that logic was cumbersome.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"47eb\">Frameworks like Spring and React (and other front end frameworks) have basically eliminated the need to write and maintain that code. Framework developers are more focused on their features (the utility logic) so it is better designed, implemented and tested. That means that we can write smaller services because we have a solid foundation on which to start our new service development.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"269e\">Testing frameworks also fall under this category. Tools like rest template, wiremock, H2, etc\u2026 allow software delivery team members to write meaningful, behavior driven tests without needing to depend on a QA team to test our application (although their system knowledge and edge case knowledge can definitely make software engineering developed tests better).<\/p>\n\n\n\n<h4 class=\"graf graf--h4 graf-after--p wp-block-heading\" id=\"8770\">Build Tools and Pipelines<\/h4>\n\n\n\n<p class=\"graf graf--p graf-after--h4\" id=\"0a54\">Tools like maven, grade and npm eliminate the need to write custom build logic for each service. This means that we can support more applications or services because they generally all operate off the same convention and produce the same product consistently.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"a37c\">Additionally pipeline tools have evolved to the point where a software delivery team member can effectively write and support their application build and deployment without the need of a devOps specialist (although their help is definitely needed and greatly appreciated).<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"57a1\">Again, these automation tools allow software delivery engineers to be able to maintain more services, so we can write smaller services.<\/p>\n\n\n\n<h4 class=\"graf graf--h4 graf-after--p wp-block-heading\" id=\"234d\">Containerization and Virtualization<\/h4>\n\n\n\n<p class=\"graf graf--p graf-after--h4\" id=\"71ab\">It cannot be overstated about how important containerization has been to give the ability to provide a consistent deliverable artifact. We can (almost) eliminate all of the wasted time related to \u201cit works on my machine\u201d. With containerization we can segment our application and prioritize a homogeneous stack or if the need arises we can switch to a heterogeneous stack. We can evolve individual services independently, which means that (again) we can support more (and\/or smaller) deliverable artifacts.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"e5fd\">Finally, we have a new language to communicate with our devOps peers. We don\u2019t have to talk about how to build and configure artifacts if we can deliver a container that is capable of running on its own. We can focus on an entirely new deliverable and own more of the workflow that generates it.<\/p>\n\n\n\n<h4 class=\"graf graf--h4 graf-after--p wp-block-heading\" id=\"c3fc\">Container Management and Orchestration<\/h4>\n\n\n\n<p class=\"graf graf--p graf-after--h4\" id=\"c493\">Containers are fine, but when we have more (smaller) applications and services we need a platform that can manage their lifecycle (killing unresponsive instances, starting up new instances, integration and communication between those instances, etc\u2026). The platform concept arose very quickly after containerization because it was a necessity. As software engineers we\u2019re not usually exposed to the operational aspect and monitoring as much. Primarily this was as aspect of the complexity of the system. Operations focused on physical servers, networking, operating systems and security. Application deployment was just another task for them and it was usually a difficult one (depending on the quality of the software teams). However, most of these tasks (server setup and configuration, network communication, etc\u2026) has been abstracted out to the platform. This means that software delivery team members that have enough foresight (and capacity) to learn about these systems become extra valuable and more productive because they can work directly with their devOps peers instead of handing out tickets.<\/p>\n\n\n\n<h3 class=\"graf graf--h3 graf-after--p wp-block-heading\" id=\"d0b6\">Conclusion<\/h3>\n\n\n\n<p class=\"graf graf--p graf-after--h3\" id=\"6000\">This may just be my opinion, but writing smaller services means that you\u2019ll have better services and a more robust application system. Not only will this system be better performing (in terms of scalability), but it will be easier to maintain and debug as well as easier to evolve as business needs change.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"7505\">We have to swallow a giant bitter pill of complexity to achieve that. However, we can leverage frameworks, build pipelines, containerization and container orchestration platforms to significantly reduce the cost of that complexity. This means that the software engineers role changes somewhat because they must become proficient in all of those tools.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"e9c8\">We\u2019re at 22 articles in (so far. I have more to write) and we\u2019re done a bunch of stuff just to deploy what is basically a single page that reports from a database. It can seem like overkill. However, most of what we have done is foundation work that only needs to be done once and can be reused in new services or features.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"d6ed\">What is the level of effort it would take to create a customer creation page? Add a form to the web application, with a post to the service we\u2019ve already written?<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"60d5\">If we updated the web application to do that, what would it take to be able to deploy that? I think it would be a push to master and then copy the new chart version number into our umbrella chart and hit <code class=\"markup--code markup--p-code\">helm upgrade<\/code>.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"2aca\">How difficult would it be to add the services needed adding and listing items? If we created them would we, as a sole delivery team member, be able to support all four (customer, customer management, item, item management) services (in terms of development, testing, building and deploying them)? I think so.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"a50a\">Finally, how difficult would it be to take this application from one kubernetes vendor to another? For example, if we\u2019re hitting the limit on the free tier with our current vendor and found a better deal somewhere else. I think this would involve a change in our <code class=\"markup--code markup--p-code\">kubeconfig <\/code>file and a <code class=\"markup--code markup--p-code\">helm install<\/code> on the new cluster (in addition to some DNS work). I think a single person (or very small team) would be capable of doing that without needing a whole separate operations effort.<\/p>\n\n\n\n<p class=\"graf graf--p graf-after--p\" id=\"05b3\">There\u2019s more work to be done and I plan on continuing this series, but I thought this was a good place to take a step back, look at the trail we just walked and think about where we could end up.<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"entry-summary\">\nUp to this point we\u2019ve been writing, testing, building, deploying and integrating&hellip;\n<\/div>\n<div class=\"link-more\"><a href=\"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-22-e37d26471e9e\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &ldquo;Conclusion and Review&rdquo;<\/span>&hellip;<\/a><\/div>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[41],"tags":[104,106,105,87,55,96,42],"course":[40],"class_list":["post-832","post","type-post","status-publish","format-standard","hentry","category-software-development","tag-architecture","tag-container-management","tag-containerization","tag-distributed-services","tag-microservice","tag-react","tag-spring","course-spring-with-kubernetes","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1333,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/27\/kube-cloud-pt5-create-a-consumer-service\/","url_meta":{"origin":832,"position":0},"title":"Kube Cloud Pt5 | Create a Consumer Service","author":"Bullyrook","date":"February 27, 2022","format":false,"excerpt":"In this course we're going to migrate the repository storage function out of cloud-application and migrate it into a new service called message-repository. Although this is a relatively minor change in behavior (in exchange for a significant effort), there are some real world benefits that this example will provide cloud-application\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/pg1.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/pg1.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/bullyrooks.com\/wp-content\/uploads\/2022\/02\/pg1.png?resize=700%2C400&ssl=1 2x"},"classes":[]},{"id":815,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-14-8e1ade0b7b84\/","url_meta":{"origin":832,"position":1},"title":"System Design","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"We\u2019ve successfully deployed a service and confirmed that its accessible. However, a single service doesn\u2019t make an app. We now need to fill out the rest of the application and introduce some best practices around service governance and system engineering. The Application Design We\u2019re going to be organizing the UI\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":827,"url":"https:\/\/bullyrooks.com\/index.php\/2020\/03\/30\/simple-spring-boot-service-to-kubernetes-application-step-1-d67f80487848\/","url_meta":{"origin":832,"position":2},"title":"Setup: IDE and New Project","author":"Bullyrook","date":"March 30, 2020","format":false,"excerpt":"\u00a0Its very easy to get a spring boot microservice up and running. You can read any variety of articles on medium (or other service) on how to do that. However, there\u2019s little about how to do some of the more complicated things that you need in order to support a\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1276,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/02\/19\/kube-cloud-pt4-observability\/","url_meta":{"origin":832,"position":3},"title":"Kube Cloud Pt4 | Observability","author":"Bullyrook","date":"February 19, 2022","format":false,"excerpt":"In this course, I'm going to walk through how to implement the 3 pillars of observability on our example application using the logz.io platform. Before we do that, I'm going to explain the 3 pillars of observability, which are: LoggingTracingMetrics Logging Logz.io uses ELK for their log management platform. There's\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1047,"url":"https:\/\/bullyrooks.com\/index.php\/2021\/05\/30\/migrating-away-from-google-photos-using-your-nas-overview\/","url_meta":{"origin":832,"position":4},"title":"Migrating Away From Google Photos Using your NAS : Overview","author":"Bullyrook","date":"May 30, 2021","format":false,"excerpt":"Recently, Google has announced that they will no longer support storing unlimited photos in the high resolution format for free. This bothered me a little bit, because google photo storage is so convenient that I use it a lot and therefore would be affected by their data cap. Additionally, I'm\u2026","rel":"","context":"In &quot;Home Networking&quot;","block_context":{"text":"Home Networking","link":"https:\/\/bullyrooks.com\/index.php\/category\/technology\/home-networking\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1141,"url":"https:\/\/bullyrooks.com\/index.php\/2022\/01\/02\/kubernetes-application-hosted-in-the-cloud\/","url_meta":{"origin":832,"position":5},"title":"Kubernetes Application Hosted in the Cloud","author":"Bullyrook","date":"January 2, 2022","format":false,"excerpt":"It's been a few years since my last spring boot based kubernetes application. That course ended with a microservice deployed into kubernetes via minikube locally. I'm using this course to expand on that effort. In this course I'm going to show a few ways to do the same things in\u2026","rel":"","context":"In &quot;Software Development&quot;","block_context":{"text":"Software Development","link":"https:\/\/bullyrooks.com\/index.php\/category\/software-development\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/832","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/comments?post=832"}],"version-history":[{"count":3,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/832\/revisions"}],"predecessor-version":[{"id":919,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/posts\/832\/revisions\/919"}],"wp:attachment":[{"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/media?parent=832"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/categories?post=832"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/tags?post=832"},{"taxonomy":"course","embeddable":true,"href":"https:\/\/bullyrooks.com\/index.php\/wp-json\/wp\/v2\/course?post=832"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}