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 el autor
Más similar
Navegar por canal
Automatización
Las últimas novedades en la automatización de la TI para los equipos, la tecnología y los entornos
Inteligencia artificial
Descubra las actualizaciones en las plataformas que permiten a los clientes ejecutar cargas de trabajo de inteligecia artificial en cualquier lugar
Nube híbrida abierta
Vea como construimos un futuro flexible con la nube híbrida
Seguridad
Vea las últimas novedades sobre cómo reducimos los riesgos en entornos y tecnologías
Edge computing
Conozca las actualizaciones en las plataformas que simplifican las operaciones en el edge
Infraestructura
Vea las últimas novedades sobre la plataforma Linux empresarial líder en el mundo
Aplicaciones
Conozca nuestras soluciones para abordar los desafíos más complejos de las aplicaciones
Programas originales
Vea historias divertidas de creadores y líderes en tecnología empresarial
Productos
- Red Hat Enterprise Linux
- Red Hat OpenShift
- Red Hat Ansible Automation Platform
- Servicios de nube
- Ver todos los productos
Herramientas
- Training y Certificación
- Mi cuenta
- Soporte al cliente
- Recursos para desarrolladores
- Busque un partner
- Red Hat Ecosystem Catalog
- Calculador de valor Red Hat
- Documentación
Realice pruebas, compras y ventas
Comunicarse
- Comuníquese con la oficina de ventas
- Comuníquese con el servicio al cliente
- Comuníquese con Red Hat Training
- Redes sociales
Acerca de Red Hat
Somos el proveedor líder a nivel mundial de soluciones empresariales de código abierto, incluyendo Linux, cloud, contenedores y Kubernetes. Ofrecemos soluciones reforzadas, las cuales permiten que las empresas trabajen en distintas plataformas y entornos con facilidad, desde el centro de datos principal hasta el extremo de la red.
Seleccionar idioma
Red Hat legal and privacy links
- Acerca de Red Hat
- Oportunidades de empleo
- Eventos
- Sedes
- Póngase en contacto con Red Hat
- Blog de Red Hat
- Diversidad, igualdad e inclusión
- Cool Stuff Store
- Red Hat Summit