Upcoming Webinar - June 4th 10:00am PT: Is Your Database Missing These Key Security Elements? 🔒
Register Today!
Fauna logo
Log InContact usStart for free
Fauna logo
Log InContact usStart for free
© 0 Fauna, Inc. All Rights Reserved.

Related posts

Fauna Schema: Flexible, Enforceable, and Driven by Code with Zero downtime MigrationFauna Joins Google Cloud MarketplaceDatabase Joins for NoSQL

Start for free

Sign up and claim your forever-free Fauna account
Sign up and get started

Table of Contents

devops announcement

Introducing Schema as Code capabilities with new DevOps tooling and integrations

Wyatt Wenzel|Nov 14th, 2023|


We are excited to announce a suite of DevOps tooling and integrations that brings the flexible principles of modern CI/CD deployments to Fauna’s enterprise operational database. The updates include the Fauna Schema Language (FSL), a modern Command Line Interface (CLI), and GitHub and GitLab integrations. Combined, these features enable database development to match the pace of application development by incorporating database schema-level changes into broader CI/CD workflows – a crucial advancement for enterprise engineering teams tasked with building, scaling, and improving applications at every stage of development. Fauna’s Schema as Code approach means that developers can fully automate changes within existing DevOps workflows by applying IaC-like design patterns to the schema layer.

Solving the database DevOps challenge

Historically, database development velocity has lagged behind the application and infrastructure layers due to the difficulties in making changes to schema. Database schemas are often rigid structures and serve as a bedrock of an application. The complexity of a data model grows as an application evolves, forcing engineering tradeoffs between development velocity and the risk of production failures. FSL, the Fauna CLI, and integrations with GitHub and GitLab remove this bottleneck by introducing the same DevOps principles of automation, collaboration, and iterative development to the database schema layer. “The value of Fauna’s DevOps tooling is in its flexible APIs; we can easily and quickly integrate those API into any automated deployment tools,” shared Marcelo Reyna, Head of Infrastructure at Differential, a digital agency supporting enterprise customers like Lexmark, TaylorMade, and P&G. “Fauna simplifies data access controls directly on the database, so there’s both added security and minimal engineering required to manage it – we can push and pull schema-level updates with DevOps tools already in our stack like Pulumi and GitHub. It’s incredible that we are able to create and manage a Fauna database with a single Pulumi resource without any additional infrastructure.”

Fauna Schema Language and CLI

Fauna Schema Language

The Fauna Schema Language (FSL) is a declarative language for expressing database schema, enabling development teams to define a database’s domain models, access controls, and user-defined functions in human-readable language, in addition to managing schema as a set of files in a code repository. FSL files are intended to be managed in the same fashion as application code; actions can be triggered from the user's code repository whenever a developer commits a change, approves, a pull request, or merges a branch, which can then trigger a batch of processes in a CI/CD pipeline. Developers can also test changes with a real dataset against a local container before pushing to CI/CD pipelines and production, ensuring that errors or regressions are identified early, without risk. Check out the FSL reference guide in Fauna Docs to learn more about how to get started with Schema as Code.

Fauna CLI

The Fauna Command Line Interface allows customers to send FQL queries, upload CSV files, and upload/download FSL files to and from a database. Fauna customers can define and modify individual elements of their database – such as collections, UDFs, roles, and access providers – with the CLI or through Fauna’s web UI.
The Fauna CLI integrates seamlessly into automated CI/CD pipelines, and is therefore the recommended way to manage schema. For instance, a development team may want to have a schema change applied to a test database whenever a change is committed to a code mainline.
Project Files
The Fauna CLI allows users to define project files in which a database and development environment (dev, test, staging, or prod) a schema is to be pushed. These files can be used to configure a CI/CD automation or track a code repository – ultimately reducing the potential human error of loading these settings manually.
Protected Mode
Protected Mode is a safeguard which protects development teams from inadvertently making changes to a database schema, which can either lead to data loss, performance degradation, or application breaking activity. An example of such a situation is when a user inadvertently drops a collection or index. Protected mode prevents developers from making destructive schema changes without affirmatively overriding the protection.

GitHub Actions and GitLab CI/CD integrations

Integrations with GitHub Actions and GitLab CI/CD enable developers to automatically update the schema of any target database when changes are pushed, or when pull requests are accepted to a branch of a repository. The combination of native functionality and integration with leading CI/CD tooling ensures the application and database are managed concurrently, making the process of testing and developing a database both fast and repeatable.
FSL pairs well with Infrastructure as Code (IaC) tooling like Pulumi, Terraform, and CloudFormation allowing developers to trigger database actions from IaC resources without any manual intervention. Customers can provision lower level infrastructure primitives through their IaC platform and then invoke FSL or a developer’s tool of choice to implement schema. With greater confidence that database updates produce their intended effect before going into production, engineers can accelerate code reviews and workflows within the context of their broader CI/CD pipeline.
Fauna's new features also complement existing IaC tools like Pulumi, Terraform, and AWS CloudFormation, providing developers with a unified platform to manage database actions alongside lower-level infrastructure resources; the IaC tooling is used to provision infrastructure, while FSL enables manipulating the schema and the database configuration as code. This combination offers a more streamlined development experience, heightening confidence in database updates and facilitating faster code reviews and workflow integration.

Fulfilling the DevOps lifecycle without 3rd party tooling

What differentiates Fauna’s DevOps approach from other databases is the ability to version and source control database schema with application code at a higher level of abstraction without incorporating additional, non-integrated third-party tooling. Fauna approaches this in a declarative manner, compared to the imperative approach of many database vendors. Incremental and continual value accrues to the business because this means that development teams experience a faster time to delivery and the flexibility to adapt to shifting access patterns and revenue generating opportunities as an application evolves, all within the end-to-end deployment workflow developers are familiar with. With these integrations, Fauna is ensuring that databases are no longer the weak link in the CI/CD chain, but a robust, integrated component that drives business growth and innovation.
Fauna’s DevOps advancements build on the updated Fauna Query Language (FQL) and are supported by its Distributed Transaction Engine that provides strong consistency, multi-region configuration, low latency, and high availability out-of-the-box. Meanwhile, Fauna’s document-relational data model offers the flexibility of NoSQL with the relational power of SQL, and its serverless and API delivery model offloads the operational burden from development teams and naturally supports API-driven, modern architectures. It's time to say goodbye to database development hurdles and hello to a new era of developer productivity with Fauna.
To get started building with Fauna and experiment with its DevOps tooling and check out the FSL starter guide and GitHub and GitLab tutorials. Sign-up for a free Fauna account, check out the Fauna community forums to engage with fellow builders, and get in touch if you have any questions!

If you enjoyed our blog, and want to work on systems and challenges related to globally distributed systems, and serverless databases, Fauna is hiring!

Share this post

‹︁ PreviousNext ›︁

Subscribe to Fauna's newsletter

Get latest blog posts, development tips & tricks, and latest learning material delivered right to your inbox.