CCI-MOC / openstack-billing-from-db

Simple billing from the database
Apache License 2.0
1 stars 3 forks source link

Use SQLite3 instead of MariaDB #32

Closed knikolla closed 5 months ago

knikolla commented 5 months ago

This is part of a series of work to reduce the amount of setup required for running the script and remove as many external dependencies as possible.

By removing the dependency on MariaDB, this workflow can run in a container without requiring a sidecar.

All the information that we need for invoicing is present in three tables from one single database (instances, instance_{actions,extra}) which have a simple foreign key relationship, we're not relying on any special features from MariaDB that are not present in SQLite.

It is not possible to import a mysqldump generated file into Sqlite though, but there is a script of GitHub that performs the conversion successfully. https://github.com/dumblob/mysql2sqlite

A follow-up patch will introduce a Dockerfile that includes the binary and automatically does the conversion process.