惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
IT之家
IT之家
T
The Blog of Author Tim Ferriss
V
V2EX
博客园 - 聂微东
The Cloudflare Blog
Blog — PlanetScale
Blog — PlanetScale
A
About on SuperTechFans
U
Unit 42
Vercel News
Vercel News
L
LangChain Blog
博客园 - 司徒正美
H
Help Net Security
Recent Announcements
Recent Announcements
Recorded Future
Recorded Future
V
Visual Studio Blog
Jina AI
Jina AI
Microsoft Azure Blog
Microsoft Azure Blog
GbyAI
GbyAI
Y
Y Combinator Blog
C
Check Point Blog
博客园 - 三生石上(FineUI控件)
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
J
Java Code Geeks
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
B
Blog RSS Feed
F
Fortinet All Blogs
B
Blog
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
MongoDB | Blog
MongoDB | Blog
F
Full Disclosure
有赞技术团队
有赞技术团队
罗磊的独立博客
博客园_首页
MyScale Blog
MyScale Blog
aimingoo的专栏
aimingoo的专栏
Google DeepMind News
Google DeepMind News
M
MIT News - Artificial intelligence
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
量子位
I
InfoQ
小众软件
小众软件
P
Proofpoint News Feed

Superuser

A Hybrid Private Cloud as an AI Factory – Superuser How India’s Payment Backbone Runs on Open Source – Superuser What AI Builders Can Learn From a Decade of Open Source CI – Superuser How Pinaka ZTi Builds Sovereign Clouds Governments Can Actually Trust – Superuser KDDI’s Private Cloud Supporting Communications – Superuser When Vietnam’s Cloud Infrastructure Is No Longer the Bottleneck – Superuser Sovereign AI Cloud – Superuser How France’s National Railway Runs on Open Source – Superuser Why Digital Sovereignty Depends on Invisible Labor – Superuser Ongoing Development and Next Steps for DOCOMO and Tacker – Superuser Why AI Agents Need Stronger Sandboxing and What the Kata Containers Community Is Doing About It – Superuser A Strategic Growth Opportunity for Open Infrastructure – Superuser NTT DOCOMO’s Tacker Activity – Superuser NTT DOCOMO’s Journey of Virtualization for Mobile Networks – Superuser How Rapifuzz CyberKshetra Built a Scalable Cyber Range on OpenStack (and Cut Costs by 60%) Integration of the Octavia module (Load Balancer as a Service) in an OpenStack Cloud Environment – Part 2 – Superuser OpenStack Case Study: CloudVPS – Superuser The 10th China Open Source Hackathon Recap: Projects, Talks, and More – Superuser Inside CERN’s Open Data portal – Superuser Taking the OpenStack ops manuals to the next level – Superuser Making your first contact with OpenStack – Superuser How tech giant Tencent uses OpenStack – Superuser Managing port level security in OpenStack – Superuser Using Ansible 2.0 to launch a server on OpenStack – Superuser Simple auto scaling environment with Heat – Superuser
A Guide to Manila Security and Terraform Integration – Superuser
EL BOUKHARI Youcef · 2026-03-04 · via Superuser

Introduction

In the world of OpenStack, managing shared storage across multiple instances has traditionally been a complex hurdle. While block storage is common, many enterprise workloads—from CI/CD pipelines to legacy app migrations—require a true Shared File System.

This is where Manila shines, providing a scalable service for mounting the same storage across various compute resources. However, in a modern DevOps environment, manual provisioning is no longer an option. To ensure security, consistency, and speed, teams must treat their shared filesystems as code.

In this guide, we will explore how to bridge the gap between OpenStack Manila and Terraform. We’ll dive into the architecture of secure share networks and demonstrate how to automate the deployment of shared files, ensuring your infrastructure is both robust and reproducible.

What is OpenStack Manila?

OpenStack Manila is the Shared File Systems service designed to provide “File Storage as a Service.” Unlike block storage (Cinder), which connects a virtual disk to a single instance, Manila allows multiple compute instances to mount and access the same shared filesystem simultaneously.

Think of it as a cloud-native Network Attached Storage (NAS). It abstracts various storage protocols—like NFS for Linux or CIFS/SMB for Windows—allowing DevOps teams to provision, manage, and scale shared storage through a unified API or CLI, rather than managing physical storage hardware manually.

Understanding Manila Backends

When deploying OpenStack Manila, the backend is the storage technology that actually holds and serves your data. Manila acts as an orchestration layer, translating your requests into commands that the specific storage hardware or software understands.

