Qovery and the Twelve-Factor App methodology
The Twelve-Factor App methodology is a methodology for building platform-agnostic and resilient applications. It was introduced by Adam Wiggins while working at Heroku in 2011. Nearly 10 years later, this methodology is still considered by the developer community as an excellent practice to follow when building an application. In this article, we will see step by step how Qovery respects and improves the 12-factor methodology. Here we go.
Romaric Philogène
June 17, 2020 · 4 min read#Codebase
#One codebase tracked in revision control, many deploys.
Qovery integrates seamlessly with Git to deploy branch-based applications. Qovery follows the GitOps methodology, which refers to 1 branch = 1 isolated environment. Each modified environment (production, staging, development) does not impact the others. Plus, Qovery brings a consolidated view of all applications and services (databases, brokers) running within an environment. Developers get the complete picture of their applications and can be confident in their changes into production.
#Dependencies
#Explicitly declare and isolate dependencies.
Qovery lets you declare all the dependencies that your application needs (databases, brokers, routing, domains...) using a .qovery.yml file and a Dockerfile. Nothing more to go into production. Qovery interprets these files, builds the application, provides the infrastructure, deploys it, and makes sure everything works. In case of any problem, Qovery rollback the application and the dependencies into the last desired states, and the developer is informed by a notification.
#Config
#Store config in the environment.
Qovery's obsession is to simplify application deployment in the Cloud for all developers. Qovery manages all parameters (URL, URI, port, username, password...) as environment variables. Each environment variable is transparently injected at the start of your applications. No other dependency is necessary to access the services (databases, brokers). Qovery even manages your .env (dotenv file) natively. Simple and powerful.
#Backing services
#Treat backing services as attached resources.
Qovery manages a set of applications and services (databases, brokers...) as a single application within an "environment". Each environment is isolated from the other. This allows excellent agility to work in teams without stepping on each other.
#Build, release, run
#Strictly separate build and run stages
From build to run, Qovery sets the pace - either by providing everything you need (CI, CD) or by connecting to your own existing services. Everything is utterly configurable to your needs.
#Processes
#Execute the app as one or more stateless processes
Qovery seamlessly manages stateless (containers) and stateful (databases, brokers...) applications. For stateful applications, Qovery provides the necessary resources (disk, RAM, CPU) and manages them over time (backup, restore) according to the developer's usage. Everything is done to make it evident for the developers and manageable for the administrators.
#Port binding
#Export services via port binding
The means of communication between applications in Qovery is TCP/UDP from inside and HTTP from outside. The only thing the developer has to specify is the listening port of his application using the EXPOSE directive in his Dockerfile. Which he already does!
#Concurrency
#Scale-out via the process model
Qovery manages the automatic scaling of applications and services. Everything is transparent by the developer but configurable by the SRE teams can configure the granularity of the scaling.
#Disposability
#Maximize robustness with fast startup and graceful shutdown
Qovery allows anyone to start and stop a complete application (multi-services) quickly, thanks to the Environment concept. Creating an environment can also be ephemeral by reacting to some events (Eg. Pull Request) - Eg. Useful to make end-to-end tests. The flexibility of the Cloud is really within reach of everyone.
#Dev/prod parity
#Keep development, staging, and production as similar as possible.
Using Qovery guarantees that your development, staging, and production environment are all three identical. Even data may or may not be automatically copied from one environment to another - the choice is yours. What better way to develop new features without surprises?
#Logs
#Treat logs as event streams.
Qovery centralizes access to your application logs. In one command (qovery log), you will have all the information about your applications from your environment. Moreover, without any difficulties, Qovery integrates perfectly with solutions such as Datadog and Sentry and any other Docker compatible solution.
#Admin processes
#Run admin/management tasks as one-off processes
Qovery provides all the tools necessary for a team of administrators to modify all the settings. Need to restart a service? Need to roll back a service? Prevent the deployment of new releases? Or even to define rights? No problem, it's possible with the Qovery interface.
#Wrapping up
This article shows that the Twelve-Factor App methodology is an excellent starting point to design an agnostic, resilient, and scalable application. Even though Heroku initially created this methodology, we have seen that Qovery is fully compliant with it and goes beyond it by offering improvements such as managing multiple applications within a single environment.
Do you use Heroku? Contact us to discover how Qovery can help you take your business to the next level while reducing your infrastructure and R&D costs.
Your Favorite DevOps Automation Platform
Qovery is a DevOps Automation Platform Helping 200+ Organizations To Ship Faster and Eliminate DevOps Hiring Needs
Try it out now!Your Favorite DevOps Automation Platform
Qovery is a DevOps Automation Platform Helping 200+ Organizations To Ship Faster and Eliminate DevOps Hiring Needs
Try it out now!