OpenStack Workload
OpenStack Workload
OpenStack Workload
Web presentation tier – cluster of web servers that will be used to render either static or
dynamically generated content for the web browser.
Application tier – cluster of application servers that will be used to process content and
business logic.
Database tier – cluster of database servers that store data persistently.
An OpenStack cloud is powered by many different services (also known as projects). Utilizing only the
core services, a three-tier web services application can be deployed in a virtualized environment that
can be manually scaled up and down as required with minimal effort.
KEYSTONE
Orchestration
HEAT
Networking resources Persistent storage resources Instance management Compute resources Database
CEILOMETER Legend
Manages the life cycle of compute instances, including spawning, scheduling, and decommissioning of
COMPUTE (NOVA)
virtual machines (VMs) on demand.
IMAGE SERVICE
Stores and retrieves VM disk images. Used by OpenStack Compute during instance provisioning.
(GLANCE)
Virtualizes the management of block storage devices and provides a self-service API to request and
BLOCK STORAGE
use those resources regardless of the physical storage location or device type. Supports popular
(CINDER)
storage devices.
Enables network connectivity as a service for other OpenStack services, such as OpenStack Compute.
NETWORKING
Provides an API to define networks and their attachments. Supports popular networking vendors and
(NEUTRON)
technologies. Also provides LBaaS and Firewall-as-a-Service (FWaaS).
IDENTITY SERVICE
Provides authentication and authorization for the other OpenStack services.
(KEYSTONE)
OBJECT STORAGE Stores and retrieves arbitrary unstructured data objects via a RESTful HTTP-based API. Highly fault-tolerant
(SWIFT) with data replication and scale-out architecture.
DASHBOARD Provides an extensible web-based self-service portal to interact with underlying OpenStack services, such as
(HORIZON) launching an instance, assigning IP addresses, or configuring access controls.
Optional services
Orchestrates multiple composite cloud applications by using either the native HOT template format or the
ORCHESTRATION
AWS CloudFormation template format, through both an OpenStack-native REST API and a CloudFormation-
(HEAT)
compatible Query API.
TELEMETRY
Monitors and meters the OpenStack cloud for billing, benchmarking, scalability, and statistical purposes.
(CEILOMETER)
DATABASE (TROVE) A database-as-a-service that provisions relational and non-relational database engines.
Scaling triggers
KEYSTONE HORIZON CEILOMETER
Registers images
Boots DB instances
GLANCE TROVE
Backup databases
Provides Provides
NEUTRON CINDER
network connections volumes
HEAT
Orchestration Legend
Web presentation tier A cluster of web server used to render static or dynamically generated content for the web browser.
Application tier A cluster of application servers used to process content and business logic.
Load balancers Two load balancers are required to equally distribute load. The first load balancer distributes the web
traffic at the presentation tier. A separate load balancer is required to distribute the load among the
application servers.
Relational Database The database tier used in this example uses a master/slave RDBMS configuration. Data is kept in
Management System (RDBMS) persistent block storage and backed-up periodically.
Firewalls For security, a set of firewall rules must be enforced at each tier.
Network configuration The network must be configured to filter unnecessary traffic at different tiers.
Auto-scaling Auto-scaling is desirable to automatically respond to unexpected traffic spikes and resume to normal
operation when the load decreases.
USER
LOAD BALANCER
NEUTRON
NOVA COMPUTE
INSTANCE WEB SECURITY GROUP
NEUTRON
Auto-scaling group
Image management
There are multiple options and tools to provide configuration of servers when spawning instances of
the web, application, and database VMs. On-the-fly configuration allows greater flexibility but can
increase spawning time. The images can also be pre-configured to contain all of the files, packages and
patches required to boot a fully operational instance. Pre-configuration can reduce instance build time,
but includes its own set of problems, such as patching and keeping licenses up to date. For this example,
the orchestration features built into Heat are used to spawn and configure the three tiers of servers
on-the-fly.
Persistent storage
Similar to an external hard drive, Cinder volumes are persistent block-storage virtual devices that may
be mounted and dismounted from the VM by the operating system. Cinder volumes can be attached
to only one instance at a time. This reference architecture creates and attaches a Cinder volume to the
database VM to meet the data persistency requirements for the database tier. In the case of a database
VM failure, a new VM can be created and the Cinder volume can be re-attached to the new VM.
Swift provides highly available, distributed, eventually-consistent object/BLOB storage. Unlike a physical
device, Swift storage is never mounted to the instance. Objects and metadata are created, modified, and
obtained using the Object Storage API, which is implemented as a set of REpresentational State Transfer
(REST) web services. If the web application requires hosting of static content (e.g. image, video), use Swift
to store it, and configure Swift to serve the content over HTTP. In this reference architecture, Swift is also
used for storing and archiving the database backup files.
Network subnets
For this workload, Neutron is used to create multiple subnets, one for each tier: a web subnet, an
application subnet, and a data subnet. Neutron routers are created to route traffic between the subnets.
Network security
Filtering of inbound traffic is done through the use of security groups. Different security groups can
be created and applied to the instances in each tier to filter unnecessary network traffic. OpenStack
security groups allow specification of multiple rules to allow/deny traffic from certain protocols, ports,
or IP addresses or ranges. One or more security groups can be applied to each instance. All OpenStack
projects have a “default” security group, which is applied to instances that have no other security group
defined. Unless changed, the default security group denies all incoming traffic.
Auto-scaling
The ability to scale horizontally is one of the greatest advantages of cloud computing. Using a
combination of Heat orchestration and Ceilometer, an OpenStack cloud can be configured to
automatically launch additional VMs for the web and application tiers when demand exceeds preset
thresholds. Ceilometer performs the system resource monitoring and can be configured to alarm
when thresholds are exceeded. Heat then responds to the alarm according to the configured scale-up
policy. Scaling can also be done in the opposite direction, reducing resources when the demand is low,
saving money.
The Heat templates demonstrate how to configure and deploy WordPress, a popular web application,
on a three-tier LAMP architecture. There are two versions of the primary template: one that creates a
static environment (manual scaling) and one that integrates with Ceilometer to provide auto-scaling of
the web and application tiers based on CPU load.
WebAppStatic.yaml: Run this yaml file for a static environment. It creates a static environment with two
load-balanced web servers, two load-balanced application servers, and a single database server using
Cinder block storage for the database. This yaml file utilizes Heat resource groups to call heat_app_tier.
yaml and heat_web_tier.yaml, launching multiple copies of the web and application servers.
The following yaml files are called by the primary files above:
setup_net_sg.yaml: This is the first file called by the main templates. This file creates three separate
private networks, one for each tier. In addition, it creates two load balancers (using Neutron
LBaaS V1.0): one with a public IP that connects the web tier private network to the public network,
and one with a private IP that connects the web tier network to the application tier network. The
template also creates a router connecting the application network to the database network. In
addition to the networks and routers, the template creates three security groups, one for each of
the tiers.
heat_web_tier.yaml: This template file launches the web tier nodes. In addition to launching
instances, it installs and configures Apache and Apache modproxy, which is used to redirect traffic
to the application nodes.
heat_app_tier.yaml: This template file launches the application tier nodes. In addition to launching
the instances, it installs Apache, PHP, MySQL client, and finally WordPress.
heat_sql_tier.yaml: This template file launches the database tier node. It also creates a Cinder
block device to store the database files, and the required users and databases for the WordPress
application.
As mentioned, Trove is not used in this implementation at this time. Trove is OpenStack DBaaS that
provisions relational and non-relational database engines. An update to this reference architecture to
include Trove is under consideration.
Another OpenStack service that would be suitable for the three-tier architecture would be Neutron
Firewall-as-a-Service (FWaaS). FWaaS operates at the perimeter by filtering traffic at the Neutron router.
This distinguishes it from security groups, which operate at the instance level. FWaaS is also under
consideration for a future update.
This document shows how easily and quickly a three-tier LAMP and Wordpress environment can be
implemented using just a few OpenStack services. We offer the Heat templates to help you get started
and become familiar with OpenStack.
These additional resources are recommended to delve into more depth on overall OpenStack cloud
architecture, and the components and services covered in this reference architecture. The vibrant,
global OpenStack community and ecosystem can be invaluable for their experience and advice. Visit
openstack.org to get started or click on these resources to begin designing your OpenStack-based web
applications.
RESOURCE OVERVIEW
OpenStack Marketplace One-stop resource to the skilled global ecosystem for distributions, drivers, training,
services and more.
OpenStack Architecture Design Guide Guidelines for designing an OpenStack cloud architecture for common use cases. With
examples.
OpenStack Networking Guide How to deploy and manage OpenStack Networking (Neutron).
OpenStack Security Guide Best practices and conceptual information about securing an OpenStack cloud.
OpenStack High Availability Guide Installing and configuring OpenStack for high availability.
Complete OpenStack documentation Index to all documentation, for every role and step in planning and operating an
OpenStack cloud.
Community Application Catalog Download this LAMP/WordPress sample application and other free OpenStack
applications here.
Welcome to the community! Join mailing lists and IRC chat channels, find jobs and events, access the source code
and more.
User groups Find a user group near you, attend meetups and hackathons—or organize one!
OpenStack events Global schedule of events including the popular OpenStack Summits and regional
OpenStack Days.
OpenStack is a registered trademark in the Unites States and in other countries. All other company and product names
may be trademarks of their respective owners.
This document is licensed under the Creative Commons Attribution-ShareAlike 4.0 International
License. More information on this license is available here.