Hybrid Cloud for Developers

By Manoj Hirway
  • Instant online access to over 7,500+ books and videos
  • Constantly updated with 100+ new titles each month
  • Breadth and depth in over 1,000+ technologies
  1. Introducing Hybrid Clouds

About this book

This book introduces you to the hybrid cloud platform, and focuses on the AWS public cloud and OpenStack private cloud platforms. It provides a deep dive into the AWS and OpenStack cloud platform services that are essential for developing hybrid cloud applications. You will learn to develop applications on AWS and OpenStack platforms with ease by leveraging various cloud services and taking advantage of PaaS.

The book provides you with the ability to leverage the flexibility of choosing a cloud platform for migrating your existing resources to the cloud, as well as developing hybrid cloud applications that can migrate virtual machine instances from AWS to OpenStack and vice versa. You will also be able to build and test cloud applications without worrying about the system that your development environment supports.

The book also provides an in-depth understanding of the best practices that are followed across the industry for developing cloud applications, as well as for adapting the hybrid cloud platform. Lastly, it also sheds light on various troubleshooting techniques for OpenStack and AWS cloud platform services that are consumed by hybrid cloud applications.

By the end of this book, you will have a deep understanding of the hybrid cloud platform and will be able to develop robust, efficient, modular, scalable, and flexible cloud applications.

Publication date:
April 2018
Publisher
Packt
Pages
280
ISBN
9781788830874

 

Chapter 1. Introducing Hybrid Clouds

Welcome to the world of hybrid cloud computing. This chapter introduces you to the basic concepts of cloud computing and the fundamentals of the hybrid cloud landscape. It also talks about the architecture of a hybrid cloud and the advantages of using a hybrid cloud.

The following topics are covered in this chapter:

  • Understanding hybrid clouds
    • What is cloud computing?
    • Basic types of cloud: Public, private
    • Technologies used by cloud providers
    • The hybrid cloud
  • Hybrid cloud architecture
  • Advantages of a hybrid cloud
  • Factors to consider before moving to a hybrid cloud
  • Understanding the DevOps methodology
 

Understanding hybrid clouds


Before we delve into the world of hybrid clouds, it is necessary to discuss some fundamental concepts of cloud computing.

What is cloud computing?

In the last few years, cloud computing has become a popular technology for acquiring and providing computing, network, and storage infrastructure that provides elastic, scalable, and reliable resources. Cloud computing also helps in outsourcing parts of the organization's IT infrastructure to highly-automated commercial data centers. Large companies such as Amazon, Google, and Microsoft have reliable and scalable infrastructures that they have opened for public use by providing cloud services. Cloud computing technology thus emerged, along with supporting technologies such as virtualization, containerization, and software-defined networking.

In today's world, individuals use cloud technologies for various daily activities. For example, Google Drive is used to store files, Google Photos is used to store web albums, and so on. Similarly, organizations also use cloud computing platforms extensively. For computing, resources such as servers, storage, databases, networks, software, and so on are required. These resources can either be dedicated to a user’s system or can be provided by an external source. Cloud computing is thus a delivery of services such as infrastructure, computing, storage, database, networks and software from a consolidated platform over the internet. The companies that provide such services are called cloud providers.

Cloud providers typically provide three layers of service :

  • Software-as-a-Service (SaaS)
  • Platform-as-a-Service (PaaS)
  • Infrastructure-as-a-Service (IaaS)

Lets discuss these models in brief.

Software as a Service

Software as a Service (SaaS) is a cloud service that provides access to software such as Microsoft Office, Google Apps, and so on. It allows the user to connect to and use the software application over the internet. Most SaaS applications can be accessed directly using a web browser with a plugin, and without performing any large downloads or installations. For example, companies such as Salesforce, Google (Gmail), Microsoft (Office 365), and so on, are all SaaS providers.

Users need to subscribe to the SaaS provider to use their services. The subscription costs are lower than the cost of purchasing the software license and then installing and maintaining it. Using SaaS, organizations are able to mobilize their workforce since users are able to access SaaS applications over the internet.

Platform as a Service

