Host your applications and their previews

Deploy to ERHA Cloud or to your Vercel, Upsun or Qovery account. On ERHA Cloud, every open merge request gets a preview and its own database.

  • ERHA Cloud or your Vercel, Upsun, Qovery account
  • One preview per open merge request
  • Databases and services declared in .erha/config.yaml
42merge
Booking application
Previewmr-42.booking-42merge.apps.erha.ai
  • PostgreSQL database: anonymised copyDone
  • Deployment of the API and the front endDone
  • Merge request !42 to reviewIn review
Merge request ready to approveApprove

What slows releases down

Every application needs hosting and test environments with their databases, and the work starts over on each project.

A shared staging environment

Two branches deployed to the same staging, and nobody knows which change broke what.

Databases created by hand

Each environment needs its database created, its credentials generated and its variables set one by one.

Errors without an environment

An error comes in without saying whether it came from production, a preview or a customer's instance.

Hosting, previews and services in ERHA

Hosting is set per application, with three options: none, your Vercel, Upsun or Qovery account, or ERHA Cloud. Previews with their database, tenants and managed services exist on ERHA Cloud only.

ERHA Cloud or your account

ERHA Cloud serves landing pages on Vercel and other applications on a Kubernetes cluster in Europe. Your Vercel, Upsun or Qovery account can be used instead.

One preview per merge request

Every open merge request gets a preview, up to ten per project. Its database starts empty, filled from an SQL file or, for PostgreSQL, as an anonymised copy of production.

Services declared in the repository

PostgreSQL, MySQL, Redis, S3 bucket and Mercure are declared in the .erha/config.yaml file. ERHA creates the services and sets their environment variables.

Tenants

A tenant is a complete production of the project dedicated to one end customer, with its databases and domains.

Domains and certificates

On ERHA Cloud, the domain is declared in the console. ERHA shows the DNS record to create, checks it, then issues the TLS certificate.

Deployments and logs

Every hosted application shows its deployments, their logs and the current state, on ERHA Cloud and on your Vercel, Upsun or Qovery account alike.

Connecting hosting and previews

Hosting is chosen application by application, so you can start with a single one.

  1. 01Choose the hostingFor each application, ERHA Cloud or your Vercel, Upsun or Qovery account. Then set its two branches, the working branch and the production branch the host deploys.
  2. 02An agent prepares the repositoryOn ERHA Cloud, installing the hosting is a task handed to an agent, which writes the Dockerfile and the application's section in .erha/config.yaml. You then review.
  3. 03Turn previews onThe option sits in the application's settings. Every merge request opened to the working branch then gets a preview.

Example: testing a migration before production

A team hosts an API and its PostgreSQL database on ERHA Cloud, with previews set to an anonymised copy of production. A task adds a column to a table.

  1. The agent writes the migration and opens the merge request. The runner has no database, so the migration is written without being run.
  2. ERHA creates the merge request's preview, with an anonymised copy of the production database.
  3. The deploy hook in the .erha/config.yaml file runs the migration in the preview.
  4. The team tests the preview, reviews and merges, after which the preview and its database are deleted.

Outcome

The migration ran on an anonymised copy of production before the release.

Frequently asked questions

Do we have to host with ERHA to use the agents?

No. Hosting is set per application, and “none” is one of the options, alongside your Vercel, Upsun or Qovery account and ERHA Cloud. Previews with their database, tenants and managed services, however, require ERHA Cloud.

Where do applications hosted by ERHA Cloud run?

In Europe. Landing pages are served by Vercel, other applications by a Kubernetes cluster.

What does the database of a preview contain?

Each database starts empty, filled from an SQL file, or as an anonymised copy of production (PostgreSQL only). It is deleted with the preview, when the merge request is closed or merged.

Do previews run all the time?

Yes by default, and they can be put to sleep at night, or at night and at weekends.

Can an agent deploy to production?

No, unless the application is set to direct delivery. The host deploys the production branch, and in merge request mode nothing is merged without your team. As for Samuel, the DevOps engineer agent, he never deploys himself and puts no secret in the repository.

How do we read errors per environment?

ERHA names each hosted environment (production, tenant or merge request preview), and every error shows the environments and versions where it appeared.

Hand your first task to an agent this week

Create your space in a few minutes, or book a demo to connect a first repository with the ERHA team.