Common backends in production environments include:

  • NetApp: Enterprise-grade storage arrays using ONTAP.
  • CephFS: A distributed filesystem that integrates natively with Ceph.
  • LVM: Using local Linux Logical Volume Management (common in small or test labs

Focusing on the Generic Backend :

For this demo, we are focusing on the Generic Backend (also known as the GenericShareDriver). This is arguably the most versatile backend for learning and dev/test environments because it doesn’t require expensive, proprietary storage hardware.

What is the Generic Backend?

The Generic backend works by using OpenStack Cinder (block storage) as its foundation. Instead of talking to a physical NAS, Manila:

  1. Spins up a small Service VM (automatically managed by Manila).
  2. Attaches a Cinder volume to that VM.
  3. Configures an NFS/CIFS server inside that VM to export the volume as a share.

Share Creation Process with the Generic Backend

When a share creation request is initiated, OpenStack Manila selects an appropriate backend (such as the Generic Driver) and orchestrates the creation of the required resources.

First, OpenStack Neutron creates a dedicated network port for the NFS server. Then, OpenStack Nova launches a virtual machine configured to act as the NFS server. At the same time, OpenStack Cinder provisions a storage volume and attaches it to the VM.

Manila automatically mounts the volume on the NFS server, which then exports the share to clients over the dedicated network. Clients can subsequently mount the share and collaborate on files within the OpenStack environment.

The Generic backend of OpenStack Manila, particularly suited for testing or demonstration environments, automates the creation of file servers as virtual machine instances, without requiring a dedicated storage solution or a complex distributed file system. Integrated through Kolla-Ansible, this backend operates in DHSS mode (Driver Handles Share Servers), where each share is served by a dedicated VM. OpenStack Cinder provides the storage volumes, OpenStack Nova handles instance deployment, and OpenStack Neutron ensures network connectivity.

Before provisioning file shares with this backend, it is mandatory to create a volume through the Cinder service. The Generic backend relies on Cinder volumes to store the file systems that will be exported as shares. In this implementation, the LVM backend is used to quickly provide persistent volumes from a dedicated local volume group. Once the volume is created, it is automatically attached to a Nova instance deployed by Manila, which configures it as an NFS or CIFS file server. This mechanism strengthens the integration between Cinder and Manila, ensuring automated file share management within the OpenStack infrastructure.

To better illustrate the integration of the Generic backend with Manila, we designed an architecture that presents the complete workflow for creating and managing file shares – from the user request to the share being made available through the dedicated file server.

Create a manila Share file

Before proceeding with the creation of a Manila share using the generic backend, it is essential to ensure that the Manila services are running properly and that all the necessary technical prerequisites have been prepared.

As you can see, the manila-share service is correctly associated with the generic backend, which indicates that the Manila file share service will use this backend to store the shared files.

1- Creation of a Specific Flavor

Define a flavor with ID 100 for the NFS servers managed by Manila. This profile should include resources that are suitable for handling file shares.

nova flavor-create manila-service-flavor 100 128 0 1

2- Share Type Configuration

Create a default share type with the DHSS (Driver Handles Share Servers) option enabled. This feature allows Manila to automatically manage the NFS servers.

manila type-create default_share_type True

3- Shared Network Configuration

Configure a shared network in OpenStack Neutron, ensuring proper connectivity between the instances and the storage services.

4- Creation of the Manila Share

Once these steps have been validated, we can now create our Manila share:

manila create NFS 2 --name share-terraform --share-network demo-share-network1

5- Access Authorization

For the access rule, we will allow the OpenStack instance named “terraform-instance” to access the share via its IP address.

After the share is created, a share server will be automatically provisioned, and the share will be hosted on this share server (an OpenStack instance).

6- Store the critical Terraform file (terraform.tfstate) in the share.
Mount the share from an instance : Get export location from share

After creating a share with Manila, it is possible to mount it from an instance. To do this, you first need to retrieve the export location of the share using the following command:

From the virtual machine “terraform-instance”, you can create a local directory to serve as the mount point.

To do this, start by connecting to the instance and creating the mount directory, then mount the NFS share using the following command:

mount -t nfs 10.254.0.3:/shares/share-422dc546-8f37-472b-ac3c-d23fe410d1b6 /mnt/terraform-state

After mounting the share, our Terraform instance has been set up, and we also created a small Terraform project. In this project, the terraform.tfstate file is stored on the Manila share.

With this mount, the terraform.tfstate file will be accessible only to the instances that have permission to access the share, and it will be shared among those authorized instances.

Tags: , , , ,

  • Author
  • Recent Posts