Book Image

Cloud-Native Continuous Integration and Delivery

By : Onur Yılmaz
Book Image

Cloud-Native Continuous Integration and Delivery

By: Onur Yılmaz

Overview of this book

<p>Cloud-native software development is based on developing distributed applications focusing on speed, stability, and high availability. With this paradigm shift, software development has changed substantially and converted into a more agile environment where distributed teams develop distributed applications. In addition, the environment where the software is built, tested and deployed has changed from bare-metal servers to cloud systems. In this course, the new concepts of cloud-native Continuous Integration and Delivery are discussed in depth. Cloud-native tooling and services such as cloud providers (AWS, Google Cloud) containerization with Docker, container-orchestrators such as Kubernetes will be a part of this course to teach how to analyze and design modern software delivery pipelines.</p>
Table of Contents (6 chapters)

Cloud-Native Architecture


Cloud-native application development focuses on building and running applications that utilize the advantages of cloud services. This focus does not mandate any specific cloud provider to deploy the applications; however, it concentrates on the approach of development and deployment. It consists of creating agile, reusable, and scalable components, and deploying them as resilient services in dynamically orchestrated cloud environments. Cloud-native services are essential since they serve millions of customers daily and empower social networks such as Facebook, Twitter, online retailers such as Amazon, real-time car-sharing applications such as Uber, and many more.

Note

For more comprehensive information on cloud-native technologies, please refer to the following link: https://github.com/cncf/toc/blob/master/DEFINITION.md.

Knowing the differences between conventional and cloud-native approaches is essential. Specifically, conventional and cloud-native application development can be distinguished through the following four views:

  • Focus: Conventionally, applications are designed for long lifespans that are included with years of maintenance agreements. However, cloud-native applications focus on how quickly applications can be market-ready with flexible subscription agreements.

  • Team: Conventional software teams work independently of each other and focus on their specified areas, such as development, operations, security, and quality. In contrast, cloud-native applications are collaboratively developed and maintained by DevOps teams that comprise members focusing on different areas.

  • Architecture: Monolithic applications and the firmly coupled dependencies between them are the mainstream architectural approaches of conventional software. An example of monolithic design could be an e-commerce website where four different software components, namely the user frontend, checkout, buy, and user promotions are packaged as a single Java package and deployed to production. Each of these components may have several different functions aimed at addressing certain objectives of the website. All components call each other via function calls, and thus they are strictly dependent on each other. For instance, while creating an invoice, the buy package will directly call, for example, the CreateInvoice function of the checkout package. On the contrary, cloud-native applications are loosely coupled services communicating over defined APIs. When the same e-commerce website is designed with loosely coupled components, all of the components can call each other over API calls. With this approach, the buy package will create a POST request to a REST API endpoint, for example, /v1/invoice, to create the invoice.

  • Infrastructure: Conventional applications are installed on and deployed through large servers that have been configured according to the end user environment. On the contrary, cloud-native applications run as containers and are ready to run, irrespective of vendor-specific requirements. Besides, capacity planning is for peak demand in traditional software systems; however, cloud-native applications are run on a scalable, on-demand infrastructure.

In addition to the comparison with conventional software development, there are more characteristics of the cloud-native architecture. In the following section, all key cloud-native architecture characteristics are explained in depth. Note that most features have emerged with cloud-native applications and have changed the method of software development.

Cloud-Native Application Characteristics

Characteristics of cloud-native applications can be grouped into three categories: design, development, and operations. These groups also indicate how cloud-native architectures are implemented throughout the life cycle of software development. First, design characteristics focus on how cloud-native applications are structured and planned. Then, development characteristics focus on the essential points for creating cloud-native applications. Finally, operations concentrate on the installation, runtime, and infrastructure features of cloud-native architecture. In this section, we will discuss all three characteristics in detail.

Design: Design is categorized into microservices and API communication:

  • Microservices: Applications are designed as loosely coupled services that exist independent independently of each other. These microservices focus on a small subset of functionalities and discover other services during runtime. For instance, frontend services and backend services run independently, and the frontend finds the IP address of the backend from service discovery to send queries. Each service focuses only on its functionalities and does not directly depend on another service.

  • API Communication: Services are designed to use lightweight API protocols to communicate with each other. APIs are versioned, and services interact with each other without any inconsistency. For instance, the frontend service reaches the backend via a REST API, and all API endpoints are versioned. For example, consider a versioned endpoint API: /v1/orders. When the backend is updated and changes its REST API, the endpoints will start with v2 instead of v1. It ensures that the frontend still works with v1 endpoints until it gets updated to work with v2 endpoints without any inconsistency.

Development: Development is categorized into most suitable programming language and light weight containers:

  • Most Suitable Programming Language: Cloud-native applications are developed using a programming language and framework that is most suited for its functionality. It is aimed to have various programming languages working together while exploiting their best features. For instance, REST APIs could be developed in Go for concurrency, and the streaming service could be implemented in Node.js using WebSockets. Frontend services are not required to know the implementation details, as long as the programming languages implement the expected APIs.

  • Lightweight containers: Cloud-native applications are packaged and delivered as containers. Each container consists of minimum requirements, such as operating system and dependency libraries of the service, in order to be as lightweight as possible. Containers enable scalability and encapsulate microservices for efficient management. For instance, the frontend and its JavaScript libraries create a Docker container, whereas the backend and its database connectors create another Docker container. Each service is packaged, self-sufficient, and can be scaled easily without knowing the internals of services.

Operations: Operations in categorized into isolation, elastic cloud infrastructure, and automation:

  • Isolation: Cloud-native applications are isolated from their runtime and operating system dependencies, as well as those of other applications. This feature enables service portability without making any further modifications. For instance, the same container image of the frontend service could simultaneously run on the laptop of the developer for testing new features and on AWS servers to serve millions of customers.

  • Elastic Cloud Infrastructure: Cloud-native applications should run on a flexible infrastructure that could expand with usage. These flexible infrastructures are public or on-premise cloud systems that are shared by multiple services, users, and even companies, to achieve cost efficiency.

  • Automation: Cloud-native applications and their life cycles should be automated as much as possible. Every step of development and deployment, such as integration, testing, provisioning of infrastructure, monitoring for capability, log collection, and auto-scaling and alerting, needs automation. Automation is crucial for reliable, scalable, and resilient cloud-native applications. Without automation, there are numerous manual steps to provision the infrastructure, configure the applications, run them, and check for their statuses. All of these manual steps are prone to human error, and it is unlikely to create reliable and robust systems that are scalable.

In this section, we saw the basic characteristics of cloud-native applications. In the next section, we will see how cloud-native architectures and the DevOps culture complement each other to yield successful application development and deployment.