Platform as a Service (PaaS) provides a platform on which software can be created and launched. It is mostly used by software developers to access a development platform and provision computer infrastructure. Users can then create software applications through software components that are created in the PaaS.

The main advantage of the PaaS model is that all applications built on this platform inherit all the characteristics of the cloud. Software development, testing, and launching are also much faster on PaaS, as it requires lesser coding and helps in migrating applications to hybrid clouds. Users can manage servers, storage, and networking more efficiently using a PaaS.

Examples of PaaS services include AWS Elastic Beanstalk, Windows Azure, Heroku, Salesforce, Google App Engine, and Apache Stratos.

Infrastructure as a Service

The Infrastructure as a Service (IaaS) cloud computing model enables automated deployment of compute, storage, networking, and networking services. Using this cloud mode, users can build a virtual data center in the cloud with as many resource capabilities as found in traditional data centers. In addition, users can create their private data centers in the cloud and establish a VPN connectivity with their local data centers.

IaaS also provides Application Programming Interfaces (APIs) for software developers to access cloud resources programmatically.

Thus, users don't have to invest in hardware and are able to leverage the cloud resources and then be billed based on consumption. Cloud providers such as Amazon (AWS), Microsoft (Azure), Google (GCP), and so on, are examples of companies that provide IaaS.

The following diagram summarizes the differences between IaaS, PaaS, and SaaS:

As shown here, in traditional software deployments, the entire stack is managed by the organization that implements the system. IaaS reduces the burden of managing the Networking, Storage, Servers, and Virtualization layers by owning and managing them. Thus, the user no longer has to worry about these layers and can focus on the software applications.

PaaS further relieves the user from managing the Operating System, Middleware and Runtime layers, thus leaving only the application management and data management responsibilities to the user.

Finally, a SaaS provider will own and manage the entire stack and the user just has to log in to the host to perform their activities.

Characteristics of a cloud

A cloud service should have the following characteristics:

  • On-demand service: The user of the cloud should be able to provision resources on their own without any human action or intervention from the cloud providers.
  • Wide network accessibility: The cloud resources should be available over the network to users either using a thick or thin client.
  • Resource pooling: Cloud resources such as servers, disk storage, and so on should be dynamically allocated and de-allocated to users based on the demand. The same resources can be shared or pooled between users, giving them a virtually isolated instance of the resource. 
  • Rapid elasticity: Resources should be easily scalable. Based on the user's requests, resources should be scaled up and scaled down, giving an impression that there are more than enough resources available at a given point in time.
  • Measured service: A cloud should also have the ability to measure the consumption of resources, as well as automatically control and optimize those resources.

Types of cloud

There are two fundamental types of cloud models:

  • Private cloud
  • Public cloud

A combination of these two types of cloud yields a third type of cloud, called a hybrid cloud.

Private cloud

The cloud platform can be deployed and hosted privately on organizational premises. The services of such a cloud platform are made available to internal users of the organization. This cloud is referred to as a private cloud.

A private cloud shares many of the characteristics of public cloud computing, including resource pooling, self-service, elasticity, and pay-by-use, delivered in a standardized manner with the additional control and customization available from dedicated resources.

OpenStack is an open source cloud operating system that can be deployed within an organization and hosted as a private cloud. We will cover OpenStack in detail in Chapter 3, Developing AWS Cloud Applications.

It's common to store data on cloud storage using  Software Defined Storage (SDS) technologies. SDS helps in decoupling the storage hardware, such as HDD and SSD, from the software that is used to manage the storage. This provides the ability to abstract and consolidate the storage capacity in a cloud. It also allows users to scale beyond the underlying hardware limitations.

Two of the most widely used software-defined storage solutions are Ceph for structured data and Gluster for unstructured data. Ceph is popular for its scalability. It also provides a programmable storage system that works well with the OpenStack cloud platform because it integrates object, block, and file storage into one pool of resources. Similarly, Gluster is popular for handling traditional file storage and works well with provisioning and managing elastic storage for container-based applications. OpenStack Swift is another object storage solution that is popular today.

