Hybrid Cloud for Developers - Manoj Hirway - E-Book

Hybrid Cloud for Developers E-Book

Manoj Hirway

0,0
31,19 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

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 ?exibility 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 ?exible cloud applications.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB
MOBI

Seitenzahl: 279

Veröffentlichungsjahr: 2018

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Hybrid Cloud for Developers

 

 

 

 

 

 

 

 

 

Develop and deploy cost-effective applications on the AWS and OpenStack platforms with ease

 

 

 

 

 

 

 

 

 

 

Manoj Hirway

 

 

 

 

 

 

 

 

 

 

BIRMINGHAM - MUMBAI

Hybrid Cloud for Developers

Copyright © 2018 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

Commissioning Editor: Vijin BorichaAcquisition Editor: Rohit RajkumarContent Development Editor: Sharon RajTechnical Editor: Mohit HassijaCopy Editor: Safis EditingProject Coordinator: Virginia DiasProofreader: Safis EditingIndexer: Mariammal ChettiyarGraphics: Tom ScariaProduction Coordinator: Shantanu Zagade

First published: April 2018

Production reference: 1190418

Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK.

ISBN  978-1-78883-087-4

www.packtpub.com

 

I dedicate this book to my lovely daughter, Pavitraa, who has been my constant source of energy.
mapt.io

Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website.

Why subscribe?

Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals

Improve your learning with Skill Plans built especially for you

Get a free eBook or video every month

Mapt is fully searchable

Copy and paste, print, and bookmark content

PacktPub.com

Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details.

At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks.

Contributors

About the author

Manoj Hirway has extensive industrial experience on various cloud and virtualization technologies. He is currently working as a solutions architect in a fast-growing start-up at Pune. He 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 on the market.

This book would not have been possible without the support of my publisher, Packt Publishing. I wish to especially thank Sharon Raj and Rohit Rajkumar for their guidance in creating this book. I am also grateful to my wife, Bhakti, my brother, Pankaj, and my parents, Mala and Nagesh for supporting me throughout the journey of this book.

About the reviewers

Neelesh Gurjar, working as a  DevOps lead, helps organizations to automate their software development phases, along with designing and implementing cloud infrastructures in various cloud service providers. He has more than 13 years of experience in IT. He is an expert in AWS, Google Cloud, DevOps, and Linux. He is AWS Certified Solution Architect Professional.

 

 

 

Vaibhav Bhatkar is an infrastructure, automation, and a security expert. Throughout his career, he has been deeply involved in designing, developing, and deploying on-premise/cloud/hybrid infrastructures, monitoring, and storage. He has consulted various start-ups at different growth stages to provide guidance on their data center and infrastructure hosting strategies. He is an EC council certified ethical hacker and a security analyst. He is currently leading the infrastructure team at a start-up.

 

 

 

 

 

Packt is searching for authors like you

If you're interested in becoming an author for Packt, please visit authors.packtpub.com and apply today. We have worked with thousands of developers and tech professionals, just like you, to help them share their insight with the global tech community. You can make a general application, apply for a specific hot topic that we are recruiting an author for, or submit your own idea.

Table of Contents

Title Page

Copyright and Credits

Hybrid Cloud for Developers

Dedication

Packt Upsell

Why subscribe?

PacktPub.com

Contributors

About the author

About the reviewers

Packt is searching for authors like you

Preface

Who this book is for

What this book covers

To get the most out of this book

Download the example code files

Download the color images

Code in action

Conventions used

Get in touch

Reviews

Introducing Hybrid Clouds

Understanding hybrid clouds

What is cloud computing?

Software as a Service

Platform as a Service

Infrastructure as a Service

Characteristics of a cloud

Types of cloud

Private cloud

Public cloud

Technologies used by cloud providers

Introducing hybrid cloud

Hybrid cloud architecture

Hybrid cloud using OpenStack and AWS/Azure/GCP

What qualifies as a hybrid cloud?

Cloud bursting in a hybrid cloud

Advantages of using hybrid cloud

Cost savings

Flexibility

Speed

Portability

Security

Factors to consider before moving to a hybrid cloud 

