第12章クラウドネイティブアプリケーション開発
IaaS Deployment OptionsIaaSの配置方法の選択肢
Bare metal servers, VMs, unikernels, and containers are made available in an IaaS cloud service model. These deployment options offer a level of infrastructure control to address specific performance requirements, compliance considerations, and legacy dependencies. Bare metal servers offer the most control and flexibility but with more overhead to maintain them. Moving from bare metal toward containers, the deployment options require less overhead because there is an increased level of automation that makes these options quicker and easier to provision or get up and running. They are also more portable. These four deployment options, in order of more control versus more portability, are illustrated in Figure 12.30.
英語のヒント
IaaSのサービスモデルでは、ベアメタルサーバー、VM、ユニカーネル、コンテナーを利用できる。これらの配置方法は、特定の性能要件、規則への適合、従来の仕組みの依存関係に対応するため、基盤を制御する手段を提供する。ベアメタルサーバーは、最も大きな制御と柔軟性を提供するが、保守の負担も大きい。ベアメタルからコンテナーへ進むと、自動化のレベルが高まり、資源を用意して稼働させるのが速く容易になるため、負担が減る。移植性も高くなる。図12.30は、制御の大きさから移植性の高さへという順に、この4つの選択肢を示している。

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典
Figure 12.30 IaaS deployment options offer either more control or provide more portability. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図12.30 IaaSの配置方法は、より大きな制御、またはより高い移植性を提供する。(出典:Copyright Rice University, OpenStax、CC BY 4.0ライセンス)
Bare Metal Server
ベアメタルサーバー
A bare metal server is a high-performance cloud server that is composed of a single-tenant, nonvirtualized physical server. Customers have complete control over the server’s physical components of hardware, compute, and storage resources to optimize them to accommodate specific workloads. These servers may run any amount of work for the customer, or may have multiple simultaneous users, but they are dedicated entirely to the customer.
英語のヒント
ベアメタルサーバーは、単一の顧客向けの、仮想化していない物理サーバーからなる、高性能なクラウドサーバーである。顧客は、ハードウェア、計算、記憶領域の資源という物理的な構成要素を完全に制御し、特定のワークロードに合わせて最適化できる。このサーバーは、その顧客の任意の量の作業を実行でき、複数の利用者が同時に使う場合もあるが、完全にその顧客専用である。
Virtual Machines
仮想マシン
A virtual machine (VM) is a virtualization of a computer system. The process of creating software-based “virtual” versions of something such as compute, storage, networking, or applications is called virtualization. Virtualization is feasible because of a hypervisor, the software that runs on top of a physical server or a compute host that virtualizes it.
英語のヒント
仮想マシン(VM)は、コンピューターシステムを仮想化したものである。計算、記憶領域、ネットワーク、アプリケーションなどを、ソフトウェアによる「仮想的な」ものとして作る過程を、仮想化という。これを可能にするのがハイパーバイザーである。ハイパーバイザーは、物理サーバーや計算用ホストの上で動作し、それを仮想化するソフトウェアである。
Hypervisors virtualize the resources, such as CPUs, RAM, network, and, in some cases, storage, of the physical server. The hypervisor divides these resources while allocating what is needed for each operating system of a virtual server instance (VSI). The hypervisor, also referred to as a virtual machine monitor (VMM), is a software layer that lies between the physical hardware and the VSIs that run on top of it. The hypervisor allows for the scheduling of multiple VSIs with these divided resources. Thus, multiple virtual servers can run on a single physical server. Hypervisors also provide a level of security between VSIs so that data on one VSI is not accessible from another, maintaining isolation between them, as indicated by the dotted lines between the VSIs in Figure 12.31.
英語のヒント
ハイパーバイザーは、物理サーバーのCPU、RAM、ネットワーク、場合によっては記憶領域などの資源を仮想化する。資源を分割し、仮想サーバーインスタンス(VSI)の各OSに必要なものを割り当てる。仮想マシンモニター(VMM)とも呼ばれるハイパーバイザーは、物理ハードウェアと、その上で動くVSIの間に位置するソフトウェアの層である。分割した資源で複数のVSIをスケジュールできるため、1台の物理サーバーで複数の仮想サーバーを動かせる。また、VSI間に一定のセキュリティを提供し、1つのVSIのデータへ別のVSIからアクセスできないようにする。図12.31でVSI間の点線が示すように、互いの分離を保つ。

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典
Figure 12.31 Virtualization of compute resources via hypervisors is used to schedule VSIs. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図12.31 ハイパーバイザーによる計算資源の仮想化を使って、VSIをスケジュールする。(出典:Copyright Rice University, OpenStax、CC BY 4.0ライセンス)
Virtualization via hypervisors makes multitenancy of VSIs possible. This drives the cost of compute down. Physical servers individually can be quite costly. Virtualization is a cost-effective way to run multiple virtual servers on a single physical computer, thereby maximizing the utilization of resources and reducing cost.
英語のヒント
ハイパーバイザーによる仮想化は、複数の顧客がVSIを利用するマルチテナント方式を可能にし、計算の費用を下げる。物理サーバーは、1台ごとに大きな費用がかかる場合がある。仮想化は、1台の物理コンピューターで複数の仮想サーバーを動かす、費用対効果の高い方法であり、資源の利用を最大化し、費用を減らす。
As shown in Figure 12.32, VMs run like a physical server that runs on a hypervisor. They can run their own different operating systems and are completely independent of one another. Running multiple VMs from one physical server also drastically reduces a customer’s physical infrastructure footprint. VMs increase agility and speed because they can be provisioned quickly and easier, with automation, compared to provisioning an entire new physical server and environment. This also lowers downtime in case a VM unexpectedly fails because they are portable as they can be moved from one hypervisor to another on a completely different physical server quickly.
英語のヒント
図12.32のように、VMはハイパーバイザー上で、物理サーバーのように動作する。それぞれ異なる独自のOSを実行でき、互いに完全に独立している。1台の物理サーバーから複数のVMを動かすことで、顧客の物理基盤の規模も大幅に減る。VMは、新しい物理サーバーと環境を一式用意する場合と比べ、自動化によって素早く容易に用意できるため、俊敏性と速度が高まる。また、VMが予期せず故障した場合の停止時間も短くなる。移植性があり、完全に別の物理サーバーのハイパーバイザーへ、素早く移せるからである。

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典
Figure 12.32 Multiple VMs are created and run on a hypervisor. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図12.32 ハイパーバイザー上に複数のVMを作成し、実行する。(出典:Copyright Rice University, OpenStax、CC BY 4.0ライセンス)
Unikernels
ユニカーネル
Originally introduced as MirageOS, a unikernel is a single-purpose machine image that is compile-time specialized into a dedicated stand-alone kernel with only the libraries needed to run the application. Once deployed to a cloud platform, unikernels are protected against any modifications. Unikernels are built by compiling the application source code directly into a customized operating system that includes only the functionality required by the application logic, as shown in Figure 12.33. They are specialized machine images that run directly on a server’s hypervisor or on bare metal. Unikernels are considered more secure, compared to other cloud deployment technology options, due to their smaller attack surface.
英語のヒント
ユニカーネルは、当初MirageOSとして導入された、単一の目的を持つマシンイメージである。コンパイル時に特化され、アプリケーションの実行に必要なライブラリだけを含む、専用の独立したカーネルになる。クラウドプラットフォームへ配置すると、変更を受けないよう保護される。ユニカーネルは、図12.33に示すように、アプリケーションのソースコードを、そのロジックが必要とする機能だけを含む、専用に調整したOSへ直接コンパイルして構築する。サーバーのハイパーバイザー上、またはベアメタル上で直接動く、特化されたマシンイメージである。攻撃を受けうる範囲が小さいため、ほかのクラウド配置技術より安全性が高いと考えられている。

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典
Figure 12.33 Multiple unikernels are built as specialized images and run on a hypervisor. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図12.33 複数のユニカーネルを特化したイメージとして構築し、ハイパーバイザー上で実行する。(出典:Copyright Rice University, OpenStax、CC BY 4.0ライセンス)
Unikernels provide all the advantages of VMs and containers while reducing the server footprint needed to deploy applications, because unikernels offer a significant reduction in image sizes, have a reduced memory footprint, and greatly reduce the need for disk space. The unikernels architecture increases agility and speed. They have minimal overhead, and because they have faster load times with lower latencies, they can start up very quickly, making them faster than containers and VMs. Unikernels are also very portable. Their small size makes it easier and more cost effective to move them from one hypervisor to another.
英語のヒント
ユニカーネルは、VMとコンテナーの利点をすべて提供しながら、アプリケーションの配置に必要なサーバーの規模を減らす。イメージの大きさを大幅に削減し、メモリの使用量を減らし、ディスク領域の必要量も大幅に減らせるからである。ユニカーネルのアーキテクチャは、俊敏性と速度を高める。付随する負担はごく小さく、読み込み時間が短く遅延も小さいため、非常に素早く起動でき、コンテナーやVMより高速になる。移植性も高い。サイズが小さいため、あるハイパーバイザーから別のものへ、より容易に、より少ない費用で移動できる。
The adoption of unikernels remains low due to a combination of lack of awareness and low availability of orchestrators. They are becoming more prevalent in single-purpose devices such as network function virtualization (NFV) appliances, however data center adoption remains low.
英語のヒント
ユニカーネルの採用は、認知不足と利用できるオーケストレーターの少なさが重なり、依然として少ない。ネットワーク機能仮想化(NFV)機器などの単一目的の装置では広まりつつあるが、データセンターでの採用は依然として少ない。
Containers
コンテナー
Containers are a form of “operating system virtualization” that is more efficient than hardware virtualization because they utilize a full system hardware virtualization. In contrast, containers leverage and run on a single instance of an operating system where the virtualization is managed by the host operating system, as shown in Figure 12.34.
英語のヒント
コンテナーは「OS仮想化」の一形態であり、システムのハードウェア全体の仮想化を利用するため、ハードウェア仮想化より効率がよい。これに対して、図12.34に示すように、コンテナーはOSの単一インスタンスを利用してその上で動き、仮想化はホストOSが管理する。

attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license · CC BY 4.0 · Source出典
Figure 12.34 Multiple containers are built and run on a container engine. (attribution: Copyright Rice University, OpenStax, under CC BY 4.0 license)
図12.34 コンテナーエンジン上に複数のコンテナーを構築し、実行する。(出典:Copyright Rice University, OpenStax、CC BY 4.0ライセンス)
While VMs run as isolated servers on a hypervisor, containers share the same operating system and kernel of the host server. It appears as if each container runs on its own operating system and contains all the required binaries, libraries, and application code that is needed to run the application deployed in it. This is possible because containers run as isolated processes making it possible to run many containers on a single bare metal server or VM without any interference between them. Containers access shared resources of the operating system, but also remain as isolated processes because the shared kernel manages process isolation. Namespaces and control groups (cgroups) also help provide the illusion of process isolation. Namespaces allow for the customization and the appearance that each container instance has its own operating system. Control groups, on the other hand, monitor and manage shared resources controlled by the containers, which helps significantly reduce the number of compute instances needed to run applications.
英語のヒント
VMはハイパーバイザー上で分離されたサーバーとして動作するが、コンテナーはホストサーバーの同じOSとカーネルを共有する。各コンテナーは、自分専用のOS上で動き、その中に配置されたアプリケーションの実行に必要なバイナリ、ライブラリ、アプリケーションコードをすべて持っているように見える。これは、コンテナーが分離されたプロセスとして動くために可能であり、1台のベアメタルサーバーやVM上で、多くのコンテナーを互いに干渉させずに動かせる。コンテナーはOSの共有資源にアクセスするが、共有カーネルがプロセスの分離を管理するため、分離されたプロセスとしての状態も保つ。名前空間とコントロールグループ(cgroups)も、プロセスが分離されているという見え方を作るのに役立つ。名前空間によって設定を個別に調整でき、各コンテナーインスタンスが独自のOSを持っているように見せられる。一方、コントロールグループは、コンテナーが制御する共有資源を監視し、管理する。これによって、アプリケーションの実行に必要な計算インスタンスの数を大幅に減らせる。
Container deployment options include building your own container service, utilizing off-the-shelf Containers as a Service platforms, or choosing managed container services, such as managed Kubernetes, provided by large cloud service providers (CSPs). A Container as a Service (CaaS) is a type of IaaS specifically geared toward efficiently deploying, running, scaling, and managing a single application using a container-based virtualization. Container deployment using the build-your-own-service option requires the customer to manage the container technology, container scheduling and orchestration, as well as cluster management. Customers deploy the containers on top of IaaS, either bare metal or VM. The CSP, however, manages the underlying infrastructure.
英語のヒント
コンテナーの配置には、自前のコンテナーサービスを構築する、既製のContainers as a Serviceプラットフォームを利用する、大手クラウドサービス事業者(CSP)が提供するマネージドKubernetesなどの管理付きコンテナーサービスを選ぶ、という方法がある。Container as a Service(CaaS)は、コンテナーによる仮想化を用いて、1つのアプリケーションを効率よく配置、実行、拡張、管理することに特化したIaaSの一種である。自前のサービスを構築する方法では、顧客がコンテナー技術、コンテナーのスケジューリングとオーケストレーション、さらにクラスターの管理も担う。顧客は、ベアメタルまたはVMというIaaSの上にコンテナーを配置する。ただし、基盤そのものはCSPが管理する。
Container deployment using an off-the-shelf CaaS platform requires the customer to containerize the middleware, libraries, and applications or microservices. Customers deploy the containers on-premises or in a public (or off-premises private) cloud environment. This option has a higher overhead for the customer compared to PaaS because the customer is responsible for creating and updating the container images for each of these components. Container deployment using the managed container services option requires the customer to manage the workload. The CSP manages the container environment as well as the underlying infrastructure.
英語のヒント
既製のCaaSプラットフォームを使ってコンテナーを配置する場合、顧客はミドルウェア、ライブラリ、アプリケーションまたはマイクロサービスをコンテナー化する。配置先は、オンプレミス、パブリッククラウド、または社外のプライベートクラウド環境である。この方法では、各構成要素のコンテナーイメージを顧客が作成し、更新する責任を負うため、PaaSより顧客の負担が大きい。管理付きコンテナーサービスを使う場合、顧客が管理するのはワークロードである。CSPが、コンテナー環境とその基盤を管理する。