Advantages of a private cloud:

  • Reduced cost of usage
  • More control over services, data, and users
  • Higher security as the cloud platform resides within the organization’s network
  • Higher performance as the cloud is on the local network

Disadvantages of a private cloud:

  • High infrastructure cost
  • High maintenance and administration costs
  • Proper resource utilization is administrator's responsibility

Public cloud

When IT resources such as computing servers, storage, development platforms, applications, and so on are made available as a service over the internet and can be provisioned on demand using a publicly available self-service portal, such an offering is called a public cloud. Public clouds offer rapid elasticity and limitless scalability. They provide a measured service in which users are billed based on their usage.

Public clouds are hosted and managed using datacenters that belong to cloud service providers. The resources can be shared by multiple customers. This feature is called multi-tenancy. Sharing resources helps in reducing costs. However, there is reduced control over the resources in a public cloud than in a private cloud, because the underlying infrastructure is owned by the service provider. The level of control depends on the specific cloud delivery model.

There are many public cloud providers on the market, such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). We will be covering the AWS cloud in detail in this book.

Advantages of a public cloud:

  • No administration and maintenance costs
  • Simple and easy to use
  • Quickly available on demand

Disadvantages of a public cloud:

  • Security is a concern as data goes to a public network
  • Lack of full control over the cloud

Technologies used by cloud providers

A cloud platform is a combination of various technologies tied together to create a hyper-converged platform. The three basic technologies that lay the foundation of a cloud are as follows:

  • Hypervisor: A hypervisor is a combination of software, firmware, and sometimes hardware that is capable of running a virtual machine. A hypervisor that is capable of running a virtual machine on bare metal hardware is referred to as a Type 1 hypervisor. For example, VMWare ESXi server and Microsoft Hyper-V server are Type 1 hypervisors. The hypervisors that run on an operating system are referred to as Type 2 hypervisors. For example, Oracle VirtualBox, and VMWare Workstation are Type 2 hypervisors. OpenStack uses the Type 2 QEMU/KVM hypervisor as the default hypervisor. Similarly, AWS uses the Type 1 XEN hypervisor.
  • Storage:Cloud storage is based on a virtualized storage infrastructure, which provides elasticity, multi-tenancy, scalability, and metered resource usage. Cloud storage mainly comes in object storage and block storage solutions. The OpenStack component that provides object storage is called Swift and the one that provides block storage is called Cinder. The AWS component for object storage is called S3, whereas for block storage is called EBS.
  • Software Defined Networking (SDN): Most of the networking is managed by networking software such as OpenContrail, OpenVPN, and so on. AWS provides features such as Virtual Private Cloud, DirectConnect, and so on, which are provided by SDN. Similarly, OpenStack has a component called Neutron that can be used to configure OpenStack networking such as DHCP, DNS, Gateway, and so on.
 

Introducing hybrid cloud


As organizational business grows, there is a need to extend the enterprise operation along with the IT infrastructure. In other words,  the onsite data center needs to be extended by adding more servers and resources to fulfill business demands. There is also a need to optimize and perform efficient utilization of available resources. High-end servers can't be left underutilized, as this will be a waste of the available resources. Purchasing more and more IT equipment increases the organizational infrastructure costs. Also, large servers tend to occupy more and more space in data centers. This becomes a problem and there is a need for a flexible and scalable model that will allow on-demand infrastructure scale-up and scale-down.

One solution is to use a private cloud that provides on demand scaling up and scaling down of the infrastructure by spinning up virtual machines. A private cloud will certainly solve the problem of flexible scaling and efficient utilization of resources. However, since a private cloud resides within the data center, it still requires large amounts of physical resources, which must be owned by the organization. Despite efficient utilization of resources, if the organization needs more infrastructure, a private cloud doesn't completely solve the problem, as the cost of owning the infrastructure must still be borne by the organization.

So, the other solution is to migrate the entire data center to a public cloud such as AWS or Azure. A public cloud will ensure that we have ample resources that can be scaled up and down based on requirements. Organizations don't have to worry about purchasing large servers and arranging floor space for accommodating them in their private data centers. 

