Cloud and security

How we deploy energy software to the cloud so it doesn’t break on a Friday

Batteries, chargers and somebody’s invoices depend on the platform. It has to be updated often and must not break at all. Here is how Wesfin products are deployed, and which parts of that we set up for clients.

Published
15 November 2026
Reading time
2 min

Three environments and one branch

Every product we make lives in three environments: development, staging and production. Changes reach development automatically as soon as they are merged into the main branch. The whole team sees them there, and that is also where they most often break, which is fine.

Nothing goes to staging or production by itself. A person starts the deploy, only from the main branch, and only a person on a list kept in the same repository. Anyone can read in the change history who is allowed to release to production.

Everything that runs is written down in code

Apps, databases, message queues, file storage, the sign-in service: everything that runs in the cluster is described in one repository. If something isn’t in there, it shouldn’t be in the cluster either.

The cluster pulls nothing on its own. Changes arrive through a deploy pipeline with a key that lives for a few minutes. And every hour a separate check compares the cluster with the repository and opens an issue if someone changed something by hand. That does happen, especially at two in the morning during an incident. What matters is that someone finds out afterwards.

DiagramHow a change reaches the cluster, and how we catch manual edits

Rules a machine checks, not a person

Some things people always forget, however often they are reminded. So the pipeline checks them, and a deploy won’t go through if a rule is broken:

  • every container has CPU and memory limits;
  • in staging and production, images are pinned by digest, not by tag;
  • secrets never enter the repository, manifests only know their names;
  • a deploy waits until every service is up, and fails with the log if one isn’t.

Data lives apart from the apps

An app can be restarted, reinstalled or rolled back to yesterday’s version. A database can’t. So our critical databases run as separate managed services with backups. They don’t sit in a container next to the app, ready to vanish along with it.

Files and documents sit in S3-compatible storage and are served through signed links that expire. We keep telemetry and command logs for as long as the contract and the market require. Sometimes that means years, and it has to be built into the design from day one.

A rollback should be boring

Every release has a previous version we can go back to with one command. We record which image is running now and which ran before it, so a rollback doesn’t require digging through chat history.

If a rollback ever becomes an exciting event, something in the process has gone wrong. We aim for it to be as boring as switching a light off and on.

How this works for clients

We deploy a product in our cloud, in the client’s cloud or in their own data centre, and the rules are the same everywhere. When a client chooses their own infrastructure, we hand over the deployment written as code. Nobody has to work through a forty-page document of manual steps.