• HashiCorp Developer

  • HashiCorp Cloud Platform
  • Terraform
  • Packer
  • Consul
  • Vault
  • Boundary
  • Nomad
  • Waypoint
  • Vagrant
Nomad
  • Install
  • Intro
  • Tutorials
  • Documentation
  • API
  • Tools
  • Plugins
  • Sign up
Stateful Workloads

Skip to main content
5 tutorials
  • Stateful Workloads Overview
  • Stateful Workloads with Nomad Host Volumes
  • Stateful Workloads with Container Storage Interface
  • Stateful Workloads with Portworx
  • Users with the Exec Driver and Host Volumes

  • Resources

  • Tutorial Library
  • Community Forum
    (opens in new tab)
  • Support
    (opens in new tab)
  • GitHub
    (opens in new tab)
  1. Developer
  2. Nomad
  3. Tutorials
  4. Stateful Workloads
  5. Stateful Workloads Overview

Stateful Workloads Overview

  • 2min

  • NomadNomad

Nomad allows users to mount persistent data from local or remote storage volumes into task environments in several ways:

  • Container Storage Interface (CSI) plugins
  • Nomad Host Volume support
  • Docker Volume drivers

Nomad's Container Storage Interface (CSI) integration can manage external storage volumes for stateful workloads running inside your cluster. CSI providers are third-party plugins that run as Nomad jobs and can mount volumes created by your cloud provider. AWS Elastic Block Storage, Azure disk, GCE Persistent Disk, and Alicloud Disk are only a few of the available block-device plugins available as CSI plugins. You can find a more comprehensive list in the CSI Developer Documentation

Nomad is aware of CSI-managed volumes during the scheduling process, enabling it to schedule your workloads based on the availability of volumes on a specific client.

Nomad's host volume support allows you to mount any directory on the Nomad client into an allocation. These directories can be simple directories on a client, but can also be mounted filesystems like NFS or GlusterFS. These mounts can then be connected to individual tasks within a task group.

The Docker task driver's support for volumes enables Nomad to integrate with software-defined storage (SDS) solutions like Portworx to support stateful workloads. Please keep in mind that Nomad does not actually manage storage pools or replication as these tasks are delegated to the SDS providers. Please assess all factors and risks when utilizing such providers to run stateful workloads (such as your production database).

In these guides, we will deploy a MySQL Docker container to a Nomad cluster and demonstrate that the data is persisted beyond the life of the allocation.

 Back to Collection
 Next
Give Feedback(opens in new tab)
  • Certifications
  • System Status
  • Terms of Use
  • Security
  • Privacy
  • Trademark Policy
  • Trade Controls
  • Give Feedback(opens in new tab)