However, there are many downsides to using a public cloud. Migrating existing applications to the cloud is complex. There are portability problems as system architectures differ. Also, as the resources are scaled up and the data center expands, the costs can climb significantly. The overall costs of using a public cloud are high. Moreover, there are security concerns. Since organizational data could be confidential, putting it on a public network would not be liked by the IT security teams. Thus, using a public cloud alone doesn't solve the problem either.

Since both public and private cloud models have their pros and cons, there is a need to combine both the models and create a more suitable platform for the organization's needs. A cloud platform that is a combination of private and public clouds, and connected using an encrypted network, is referred to as a hybrid cloud. The National Institute of Standards and Technology (NIST) defines a hybrid cloud as follows: "A hybrid cloud is a combination of public and private clouds connected together using a standardized network link that enables portability of data and applications." It could be a combination of a private cloud inside an organization with one or more public cloud providers, or a private cloud hosted on third-party premises with one or more public cloud providers. 

A typical use case of the hybrid cloud model is a combination of customer facing systems (such as mobile phones) and systems of record management. For example, an e-commerce organizations might leverage their data center to manage transactions made by their customers using the frontend that is running on a public cloud. In other words, the frontend running on a public cloud will be connected to the datacenter. An organization might also use a third-party cloud service that verifies the credit of customers who choose to pay using the EMI option. They may also use the public cloud to expand their servers in case of high network traffic during online sales and holiday periods.

The hybrid cloud is  thus becoming a widely used cloud model that adapts to rapid changes in technology and business in terms of networking, storage, and computing requirements.

Hybrid cloud architecture

As discussed in the previous section, a hybrid cloud is a combination of public and private clouds connected together using a secure connection. The following diagram shows a high-level overview of a typical hybrid cloud architecture. A simple hybrid cloud model involves one private cloud that is tied to the organization's data center and one public cloud, which is located offsite.

Both these clouds are connected using an encrypted network connection by VPN. An encrypted connection can be established using any of the available VPN applications, such as OpenVPN:

Fig 1.2: A typical hybrid cloud architecture

The public cloud could be any of the available cloud providers, such as AWS Cloud, Microsoft Azure, and so on. Similarly, a private cloud could be one of the most widely used open source cloud platforms, OpenStack, or a custom-built private cloud.

Hybrid cloud using OpenStack and AWS/Azure/GCP

The following diagram shows a hybrid cloud architecture created using the OpenStack private cloud and public clouds such as AWS, Azure, or GCP. The combination of these two clouds creates a hybrid cloud environment:

Fig 1.3: Hybrid cloud architecture created using the OpenStack private cloud and public clouds

Combining public cloud services with private clouds services along with the data center, thus creating a hybrid model, is needed in modern computing. Many companies now combine public cloud and private cloud services to create value.

If you have more than one cloud environment (public and private), then it is a good approach to have a management platform that spans these environments. If each of these clouds is managed separately, there is a duplication of efforts and the operations are prone to human error.

There are several startups and established companies that have developed software that allows users to centrally manage both private datacenters and public cloud infrastructure and applications. Managing virtual machines, storage, databases, and other resources can be done using a single console, which makes it easy to administer the entire operations on a hybrid cloud.

The following diagram shows another perspective of a hybrid cloud architecture using OpenStack:

Here, the OpenStack components exist inside the boundaries of the organizational network. They use a proxy server for interfacing with the external public cloud providers. These proxy servers may act as a mediator between the public and private cloud environments. 

Various OpenStack components such as Cinder, Neutron, and Nova collaborate with each other and also interact with the external public cloud to create a hybrid cloud architecture. OpenStack will be discussed in detail in later chapters.

What qualifies as a hybrid cloud?

There are certain conditions that must be met for a cloud to be qualified as a hybrid cloud.

A cloud is hybrid if:

  • The organization data center is connected to the public cloud and sends/receives data from the public cloud
  • An organization leverages a number of SaaS applications and moves data between private or data center resources
  • An organizational business process is designed in such a way that it leverages the use of private and public clouds