Understanding DevOps methodology

Collaboration

Automation

Continuous integration

Continuous testing

Summary

Exploring AWS Cloud

Introducing AWS Cloud 

Amazon Web Service features

Creating an AWS account

Amazon EC2

AMI

EC2 instance types

EC2 instance IP addressing

EC2 instance security groups

Launching an EC2 instance from the web console

Amazon EBS

Creating an AWS EBS volume

Snapshot of EBS volumes

Amazon S3

S3 bucket properties

Creating an S3 bucket using the AWS console

Uploading/downloading files to and from an S3 bucket

Using the AWS command-line interface

Using HTTP GET method or wget

Using AWS S3 API

Using the AWS console

Amazon VPC

Creating an AWS VPC

VPC configurations

Scenario 1 – VPC with public subnet only

Scenario 2 – VPC with public and private subnet

Scenario 3 – VPC with public and private subnet and VPN connectivity

Scenario 4 – VPC with private subnet only and VPN connectivity

VPC peering

Summary

Exploring OpenStack Private Cloud

Introducing OpenStack

OpenStack architecture 

Installing OpenStack 

NOVA – OpenStack Compute Service

Neutron – OpenStack Networking Service

Tenant networks

Provider networks

Glance – OpenStack Imaging Service

Cinder – OpenStack Block Storage Service

Keystone – OpenStack Identity Service

Horizon – OpenStack Dashboard Service

Heat – OpenStack Orchestration Service

Ironic – OpenStack bare metal provisioning

OpenStack workflow – launching a new virtual machine

Summary

Developing AWS Cloud Applications

Technical requirements

AWS – Software Development Kit (SDK)

Setting up an AWS development environment on Visual Studio

Setting up a Unix development environment for Python

Developing Amazon S3 applications – Windows

Creating an S3 bucket

Listing S3 buckets

Uploading files to the S3 bucket

Downloading files from the S3 bucket

Listing files in an S3 bucket

Deleting a file in an  S3 bucket

Developing AWS S3 applications – Unix 

Creating a bucket

Uploading files to S3

Listing S3 buckets

Downloading files from the S3 bucket

Deleting objects/files from a bucket

Deleting a bucket

Developing Amazon EC2 applications – Windows

Launching an EC2 instance

Checking the state of your EC2 instance

Connecting to the instance

Terminating the EC2 instance

Developing Amazon EC2 applications – Unix

Launching an EC2 instance in Python

Listing EC2 instances in Python

Terminating an EC2 instance in Python

Developing Amazon RDS applications – Windows 

DB Instance and instance classes

Creating an RDS instance

Listing the RDS database instances

Connecting to the database instance

Deleting the RDS database instance

Developing Amazon RDS applications – Unix

Creating an RDS instance

Listing the database instances

Connecting to the database instance

Deleting the RDS database instance

Developing Amazon SNS applications – Windows

Creating a topic

Subscribing to a topic

Publishing messages

Deleting the topic

Developing Amazon SNS applications – Unix

Creating a topic

Subscribing to a topic

Publishing a message 

Deleting a topic

Developing Amazon SQS applications – Windows 

Creating an SQS queue

Listing the available queues

Sending a message to the queue

Receiving a message from the queue

Deleting a message from the queue

Developing Amazon SQS applications – Unix

Creating an SQS queue

Sending a message to the queue

Receiving a message from the queue

Deleting messages from the queue

Amazon CloudFormation service

How CloudFormation works

A CloudFormation template

Executing the CloudFormation template

Summary

Developing OpenStack Applications

Technical requirements

Introduction to OpenStack SDK

Go

Java

JavaScript

.NET

PHP

Ruby

C

C++

Perl

Python

Creating an application development environment for OpenStack

Writing your first OpenStack application

Developing OpenStack image service applications 

Listing images

Downloading a VM image 

Uploading an image

Deleting the image

Developing OpenStack compute applications

Listing nova networks

Creating an SSH key-pair

Launching a VM

Starting a VM

Stopping a VM

Rebooting a VM

Pausing a VM

Unpausing a VM

