In an edge computing environment, control over where your instances are placed is everything. Being able to locate workloads closer to the user implies a physical affinity direction relative to the user, and thus some way to model that in the infrastructure, as well as some way to direct workloads accordingly. In OpenStack, that is done with Availability Zones.
Historically, availability zones were used in monolithic datacenter deployments to define boundaries between dependent systems. Ideally this provided a way for API users to place workloads on compute nodes that did not share critical resources, such as power, cooling, and networking. The important piece of data for placing an edge workload is more about the geography or distance from a user, but the fundamental idea is the same: choosing a group of resources that share some common attribute. Indeed, an edge site will also very likely not share many physical resources with another, being separated by some non-trivial distance compared to a monolithic datacenter arrangement.
The infrastructure setup must be done as an admin at setup time or when adding new compute nodes. Assume for the sake of discussion that we have the following sites:
-
A central-datacenter with two nodes hostA and hostB
-
An edge site called 'edge-east' with two compute nodes, hostC and hostD
-
An edge site called 'edge-west' with two compute nodes, hostE and hostF
The best practice here would be to configure three availability zones, one for each of the three sites we have. Further, the default AZ should generally be set to the central datacenter zone, so that any
instance booted without specifically targeting one of our edge sites will be placed in the datacenter. Currently, the compute services at the edge must host instances with ephemeral storage. The high level architectural view of this example looks like figure 1:
Figure 1: A high-level overview of an edge computing setup
Site Availability Zone Setup
First, we will create the three zones. Note that availability zones are special instances of host aggregates, so the commands we use for administering zones are actually for aggregates. The steps are:
$ openstack aggregate create central --zone central $ openstack aggregate create east --zone east $ openstack aggregate create west --zone west
In most cases, instances should be directed to specific edge sites as needed. Conversely, instances that do not need to be at an edge site should land on a host in the central datacenter, where capacity is larger. To make sure that instances not targeted to a particular edge site are sent to the central datacenter, we need to configure Nova with:
[DEFAULT] default_schedule_zone = central
In order to get director to do this for you, create a director environment file with the following and add to the deploy command line:
parameter_defaults: ControllerExtraConfig: nova::availability_zone::default_schedule_zone: central controller_classes: - ::nova::availability_zone
NOTE: If, for some reason it is desirable to force all instance boots to specify a zone, it is possible to create an empty zone and set that as the default. Doing so will cause the user to receive a message indicating that the default zone is “not available” without starting the instance build. This may be useful for cases where all capacity is at the edge sites, with no general central datacenter with capacity for untargeted workloads.
Next we need to assign our compute nodes to the proper zone so that the scheduler knows where they are located and how to answer requests for specific areas.
$ openstack aggregate add host central hostA $ openstack aggregate add host central hostB $ openstack aggregate add host east hostC $ openstack aggregate add host east hostD $ openstack aggregate add host west hostE $ openstack aggregate add host west hostF
To check that the hosts are mapped properly, check the state of each aggregate and verify that the availability_zone
is set, and that the relevant hosts are listed. For example, the central aggregate should look like this:
$ openstack aggregate show central +-------------------+----------------------------+ | Field | Value | +-------------------+----------------------------+ | availability_zone | central | | created_at | 2019-01-30T14:52:10.000000 | | deleted | False | | deleted_at | None | | hosts | [u'hostA'. u’hostB’] | | id | 1 | | name | central | | properties | | | updated_at | None | +-------------------+----------------------------+
Now that all of that is configured, we can boot some instances targeted at specific sites. First, we will boot an instance with no destination set, which should land in the central datacenter:
$ openstack server create --flavor tiny --image rhel test1
Check that the availability zone of this server was forced to be central:
$ openstack server show -f value -c OS-EXT-AZ:availability_zone -c OS-EXT-SRV-ATTR:host test1 central hostA
Next, we will boot an instance specifically to run at the 'east' edge site:
$ openstack server create --flavor tiny --image rhel --availability-zone east test2
Which should land on either hostC or hostD to satisfy the requirement for being in the 'east' availability zone. Confirm that the host and zone are correct for this as well:
$ openstack server show -f value -c OS-EXT-AZ:availability_zone -c OS-EXT-SRV-ATTR:host test2 east hostC
If you’d like to learn more about Red Hat’s edge computing approach, we invite you to visit "Understanding edge computing."
執筆者紹介
チャンネル別に見る
自動化
テクノロジー、チームおよび環境に関する IT 自動化の最新情報
AI (人工知能)
お客様が AI ワークロードをどこでも自由に実行することを可能にするプラットフォームについてのアップデート
オープン・ハイブリッドクラウド
ハイブリッドクラウドで柔軟に未来を築く方法をご確認ください。
セキュリティ
環境やテクノロジー全体に及ぶリスクを軽減する方法に関する最新情報
エッジコンピューティング
エッジでの運用を単純化するプラットフォームのアップデート
インフラストラクチャ
世界有数のエンタープライズ向け Linux プラットフォームの最新情報
アプリケーション
アプリケーションの最も困難な課題に対する Red Hat ソリューションの詳細
オリジナル番組
エンタープライズ向けテクノロジーのメーカーやリーダーによるストーリー
製品
ツール
試用、購入、販売
コミュニケーション
Red Hat について
エンタープライズ・オープンソース・ソリューションのプロバイダーとして世界をリードする Red Hat は、Linux、クラウド、コンテナ、Kubernetes などのテクノロジーを提供しています。Red Hat は強化されたソリューションを提供し、コアデータセンターからネットワークエッジまで、企業が複数のプラットフォームおよび環境間で容易に運用できるようにしています。
言語を選択してください
Red Hat legal and privacy links
- Red Hat について
- 採用情報
- イベント
- 各国のオフィス
- Red Hat へのお問い合わせ
- Red Hat ブログ
- ダイバーシティ、エクイティ、およびインクルージョン
- Cool Stuff Store
- Red Hat Summit