A cloud is not hybrid if:

  • Only a handful of people in the organization use the public cloud for deploying or testing applications, and it is completely disconnected from the data center
  • An organization is using a SaaS application for a project, but there is no movement of data from that application into the organization's data center

The following diagram summarizes the characteristics of public, private, and hybrid clouds:

Cloud bursting in a hybrid cloud

Cloud bursting is one of the most important features of a hybrid cloud. It helps in scaling applications across public clouds.

Consider an application that is running in a private cloud or a local computing environment. Suppose a  situation arises where the application needs additional resources such as computing power, storage, memory, and so on. In such a scenario, the application can burst into the public cloud and use the resources available there to ensure continuity and smooth operations. In other words, the application can expand itself to start using the resources of the public cloud on demand. This is called cloud bursting.

However, this can add complexity to the application design and special skills are required to design the application to leverage cloud bursting capabilities. There are vendors that provide hybrid cloud solutions that facilitate taking advantage of cloud bursting.

Advantages of using hybrid cloud

As discussed in the previous sections, a hybrid cloud offers the cost and scale benefits of public clouds, while also offering the security and control of private clouds. In this section, we will highlight some of the business benefits of hybrid clouds.

Cost savings

Since the high-end infrastructure is outsourced to the public cloud provider, there is a cost saving.

Temporary IT and development projects require temporary resources. For example, IT companies keep performing several Proof of Concepts (POC), which requires IT resources only till the duration of the project. These resources can be easily created and destroyed in the private or private cloud without spending too much.

An application may require different kinds and levels of resources during its life cycle. For a production grade environment, a public cloud can be used, whereas, for testing phases, a private cloud will suffice.

High-end servers have maintenance costs and their vendor contracts must be renewed periodically. Large applications that require high-end servers can be migrated to the public cloud and thus maintenance costs and effort can be saved.

Flexibility

A hybrid cloud offers the flexibility of control of a private cloud and at the same time, the agility of a public cloud. The private cloud component of the hybrid cloud can be customized as per the needs of the organization.

Also, when an organization requires additional computing resources, a public cloud can easily scale-up and satisfy additional needs.

Speed

High-end servers and computing resources can be spun up in a matter of minutes to satisfy  organizational needs quickly on public clouds. High-speed internet links can also be established between data centers, thus delivering high performance.

Portability

By leveraging container technology such as Docker, applications can be containerized and made portable across several cloud platforms. For example, a containerized application can be easily migrated from the OpenStack private cloud to the AWS public cloud.

Security

Since an encrypted link or VPN is established between the public and private cloud of the organizational data center, confidential network data can be safely transferred across clouds.

Factors to consider before moving to a hybrid cloud 

As discussed previously, moving the organization's data center to a hybrid cloud offers several advantages. However, changing the IT infrastructure of the organization could be a complex task. It may also be expensive. Hence, the following factors should be considered before choosing to migrate the infrastructure to a hybrid cloud environment:  

  • Skilled engineers: A hybrid cloud setup can become very complex, depending on the organization's IT infrastructure and customization. Highly skilled and experienced IT engineers must be available to perform the cloud migration and maintenance. 
  • High bandwidth for data transfer: To set up a hybrid cloud, a large amount of data may have to be moved from the private cloud to the public. This may involve high bandwidth utilization and may also affect the productivity of the existing engineers. Organizations should also be prepared to incur higher costs involved in large amount of data transfer.
  • Resource management: Since hybrid cloud resources are scalable, all the resources must be utilized efficiently. The usage of CPU, memory, and storage should be monitored to ensure resources are not wasted. 
  • Compliance: Organizations that deal with sensitive and critical data have their own compliance policies. When moving to the hybrid cloud, periodic audits should be done to ensure that the cloud platform meets requirements.
  • Load balancing: Appropriate load balancing techniques should be considered so that a single machine doesn't get overloaded with resource requests. 

Now that we know the fundamentals of hybrid clouds, lets turn our attention to the software development methodologies that are suitable for working on cloud platforms.

Understanding DevOps methodology