Creating an image from a VM

IP address

Adding a fixed IP address

Removing a fixed IP address

Adding a floating IP address

Removing a floating IP address

Security groups

Adding a security group to a VM

Removing a security group from a VM

Listing security groups

Flavors

Listing flavors

Creating a flavor

Deleting a flavor

Developing OpenStack networking applications

Networks

Creating a network/subnet

Listing networks

Listing subnets

Listing ports

Listing routers

Listing network agents

Deleting a network

Creating a security group

Developing OpenStack Identity Service applications

 User management

Creating a user 

Deleting a user 

Updating a user

Finding  a user 

Roles

Creating a role

Updating a role

Deleting a role

Projects

Creating a project

Updating a project

Deleting a project

Developing block storage applications

Volumes

Creating a volume

Deleting a volume

Volume snapshots

Creating a snapshot

Deleting  a snapshot

Developing HEAT orchestration templates

Summary 

Cloud Migration

Choosing the right cloud provider

Setting up a hybrid cloud environment

Cloud migration

Application migration strategies

Rehosting 

Replatforming

Repurchasing

Refactoring 

Retiring 

AWS migration tools

AWS Migration Hub

AWS Application Discovery Service

AWS Server Migration Service

AWS Database Migration Service

AWS S3 Transfer Acceleration

AWS Snowball 

AWS Snowmobile

AWS Direct Connect

AWS Kinesis Firehouse

Migrating a VM to AWS

Migrating from AWS to OpenStack

Benefits of cloud migration

Risks of cloud migration

Cost benefits of cloud migration

Summary 

Hybrid Cloud Best Practices

Hybrid cloud strategy best practices

Pluggable architecture 

AWS root account 

Security group rules

Data backup

High availability 

Cloud monitoring

Cloud automation

Cloud orchestration

Co-locating data and application tiers

Scaling 

Vertical scaling 

Horizontal scaling   

Legacy applications

Resource utilization and costs

Centralized cloud management

Designing for failure

Caching

Retry operation

Limiting requests

Error reporting

Application decoupling

Continuous delivery and integration

Deploying the application at multiple locations

Developing the application locally or in the cloud

Summary

Monitoring and Troubleshooting Hybrid Cloud

Troubleshooting OpenStack

Linux troubleshooting and monitoring tools

Troubleshooting the OpenStack Identity service

Authentication issues

Keystone service issues 

Keystone database issues 

Troubleshooting the OpenStack Image service

Glance service issues

Glance database issues

Troubleshooting the Networking service

IP address allocation to the VM 

Unable to ping to VM

VM cannot reach the external network

Troubleshooting the Compute service

Database issues 

Instance issues 

Volume issues

Troubleshooting the Block Storage service

Common issues

Troubleshooting the Object Storage service

Swift authentication

Troubleshooting the Orchestration service

Service errors

Stack errors

Troubleshooting AWS

AWS Direct Connect

EC2 instance issues

Instance connection issues

Empty console output

SSH key issues

EBS volume issues 

Volume stuck in Attaching state

Volume in Error state

Volume snapshot in Pending state

S3 object store issues 

Troubleshooting OpenVPN issues

OpenVPN log files

VPN connection issues

Authentication issues

Starting and stopping OpenVPN

Summary

Hybrid Cloud Security

Hybrid cloud security threats 

Lack of encryption

User symmetric key encryption

Encrypting data before uploading to the cloud

Protecting data at rest and in transit with a cloud access security broker  

Using a reliable VPN connection

Using SSH

Key management

Lack of compliance

Lack of data backup and replication 

Unsecure application APIs

Denial of service attacks

Data leaks

Virtualization software security

Virtual machine security

Patch management

Intrusion detection and prevention

Identity access management

Developing secure applications

Data manipulation

Coding practices

User input validation

Security testing

Summary 

Other Books You May Enjoy

Leave a review - let other readers know what you think

Preface

In the past decade, cloud computing has emerged as a leading technology that is now used widely across different industries. Depending on the business need, different cloud computing models emerged. Enterprise applications now run on the cloud platform. As the requirements grew, there was a need for a hybrid cloud computing model. Cloud applications are now required to be cloud independent, and they should be able to run on any cloud. This was the main motivation of this book.

