← Work

Servernah Billing System

Atlancis Technologies · July 2025 - present

To commercialize an independent OpenStack-based IaaS platform, the cloud infrastructure required an accurate, automated customer usage and invoicing loop. Fleio was the original billing and dashboarding integration but was abandoned in January 2025 due to licensing, performance, and customization constraints. The custom build that followed ran into scope problems mid-sprint before the team locked the architecture and delivered within a 30-day window.

Skyline was forked and extended as the control panel. Since Skyline carries no billing engine, a custom billing and accounting system was built on top of it, handling metering, credit enforcement, invoicing, and payment processing against the OpenStack environment.

The system isolates metering triggers from user dashboard interactions and background state monitoring tasks, allowing multi-tier customer ledger tracking and localized invoice generation without degrading production compute workloads.

Key decisions

Decision Chosen Why
Control plane Skyline fork Extended to capture real-time tenant provisioning logs and state updates at the dashboard interaction layer.
Billing engine Custom Python Built around the environment's specific infrastructure hooks, rate sheets, multi-tier customer ledgers, and local tax structures.
Auth Keycloak Token-based access control across all platform services.
Metering Decoupled Gnocchi polling Queries hypervisor quotas and active instance flavor matrices every 5 minutes without adding agents to running compute nodes.
Credit enforcement Pre-provisioning balance check VM creation blocked at the API layer on insufficient balance.
Data layer PostgreSQL and InfluxDB Usage time-series in InfluxDB for live dashboards. Customer accounting, tax records, and payment tracking in PostgreSQL.
Payment iPay gateway Local payment infrastructure.

Parallel track

In order to avoid pulling the team off an active sprint, a FOSSBilling POC was evaluated separately as a fallback. A custom PHP module was written to integrate OpenStack auth, instance provisioning, and Gnocchi metering into FOSSBilling's extension layer, deployed on Docker Compose. The company reviewed both and went with the custom build.

Component Approach
Deployment Docker Compose, FOSSBilling container with MySQL and Redis
OpenStack auth Custom PHP service authenticating against Keystone v3, token extraction from response headers
Instance management PHP module wrapping Nova and Neutron API calls for provisioning and deletion
Usage collection Cron-driven PHP collector polling Gnocchi every 5 minutes, writing charges to FOSSBilling's client balance
Why it was not chosen FOSSBilling was pre-production and unstable at the time. The custom build was already further along and purpose-fit for the environment.