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."
Sobre o autor
Mais como este
Navegue por canal
Automação
Últimas novidades em automação de TI para empresas de tecnologia, equipes e ambientes
Inteligência artificial
Descubra as atualizações nas plataformas que proporcionam aos clientes executar suas cargas de trabalho de IA em qualquer ambiente
Nuvem híbrida aberta
Veja como construímos um futuro mais flexível com a nuvem híbrida
Segurança
Veja as últimas novidades sobre como reduzimos riscos em ambientes e tecnologias
Edge computing
Saiba quais são as atualizações nas plataformas que simplificam as operações na borda
Infraestrutura
Saiba o que há de mais recente na plataforma Linux empresarial líder mundial
Aplicações
Conheça nossas soluções desenvolvidas para ajudar você a superar os desafios mais complexos de aplicações
Programas originais
Veja as histórias divertidas de criadores e líderes em tecnologia empresarial
Produtos
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Red Hat Cloud Services
- Veja todos os produtos
Ferramentas
- Treinamento e certificação
- Minha conta
- Suporte ao cliente
- Recursos para desenvolvedores
- Encontre um parceiro
- Red Hat Ecosystem Catalog
- Calculadora de valor Red Hat
- Documentação
Experimente, compre, venda
Comunicação
- Contate o setor de vendas
- Fale com o Atendimento ao Cliente
- Contate o setor de treinamento
- Redes sociais
Sobre a Red Hat
A Red Hat é a líder mundial em soluções empresariais open source como Linux, nuvem, containers e Kubernetes. Fornecemos soluções robustas que facilitam o trabalho em diversas plataformas e ambientes, do datacenter principal até a borda da rede.
Selecione um idioma
Red Hat legal and privacy links
- Sobre a Red Hat
- Oportunidades de emprego
- Eventos
- Escritórios
- Fale com a Red Hat
- Blog da Red Hat
- Diversidade, equidade e inclusão
- Cool Stuff Store
- Red Hat Summit