This book mainly focuses on hybrid cloud platforms. It introduces the reader to the hybrid cloud environment and teaches how to develop effective, robust, and flexible hybrid cloud applications. It talks about the migration techniques, best practices, and troubleshooting skills required to effectively manage a hybrid cloud platform.

Who this book is for

If you are an IT professional, developer, or a DevOps engineer looking to develop and manage your applications on the hybrid cloud platform, then this book is for you. This book will also benefit beginners to hybrid cloud computing. Developers looking to build applications using AWS or OpenStack services will benefit from this book.

What this book covers

Chapter 1, Introducing Hybrid Clouds, will cover the basic concepts of cloud computing. You will get familiar with the terminology used in cloud computing, types of cloud, and the advantages that cloud offers.

Chapter 2, Exploring AWS Cloud, will make you familiar with the Amazon Web Services (AWS) cloud and the various features, such as EC2 and EBS, that it offers. You will learn how to leverage the AWS technology in your day-to-day project requirements. 

Chapter 3, Exploring OpenStack Private Cloud, will help you learn about the open source OpenStack platform. You will get familiar with various OpenStack components, such as Nova, Cinder, and Neutron.

Chapter 4, Developing AWS Cloud Applications, will teach you to set up the development environment for building AWS applications and develop AWS applications using the SDKs provided by Amazon.

Chapter 5, Developing OpenStack Applications, will enable you to start building OpenStack applications using the OpenStack SDK and REST APIs.

Chapter 6, Cloud Migration, will discuss migrating your applications across clouds. It talks about various considerations to be made while migrating applications.

Chapter 7, Hybrid Cloud Best Practices, will talk about the best practices to be followed while developing and working with hybrid cloud environments.

Chapter 8, Monitoring and Troubleshooting Hybrid Cloud, will discuss various monitoring and troubleshooting techniques for AWS and OpenStack clouds.

Chapter 9, Hybrid Cloud Security, will discuss the security implications to be considered on a hybrid cloud environment (AWS and OpenStack).

To get the most out of this book

Although this book is suitable for any IT professional who wishes to explore the hybrid cloud platform and develop applications, to get the most out of this book, the reader is expected to know basics of cloud computing and object oriented programming. Familiarity with C# or Python will be very helpful to understand the code examples in this book.

To try out the code in this book, the reader must have a PC with standard configuration with basic knowledge of running C# or Python programs.

Download the example code files

You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

Log in or register at

www.packtpub.com

.

Select the

SUPPORT

tab.

Click on

Code Downloads & Errata

.

Enter the name of the book in the

Search

box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

WinRAR/7-Zip for Windows

Zipeg/iZip/UnRarX for Mac

7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Hybrid-Cloud-for-Developers. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

Download the color images

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it from https://www.packtpub.com/sites/default/files/downloads/HybridCloudforDevelopers_ColorImages.pdf.

Code in action

Visit the following link to check out the code in action:

https://goo.gl/xmbUzE

Conventions used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "Invoke this function by calling it from the main() function."

A block of code is set as follows:

public static void Main(string[] args)

{

createS3Bucket(); // invoke the method to create an S3 bucket

listS3Buckets(); // invoke the method to list all S3 buckets

Console.ReadKey();

}

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

public static void Main(string[] args){ createS3Bucket(); // invoke the method to create an S3 bucket

listS3Buckets();

// invoke the method to list all S3 buckets Console.ReadKey();}

Any command-line input or output is written as follows:

[ec2-user ~] # aws s3 cp s3://<bucketname>/<path to file>/<filename> myfile.txt

Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Next, click on Continue to select your Support Plan."

Warnings or important notes appear like this.
Tips and tricks appear like this.

Get in touch

Feedback from our readers is always welcome.

General feedback: Email [email protected] and mention the book title in the subject of your message. If you have questions about any aspect of this book, please email us at [email protected].

Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.

Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.

If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.

Reviews

Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!

For more information about Packt, please visit packtpub.com.

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