Historically, many software companies followed the waterfall model of software development. The waterfall model involved the following stages:

  1. Requirement analysis
  2. System design
  3. Implementation
  4. Testing
  5. Deployment
  6. Maintenance

In this, each stage was virtually isolated and was mostly performed by a different set of people. It had poor integration between development, infrastructure, security, and support teams. Moreover, the teams working on each stage would report to different organizational structures with different corporate goals and philosophies. The primary goal of developers was to build the software, whereas the operations team had the goal of deploying software and ensure stability and reliability. This mismatch of goals would cause conflicts and ultimately the business would also suffer. Hence, there was a need to have more collaboration and communication between the software development teams and the operations teams.

The Agile software methodology addresses these concerns, and a modification to the agile model gave rise to DevOps.

DevOps is a faily new methodology that primarily focuses on improved collaboration, communication, and integration between software developers and IT operations. It is not a system, but a  philosophy, cultural change, and paradigm shift in the way organizations' work.

The following diagram depicts a DevOps approach to software development.

The different between the Agile model and DevOps is that Agile software development primarily focuses on the collaboration between the business and its developers, whereas the DevOps model focuses on the collaboration between developers, IT operations, and security teams.

IT operations include system administrators, database administrators, network engineers, infrastructure architects, and support engineers. The DevOps methodology means different things to different teams. For application developers, DevOps focuses on code building, code coverage, unit testing, packaging, and deployment. For IT operations teams, DevOps focuses on provisioning, configuration, orchestration, and deployment. But the basic principles of DevOps remain the same, irrespective of the teams and tasks being worked on.

The following are six important DevOps practices that are widely used by organizations who have chosen to adopt this methodology:

  • Collaboration
  • Automation
  • Continuous integration
  • Continuous testing
  • Continuous delivery
  • Continuous monitoring

Collaboration

As we discussed, the fundamental need from which the DevOps model arose is the lack of collaboration between software development teams and IT operations  teams. The DevOps methodology not only implements effective collaboration between these two teams, but also to every other stakeholder of the software. 

Automation

DevOps puts a heavy emphasis on automation. All possible tasks, such as software testing, infrastructure provisioning, software deployment, and so on, must be automated. This can be achieved using automation tools. There are several automation tools available in the market. Jenkins is one such tool, which can be used to automate several tasks such as code compilation, software testing, and so on.

Continuous integration

Continuous integration forces software developers to integrate their work with other developers. This exposes any integration issues much earlier than the release date and hence helps in fixing problems earlier. This approach definitely requires developers to communicate with each other and discuss their work and integration approaches. 

Continuous testing

Continuous testing involves testing of the software code with every code change that is merged into the codebase. Developers should not only make sure that they deliver error-free code, but also provide test datasets to the testing teams and help them in configuring the testing environment so it is as close to the production environment as possible.

Use of automation testing tools reduces the cost and time of testing and frees up engineers to use their time more effectively.

Thus, in order to make the journey to the cloud efficient and effective, software companies must adapt the DevOps methodology for their software development and IT infrastructure deployment strategies.

 

Summary


Hybrid cloud proves to be helping tremendously in building an agile and future-ready hybrid IT environment. Backed by the advantages of public and private clouds, which involve a comprehensive and integrated suite of cloud resources, a hybrid cloud environment helps organizations leverage the flexibility and scalability of public clouds, along with the security and control of their own private infrastructure.

Using a hybrid cloud model, organizations can create a highly optimized IT environment, where they can leverage their own physical resources in their data centers to deploy mission critical applications, and put the non-critical apps on the public cloud. Organization now have the flexibility to choose between different cloud models, based on scalability, performance, and security requirements.

In the next chapter, we will start exploring the AWS public cloud.

 

About the Author

  • Manoj Hirway

    Manoj Hirway has extensive industrial experience on various cloud and virtualization technologies. He is currently working as a Solutions Architect in a fast growing startup at Pune. He has acquired a bachelor’s degree in Computer Engineering from Pune Institute of Computer Technology. He loves to explore new technologies. He wishes to help our readers by sharing his knowledge about the tech trends in the market.

    Browse publications by this author