{"id":1106,"date":"2019-01-22T09:29:57","date_gmt":"2019-01-22T09:29:57","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw93\/?p=1106"},"modified":"2019-01-24T03:58:48","modified_gmt":"2019-01-24T03:58:48","slug":"microservices-and-containers-microservices-orchestration","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw93\/index.php\/2019\/01\/22\/microservices-and-containers-microservices-orchestration\/","title":{"rendered":"Microservices and Containers | Microservices Orchestration"},"content":{"rendered":"<p>Rancher Labs has been developing open source projects for about two<br \/>\nyears now. We have a ton of GitHub repositories under our hood, and<br \/>\nour number keeps growing. The number of external contributions to our<br \/>\nprojects keeps growing, too; Rancher has become more well-known over the<br \/>\npast year, and structural changes to our code base have made it easier<br \/>\nto contribute. So what are these structural changes? I would highlight 3<br \/>\nmajor ones:<\/p>\n<ol>\n<li>Moving key Rancher features into separate microservices projects<br \/>\n(Metadata, DNS, Rancher compose, etc.)<\/li>\n<li>Dockerizing microservices orchestration<\/li>\n<li>Cataloging Dockerized application templates, and enabling them for<br \/>\ndeployment through the Rancher catalog<\/li>\n<\/ol>\n<p>Item 2 acts as a bridge from 1 to 3. In this article, I will go over<br \/>\neach item in more detail.<\/p>\n<h2>Moving key Rancher features to microservices<\/h2>\n<p>It is well-known that monolithic systems come with certain<br \/>\ndisadvantages:<\/p>\n<ul>\n<li>Their code bases are not easy to understand and modify<\/li>\n<li>Their features are hard to test in isolation<\/li>\n<li>They have longer test and release cycles.<\/li>\n<\/ul>\n<p>But even if your code base is pluggable and well-structured, the last<br \/>\ntwo challenges note above persist. Moving code into microservices helps<br \/>\nto overcome these challenges, and creates a lower threshold for external<br \/>\ncommitters: if you are new to open source development and willing to<br \/>\nstart contributing, smaller projects are simply easier to grasp. In<br \/>\naddition, if you look at the project pull request history for Rancher<br \/>\nExternal DNS, you might see something interesting: <a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/15125536\/DNS-Providers.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/15125536\/DNS-Providers.png\" alt=\"DNS Service\nProvide pull\nrequests\" \/><\/a><br \/>\nThe majority of commits came from people with knowledge of<br \/>\ndifferent service providers. From a contributor\u2019s point of view, having<br \/>\nand bringing in specific service provider expertise reduces the pressure<br \/>\nassociated with making initial contributions to the project. And of<br \/>\ncourse, the project benefits from getting all these provider extensions.<\/p>\n<h2>Dockerizing microservices<\/h2>\n<p>Let\u2019s say as a contributor, you\u2019ve created this new cool<br \/>\nDNSimple provider plug-in. It was released with an external-dns service,<br \/>\nand now you want to try it in Rancher. To adopt the changes, you<br \/>\ndon\u2019t have to wait for the next Rancher release, nor do you have to<br \/>\nchange the Rancher code base. All you have to do is:<\/p>\n<ul>\n<li>fetch the last released image from the <a href=\"https:\/\/hub.docker.com\/r\/rancher\/external-dns\/tags\/\">external-dns dockerhub<br \/>\nrepo<\/a><\/li>\n<li>create a docker-compose template with your service\u2019s deployment<br \/>\ndetails<\/li>\n<\/ul>\n<p><a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/09155736\/docker-compose.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/09155736\/docker-compose.png\" alt=\"docker-compose\" \/><\/a><\/p>\n<ul>\n<li>Register your image in <a href=\"https:\/\/github.com\/rancher\/rancher-catalog\">Rancher catalog<br \/>\nrepo<\/a> (more on how to<br \/>\ndeploy it from Rancher catalog, in the next section).<\/li>\n<\/ul>\n<h2>Deploying the service through Rancher catalog<\/h2>\n<p>At Rancher, we want to provide an easy way for users to describe and<br \/>\ndeploy their Docker-based applications. The Rancher catalog makes this<br \/>\npossible. By selecting an entry from the catalog, and answering several<br \/>\nquestions, you can launch your service through the Rancher platform.<br \/>\n<a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/09152420\/Screen-Shot-2016-06-09-at-3.23.56-PM.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/09152420\/Screen-Shot-2016-06-09-at-3.23.56-PM.png\" alt=\"Screen Shot 2016-06-09 at 3.23.56\nPM\" \/><\/a><br \/>\nAll the services are grouped by category, so it is easy to search for a<br \/>\nspecific functionality:<\/p>\n<h2><a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/09152601\/grouping-by-category.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/09152601\/grouping-by-category.png\" alt=\"grouping by category\" \/><\/a><\/h2>\n<p>Pick your newly added DNSimple service, fill in the fields and hit<br \/>\nLaunch: <a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/09164213\/Screen-Shot-2016-06-09-at-4.42.00-PM.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/09164213\/Screen-Shot-2016-06-09-at-4.42.00-PM.png\" alt=\"Screen Shot 2016-06-09 at 4.42.00\nPM\" \/><\/a><br \/>\nThat\u2019s it! Your service gets deployed in Rancher, and can be discovered<br \/>\nand used by any other application. The catalog enables easy upgrades for<br \/>\nmicroservices. Once the new service image is available and its template<br \/>\nis published to the catalog, Rancher will get a notification, and<br \/>\nyour service can be upgraded to the latest version in a rolling fashion.<br \/>\nThe beauty of this is that you don\u2019t have to update or upgrade Rancher<br \/>\nwhen a new version of a microservice gets released. Besides providing a<br \/>\nsimple way of defining, deploying and upgrading microservices, the<br \/>\nRancher Catalog acts as a shared template library. If you are interested<br \/>\nbuilding an Elasticsearch microservice, using GlusterFS, or dockerizing<br \/>\nDroneCI, check out their corresponding catalog items. And if you want to<br \/>\nshare your application, you can submit it to our <a href=\"https:\/\/github.com\/rancher\/community-catalog\">Community catalog<br \/>\nrepo<\/a>.<\/p>\n<h2>How microservices benefit Rancher as an orchestration platform<\/h2>\n<p>We\u2019ve seen the single service implementation and deployment flow; let\u2019s<br \/>\nlook at the bigger picture now. Any container orchestration platform<br \/>\nshould be easily extendable, especially when it comes to implementing a<br \/>\nspecific service provider extension. Building and deploying this<br \/>\nextension shouldn\u2019t be tightly coupled to the core platform, either.<br \/>\nMoving out the code to its own microservice repo, dockerizing the<br \/>\nservice, and allowing it to deploy it using catalog, makes everything<br \/>\neasier to maintain and support (as pictured below): <a href=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/15131338\/Rancher-catalog-templates.png\"><img decoding=\"async\" src=\"http:\/\/cdn.rancher.com\/wp-content\/uploads\/2016\/06\/15131338\/Rancher-catalog-templates-1024x526.png\" alt=\"Rancher catalog\nservices\" \/><\/a><br \/>\nWe are planning to move the rest of Rancher\u2019s key services to their own<br \/>\nmicroservices. This will allow users to integrate the system service<br \/>\nplugins of their choice with just a couple of clicks.<\/p>\n<p>Moving our key services \u2013 Metadata, Internal DNS \u2013 into dockerized<br \/>\nmicroservices written in Go has helped with the release management, and<br \/>\ndriven more external commits. We\u2019ve taken things one step further and<br \/>\ndeveloped an application catalog where users can share their<br \/>\napplications\u2019 templates in docker-compose format. This has taught us<br \/>\nmore about best DevOps best practices from within our community, made us<br \/>\nmore familiar with their use cases, and helped us improve our<br \/>\nmicroservices implementations. Working on an open source project is<br \/>\nalways a two-way street \u2013 making your code easier to understand and<br \/>\nmanage helps the community contribute to and enhance the project. We<br \/>\nhave an awesome community, and appreciate every single contribution.<br \/>\nWe will continue improving contributors\u2019 experience and learning from<br \/>\nthem.<\/p>\n<p><a href=\"https:\/\/rancher.com\/dockerized-microservices-rancher\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rancher Labs has been developing open source projects for about two years now. We have a ton of GitHub repositories under our hood, and our number keeps growing. The number of external contributions to our projects keeps growing, too; Rancher has become more well-known over the past year, and structural changes to our code base &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw93\/index.php\/2019\/01\/22\/microservices-and-containers-microservices-orchestration\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Microservices and Containers | Microservices Orchestration&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1106","post","type-post","status-publish","format-standard","hentry","category-kubernetes"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1106","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/comments?post=1106"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1106\/revisions"}],"predecessor-version":[{"id":1140,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/posts\/1106\/revisions\/1140"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/media?parent=1106"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/categories?post=1106"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw93\/index.php\/wp-json\/wp\/v2\/tags?post=1106"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}