OpenStack Interview Questions and Answers

This section covers frequently asked OpenStack interview questions, focusing on its architecture, core components, and key functionalities.

What is OpenStack?

OpenStack is a free and open-source cloud computing platform. It provides a set of tools for building and managing both public and private clouds. It's considered a foundational technology for cloud infrastructure.

OpenStack Architectural Components

OpenStack is composed of modular components:

  • Dashboard: A web-based user interface.
  • Compute (Nova): Manages virtual machines (VMs).
  • Networking (Neutron): Manages virtual networks.
  • Object Storage (Swift): Stores unstructured data.
  • Block Storage (Cinder): Manages block storage volumes.
  • Identity Service (Keystone): Manages users and authentication.
  • Image Service (Glance): Manages virtual machine images.
  • Telemetry (Ceilometer): Collects monitoring data.
  • Orchestration (Heat): Automates deployment.
  • Database Service: Manages the OpenStack databases.

Advantages of OpenStack

  • Supports Software as a Service (SaaS) application development.
  • Provides self-service storage to IT users.
  • Cost-effective storage solutions.
  • Scalable on-demand block storage.
  • Avoids vendor lock-in (can be used with various hypervisors and storage).

Roles and Tenants in OpenStack

  • Roles: Define user permissions and access levels.
  • Tenants: Groups of users sharing resources.

OpenStack Compute Storage Types

  • Persistent Storage (Volume Storage): Data persists even after VM termination.
  • Ephemeral Storage: Temporary storage; data is lost when the VM is terminated.

Persistent storage types include object storage, block storage, and shared file systems.

Hypervisors Supported by OpenStack

A hypervisor creates and manages virtual machines. OpenStack supports various hypervisors (e.g., KVM, Xen, VMware vSphere, Hyper-V).

Keystone Identity Service

Keystone is OpenStack's core identity service, handling authentication and authorization for other OpenStack services.

OpenStack Networking Options

  • Flat DHCP: IP addresses are assigned dynamically using DHCP.
  • Flat: IP addresses are assigned statically during instance launch.
  • VLAN: Uses VLANs (Virtual LANs) to provide more isolated networks.

Pausing and Resuming Instances

Commands

# Pause instance
nova pause INSTANCE_NAME

# Unpause instance
nova unpause INSTANCE_NAME

OpenStack Image Storage (Glance)

Glance is OpenStack's image service; it stores and manages virtual machine images.

Tokens in OpenStack

Tokens are used for authentication in OpenStack. They are generated after successful authentication and used to access services without repeated logins.

OpenStack Python SDK

The OpenStack Python SDK provides a library for interacting with OpenStack services programmatically using Python.

OpenStack API Server

The API server is the main interface for interacting with the OpenStack cloud. It handles API requests and manages resources.

Generating Key Pairs

Commands

ssh-keygen
nova keypair-add

OpenStack Networking Hardware

  • Networks
  • Routers
  • Subnets
  • Ports
  • Vendor-specific plugins for networking hardware

Managing Floating IP Addresses

Use the nova floating-ip-* commands to manage floating IP addresses (public IPs associated with VMs).

Cinder (Block Storage)

Cinder is OpenStack's block storage service, providing persistent block storage volumes that can be attached to VMs.

Listing Floating IP Pools

Command

nova floating ip-pool-list

Flavors in OpenStack

Flavors define the hardware resources (CPU, RAM, storage) available for a virtual machine instance.