OpenStack Orchestration - Sample Chapter
OpenStack Orchestration - Sample Chapter
OpenStack Orchestration - Sample Chapter
P U B L I S H I N G
pl
C o m m u n i t y
E x p e r i e n c e
D i s t i l l e d
$ 39.99 US
25.99 UK
Sa
m
OpenStack Orchestration
OpenStack Orchestration
ee
OpenStack Orchestration
Exploit the power of dynamic cloud formation and autoscaling
features to fully implement OpenStack Orchestration
Preface
The OpenStack Orchestration program aims to create a human and
machine-accessible service that manages the entire life cycle of infrastructure
and applications within OpenStack clouds. Heat is the cloud orchestration
service for the OpenStack framework. It implements an orchestration engine
to launch multiple composite cloud applications based on templates in the form
of text files that can be treated like code. It is the most popular and a still-emerging
IaaS cloud framework.
This book focuses on setting up and using one of the most important services in
OpenStack Orchestration, Heat. First, the book introduces you to the orchestration
service for OpenStack to help you understand the uses of the templating mechanism,
complex control groups of cloud resources, and huge potential and multiple-use
cases. It then moves on to the topology and orchestration specification for cloud
applications and standards, before introducing the most popular IaaS cloud
framework, Heat. You will get to grips with the standards used in Heat, an
overview and a roadmap, the architecture and CLI, the Heat API, the Heat engine,
the CloudWatch API, scaling principles, JeOS, and the installation and configuration
of Heat. I'll wrap up by giving you some insights into troubleshooting for OpenStack.
With easy-to-follow, step-by-step instructions and supporting images, you will be
able to manage OpenStack operations by implementing the orchestration services
of Heat.
Preface
Chapter 3, Stack Group of Connected Cloud Resources, attempts to study the basics
of Heat stacks and templates and discuss the autoscaling and high-availability
mechanisms supported by Heat.
Chapter 4, Installation and Configuration of the Orchestration Service, installs the
OpenStack Orchestration service, Heat. It will also show you how to write a
simple template by creating a stack.
Chapter 5, Working with Heat, explores the architecture of Heat in further detail.
It discusses the basic architecture of Heat and the main components that build up
the Orchestration service for OpenStack. It also covers the command-line arguments
accepted by Heat CLI. It explains the message flow for Heat. It also explores the
architecture of Heat in further detail. It focuses on the following topics: the standards
used in Heat, the Heat overview and roadmap, the Heat basics, architecture and CLI,
the Heat basic workflow, the Heat API, the Heat engine, the Heat CloudWatch API,
and Heat autoscaling principles.
Chapter 6, Managing Heat, covers the installation of DevStack with Heat support.
We explore Heat functionality in detail. It also discusses the basic architecture
of Heat and the main components that build up the Orchestration service for
OpenStack. Then, it covers the command-line arguments accepted by Heat CLI.
Chapter 7, Troubleshooting Heat, focuses on troubleshooting the issues encountered
when using Heat. It covers the most frequently occurring issues and discusses the
possible solutions for them.
[1]
Horizon
Horizon is the web-based control panel that provides an interface (or a dashboard)
to control and carry out administrative activities in the cloud environment. It
provides web-based options to interact with other components of OpenStack. New
virtual machine instances can be launched using this interface. Not only this but also
several other resources such as disk volumes, floating IP addresses, and so on can be
managed using this interface. This project was named as Horizon.
Nova
Nova is the compute service component of the OpenStack framework that is
responsible for maintaining the life cycle of virtual machines. This includes
spawning of new virtual machines, stopping, restarting, and decommissioning
of virtual machines.
Neutron
Neutron is the component of OpenStack that offers networking services, including
LAN subnet management, VLAN management, and bridging services to be used
by the virtual machine instances. It also includes the Open vSwitch application that
provides an SDN-enabled forwarding device.
Swift
The Swift component of OpenStack is responsible for providing object
storage services.
Object storage is a storage type where data is stored in the form of objects
(data and associated metadata). It also provides an API to access and store data.
Cinder
This Cinder component of OpenStack offers block storage services. This is used by
the virtual machine instances as disk volumes.
Keystone
Keystone is the component of OpenStack that provides authentication and
authorization services to other components of OpenStack as well as individual
users or tenants.
[2]
Chapter 1
Glance
Glance provides disk imaging service to the virtual machine instances of OpenStack.
Disk images can be used to create new disk volumes and virtual machine instances.
Ceilometer
Ceilometer is the metering service provider for OpenStack. It monitors and records
several performance metrics for OpenStack components that include CPU load, CPU
utilization, memory utilization, disk volume utilization, and so on.
Heat
Heat is the component of OpenStack with provides orchestration and configuration
service for OpenStack components and resources. It can be used in combination with
the Ceilometer component to achieve autoscalability and high availability.
Heat supports standards such as TOSCA (Topology and Orchestration
Specification for Cloud Applications) and Amazon CloudFormation.
Trove
The Trove component of OpenStack provides a Database as a Service (DBaaS)
solution. Both relational as well as nonrelational database engines are supported
by Trove.
[3]
Heat
heat-engine
heat-api
heat api-cfn
Heat uses the term "stack" to define a group of services, resources, parameters inputs,
constraints, and dependencies. A stack can be defined using a text file; however,
the important point is to use the correct format. The JSON format used by AWS
CloudFormation is also supported by Heat.
Password-based authorization
[4]
Chapter 1
Password authorization
In this type of authorization, a password is expected from the user. This password
must match with the password stored in a database by the Heat engine in an
encrypted form.
The following are the steps used to generate a username/password:
1. A request is made to the Heat engine for a token or an authorization
password. Normally, the Heat command-line client or the dashboard is used.
2. The validation checks will fail if the stack contains any resources under
deferred operations. If everything is normal, then a username/password
is provided.
3. The username/password are stored in the database in encrypted form.
In some cases, the Heat engine, after obtaining the credentials, requests another
token on the user's behalf, and thereafter, access to all the roles of the stack owner
are provided.
The roles to be delegated (the roles are configured using the Heat
configuration file, for example, to launch a new instance to achieve
auto-scaling in case of reaching a threshold)
[5]
By default, all the available roles for the trustor are set to be available for the trustee
if it is not modified using a local RBAC policy.
This trust ID is stored in an encrypted form in the database. This trust ID is retrieved
from the database when an operation is required.
As mentioned earlier, all available roles for the trustor will be assigned to the trustee
if no specific roles are mentioned in the heat.conf file.
[6]
Chapter 1
--os-auth-url
[7]
--os-identity-api-version=3
--os-auth-url
http://192.168.5.38:35357/v3 \
--os-username=admin --os-password=ADMIN \
--os-project-name=admin \
--domain heat \
--description "Admin for HEAT domain"\
[8]
Chapter 1
This will return a domain admin ID, which will be used in the next step.
3. Next, the newly created user in step 2 is assigned the role of domain admin:
$ openstack role add admin \
--user heat_domain_admin \
--os-identity-api-version=3
--os-auth-url
http://192.168.5.38:35357/v3 \
--os-username=admin \
--os-password=ADMIN \
--os-project-name=admin \
--domain heat
[9]
We'll get the output shown in the following screenshot for this command:
Creating a stack
The following are the steps needed to create a sample stack:
1. If the stack contains any resources that require creation of a "stack domain
user", then a new "stack domain project" in the "Heat" domain is created.
2. A new user is created under "stack domain project" by Heat if it is required.
From an authentication perspective, this user is completely separate and also
unrelated to the "stack owner's project."
While processing API requests, an internal lookup is made by Heat Orchestration to
grant the required privileges to the user for both the stack owner's project as well as
the stack domain project. These privileges are controlled by the policy.json file.
[ 10 ]
Chapter 1
Summary
In this chapter, we learned about OpenStack, the open source cloud platform that
offers IaaS features. OpenStack is made of several components, including Horizon
(dashboard service), Nova (compute service), Neutron (networking service), Cinder
(block storage service), Swift (object storage service), Glance (shared image service),
Keystone (identify service), Ceilometer (telemetering service), Heat (Orchestration
service), and Trove (database as a service). We also learned that Heat is the
Orchestration service for OpenStack. We learned about the Heat authorization
models, including password authorization, keystone trust authorization, and how
these models work.
[ 11 ]
www.PacktPub.com
Stay Connected: