{"id":51919,"date":"2017-09-25T12:07:43","date_gmt":"2017-09-25T06:37:43","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=51919"},"modified":"2017-09-25T12:22:59","modified_gmt":"2017-09-25T06:52:59","slug":"container-orchestration-fundamentals-best-practices","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/container-orchestration-fundamentals-best-practices\/","title":{"rendered":"Container Orchestration &#8211; Fundamentals and Best Practices"},"content":{"rendered":"<h2><b>Introduction<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">More and more companies globally are catching up with the <a title=\"DevOps as a service\" href=\"http:\/\/www.tothenew.com\/devops-automation-consulting\">DevOps<\/a> trend. Companies are breaking down the siloed structure and automating delivery pipeline to reduce the release cycles and eliminate redundant tasks. While DevOps is gaining popularity, containers are not far in the race. \u00a0<\/span><a title=\"Container Technology\" href=\"http:\/\/www.tothenew.com\/blog\/why-cios-should-adopt-containers-technology\/\"><span style=\"font-weight: 400;\">Container technology<\/span><\/a><span style=\"font-weight: 400;\"> is bringing about a transformation in the packaging of these applications. Implemented together, they define true <\/span><a title=\"agility\" href=\"http:\/\/www.tothenew.com\/blog\/12-tips-to-succeed-at-managing-distributed-agile-teams\/\"><span style=\"font-weight: 400;\">agility.<\/span><\/a><\/p>\n<p><span style=\"font-weight: 400;\">New York-based <\/span><a title=\"451 Research\" href=\"https:\/\/451research.com\/?&amp;utm_campaign=2017_q1_press&amp;utm_source=press_release&amp;utm_medium=press&amp;utm_content=apply_for_trial&amp;utm_term=container_pr_q1_2017\"><span style=\"font-weight: 400;\">451 Research <\/span><\/a><span style=\"font-weight: 400;\">estimates that the application container market will grow from $762m in 2016 to $2.7bn by 2020 according to their<\/span> <a title=\"Cloud-Enabling Technologies Market Monitor report\" href=\"https:\/\/451research.com\/?&amp;utm_campaign=2017_q1_press&amp;utm_source=press_release&amp;utm_medium=press&amp;utm_content=apply_for_trial&amp;utm_term=container_pr_q1_2017\"><span style=\"font-weight: 400;\">Cloud-Enabling Technologies Market Monitor report<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<p><a title=\"Container technology has emerged as a reliable means\" href=\"http:\/\/www.tothenew.com\/blog\/infographic-8-key-benefits-of-using-container-technology\/\"><span style=\"font-weight: 400;\">Container technology has emerged as a reliable means<\/span><\/a><span style=\"font-weight: 400;\"> to quickly package, deploy &amp; run application workloads without the need for moving hardware or operating systems physically. They allow us to standardize the environment, enable a self-sufficient runtime environment and abstract away the specifics of the underlying operating system and hardware. They securely compartmentalize applications and enable running them side-by-side on the same machine, for efficient resource utilization.<\/span><\/p>\n<p>When Docker introduced the concept of containers, developers were developing products leveraging virtual machines (VMs) which were difficult to manage, hard to customize, needed huge disk space and turned out as an expensive solution. Virtual Machines also required manual efforts in installing them and taking up snapshots to product virtual disk images. They were also less flexible to evolving business needs.<\/p>\n<p><a title=\"Docker\" href=\"http:\/\/www.tothenew.com\/blog\/what-is-docker-and-why-use-it\/\"><span style=\"font-weight: 400;\">Docker<\/span><\/a><span style=\"font-weight: 400;\"> brought in an efficient &amp; neat way to create those images through the docker script language which automated the tedious task of creating snapshots manually. Docker images require less maintenance and provide greater security. It comes as an aid to several kinds of IT projects which require developers to rely on a single test server, built through scrum scripts on a virtual machine or where the customer application is to be deployed on the developer laptop despite different computing environments. Docker images can be shared between developers to have access to a debug environment and simplified software deployments whether on a private cloud or regular virtual machines.<\/span><\/p>\n<h2><b>Container Orchestration<\/b><\/h2>\n<div id=\"attachment_51925\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-51925\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-51925 size-large\" title=\"Container Orchestration\" src=\"\/blog\/wp-ttn-blog\/uploads\/2017\/09\/Container-blog_illust-1024x549.png\" alt=\"Container Orchestration\" width=\"625\" height=\"335\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2017\/09\/Container-blog_illust-1024x549.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2017\/09\/Container-blog_illust-300x161.png 300w, \/blog\/wp-ttn-blog\/uploads\/2017\/09\/Container-blog_illust-624x334.png 624w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-51925\" class=\"wp-caption-text\">Container Orchestration<\/p><\/div>\n<p><span style=\"font-weight: 400;\">With Docker, emerged the world of shared operating systems, simplification of software deployments &amp; the ability to run applications reliably across different computing environments. Its simplicity and rich ecosystem make it extremely powerful and easy to use. However, to be of use, containers need to communicate with other containers as well as with the outside world. Docker containers can be configured to expose parts to directories on the host as well as linked to communicate without exposing all resources to other systems. While deploying containers, in reality, developers usually need some degree of failover, load balancing, &amp; most importantly, services clustering. For this, the deployment of multiple containers to implement an application can be optimized through automation. As the number of containers &amp; hosts increase, this becomes increasingly significant and valuable. This type of automation is referred to as orchestration. It is often used to manage more than one container via orchestration tools.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Orchestration tools primarily manage the creation, upgradation\u00a0&amp; availability of multiple containers. They control the connectivity between containers and allow users to treat the entire cluster of containers as a single deployment target &amp; build sophisticated applications.<\/span><\/p>\n<p>The key functions of orchestration tools enable a developer to automate all aspects of application management, including:<\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Initial placement<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Scheduling <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Deployment<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Steady-state activities such as update <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Health monitoring functions that support scaling and failover<\/span><\/li>\n<\/ul>\n<h2><b>A Closer Look at Three Popular Orchestration Platforms<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Deploying on medium to large scale platforms requires resource scheduling, which is possible only when an orchestration tool is being leveraged. The most popular container orchestration tools across the industry are:<\/span><\/p>\n<ul>\n<li>\n<h3><b><b><a title=\"Docker Swarm\" href=\"https:\/\/docs.docker.com\/engine\/swarm\/\">Docker Swarm<\/a><\/b><\/b><\/h3>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Docker Swarm<\/span><span style=\"font-weight: 400;\"> is Docker&#8217;s own container orchestration tool. The objective of <\/span><span style=\"font-weight: 400;\">Docker Swarm<\/span><span style=\"font-weight: 400;\"> is to use the same Docker API that works with the core Docker Engine. Its key approach is that instead of targeting an API endpoint representing a single Docker Engine, it transparently deals with an endpoint associated with a set of Docker Engines. The primary advantage to this approach is that the existing tools and APIs will continue to work with a cluster in the same way they work with a single instance. Swarm also prevents provisioning of containers on faulty hosts via basic health monitoring.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Developers create their applications using Docker\u2019s tooling\/CLI and Compose &amp; they don\u2019t have to be re-coded to accommodate an orchestrator.<\/span><\/p>\n<ul>\n<li>\n<h3><b><b><a title=\"Kubernetes\" href=\"https:\/\/kubernetes.io\/\">Kubernetes<\/a><\/b><b> by Google<\/b><\/b><\/h3>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Google also has its own container orchestration tool called <\/span><a title=\"Getting started with Kubernetes\" href=\"http:\/\/www.tothenew.com\/blog\/getting-started-with-kubernetes\/\"><span style=\"font-weight: 400;\">Kubernetes<\/span><\/a><span style=\"font-weight: 400;\">. It works on the policy of master &amp; pods. The master is the control layer, which runs an API service that manages the whole orchestrator. Though a single master can control the entire setup, production environments usually have multiple masters. Kubernetes primary features include:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Automated deployment and replication of containers<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Online scaling of container clusters<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Managed exposure of network ports to systems outside the cluster<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Load balancing of containers<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Upgrades of application containers<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">It also supports health checks at different levels.<\/span><\/p>\n<ul>\n<li>\n<h3><b><b>Apache Mesos\/Marathon<\/b><\/b><\/h3>\n<\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Apache Mesos dates to pre-Docker era &amp; it is primarily a platform that manages computer clusters using Linux Cgroups in order to provide CPU, I\/O, file-system, and memory isolated resources. It works on a distributed systems kernel, or in more simple terms, a cluster platform which provides computing resources to frameworks<\/span><span style=\"font-weight: 400;\">. <\/span><a title=\"Marathon\" href=\"https:\/\/mesosphere.github.io\/marathon\/\"><span style=\"font-weight: 400;\">Marathon<\/span><\/a><span style=\"font-weight: 400;\"> is one such framework which specializes in running applications, including containers, on Mesos clusters.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">These simple tools with rich functionalities &amp; powerful APIs make containers and their orchestration a favorite among DevOps team. They also integrate these tools into the CI\/CD workflows.<\/span><\/p>\n<h2><b>Best practices for Container Orchestration for IT production<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">D<\/span><span style=\"font-weight: 400;\">igitally evolving companies practicing <\/span><a title=\"DevOps as a service\" href=\"http:\/\/www.tothenew.com\/devops-automation-consulting\"><span style=\"font-weight: 400;\">DevOps as a service<\/span><\/a><span style=\"font-weight: 400;\"> are constantly eager to leverage containers in optimizing their IT infrastructure via container orchestration. Let\u2019s look at some of the best practices that<\/span><span style=\"font-weight: 400;\"> IT teams and managers should be considering as they move container-based applications into production.<\/span><\/p>\n<h3><strong>1.\u00a0<\/strong><b style=\"font-weight: bold;\">Draw-up a Clear Path from Development to Production<\/b><\/h3>\n<p>The first step to ensuring a smooth move to production using container orchestration is drawing the path from development to production and having a staging platform in place. <span style=\"font-weight: 400;\">The containers require testing, validation &amp; need to be prepared for staging. The staging platform, created with or within an orchestration system should be a replica of the actual production configuration &amp; is usually at the end of a DevOps process. Once the containers are stable, they can be moved to production. Further, in case of issues with the deployment, they should be able to rollback at any time. This is an automatic mechanism in some systems.<\/span><\/p>\n<h3>2. Monitoring &amp; Automated Issue Reporting<\/h3>\n<p><span style=\"font-weight: 400;\">Technology team needs to understand what is going on within the container orchestration system. There are several monitoring &amp; management tools available to monitor containers, whether in the cloud or on premises. These monitoring systems enable technology teams \u00a0to:<\/span><\/p>\n<ul>\n<li><b><span style=\"font-weight: 400;\">Monitor system health by gathering data over time such as utilization of processor, memory, network etc and use it to analyze and determine relationships that indicate success or failure. <\/span><\/b><\/li>\n<\/ul>\n<ul>\n<li><span style=\"font-weight: 400;\">Take automatic actions based on findings, which prevent outages. Policies are set up within the monitoring software that allows doing this via established rules.<\/span><\/li>\n<\/ul>\n<ul>\n<li><span style=\"font-weight: 400;\">Perform continuous reporting of issues and react to issues with fixes that are continuously tested, integrated, and deployed so that the issues can be resolved in a short amount of time.\u00a0<\/span><\/li>\n<\/ul>\n<h3>3.\u00a0Set-up Automatic Data Backup and Disaster Recovery<\/h3>\n<p>While public clouds usually have an inbuilt disaster recovery mechanism, there could be accidental removal or corruption of data &amp; the failover capabilities may not be seamless. The development team needs to store data either within the container where the application is running or in an external database that may be container-based. The data, wherever it is stored, must be replicated to secondary and independent storage systems and protected in some way. Users should also be able to perform some backup &amp; recovery mechanisms &amp; security controls need to be set-up for appropriate access as per the customer\u2019s policies. For this, data recovery operations need to be defined, set-up, tested well and workable.<\/p>\n<h3>4. Capacity Planning for Production<\/h3>\n<p>Capacity planning for production is an essential best practice for both on-premises and public cloud-based systems. The development team needs to follow the following guidelines while planning for production capacity:<\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Understand the current, near future &amp; long-term capacity requirements in terms of the infrastructure needed by orchestration systems. This includes servers, storage, network, databases, etc. <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Understand the interrelationship between the containers, container orchestration, and other supporting systems (e.g., databases) and their impact on capacity. <\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Model the capacity of the servers in terms of storage, networking, security etc. by configuring these servers virtually within a public cloud provider, or physically using the traditional method.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Near-future, mid-future &amp; long-term growth plans need to consider with the capacity should be modeled around the forecasted resources required for this growth. <\/span><\/li>\n<\/ol>\n<h2><b>Conclusion<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">While container orchestration is still in its infancy, containerized architectures are quickly becoming a part of the <\/span><a title=\"Why CTO's should care about the DevOps culture?\" href=\"http:\/\/www.tothenew.com\/blog\/devops-culture-why-ctos-should-care\/\"><span style=\"font-weight: 400;\">DevOps CI\/CD workflows<\/span><\/a><span style=\"font-weight: 400;\">. The<\/span> <a title=\"Benefits of Container Technology\" href=\"http:\/\/www.tothenew.com\/blog\/infographic-8-key-benefits-of-using-container-technology\/\"><span style=\"font-weight: 400;\">benefits of container orchestration<\/span><\/a><span style=\"font-weight: 400;\"> stretch way beyond just ensuring business continuity and accelerating the time to market. With rich container orchestration tools enabling interaction between containers through well-defined interfaces, the modular container model serves as the backbone or the ideal deployment vehicle for microservice architectures. The <\/span><a title=\"Overview of Microservices Architecture\" href=\"http:\/\/www.tothenew.com\/blog\/an-overview-of-microservice-architecture-part-i\/\"><span style=\"font-weight: 400;\">Microservice architectures<\/span><\/a> <span style=\"font-weight: 400;\">enable organizations to architect their solutions around a set of decoupled services &amp; are commonly known as a uniquely aligned architecture to help achieve success. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you have some queries on container orchestration or need consultancy on DevOps, feel free to get in touch with one of our experts.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction More and more companies globally are catching up with the DevOps trend. Companies are breaking down the siloed structure and automating delivery pipeline to reduce the release cycles and eliminate redundant tasks. While DevOps is gaining popularity, containers are not far in the race. \u00a0Container technology is bringing about a transformation in the packaging [&hellip;]<\/p>\n","protected":false},"author":1011,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":9},"categories":[1993,4308,2348,3917,1994,1],"tags":[324,4252,1916,4737,1891,1892,4738,2651,3965,3977,4612],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/51919"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1011"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=51919"}],"version-history":[{"count":8,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/51919\/revisions"}],"predecessor-version":[{"id":51938,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/51919\/revisions\/51938"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=51919"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=51919"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=51919"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}