Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limited Operational DB PostgreSQL support #32

Merged
merged 2 commits into from
Jul 12, 2024
Merged

Conversation

rtamalin
Copy link
Collaborator

Add support for using PostgreSQL as the backend database for the Operational DB at first, meaning the clients table.

Switch to specifying the clients table programmatically rather than relying purely on embedded SQL scriptlet. This also leverages the previously added placeholder generators to address the fact that the different supported backends use different placeholders. Also updated the ClientsRow implementation to leverage the new table definition mechanism.

Updated the Dockerfile to install the postgresql16 client tools.

Updated the docker compose.yaml to deploy a customised postgres:16 based db container, backed by a persistent volume, that is plumbed to be accessible by the tsg container on an internal network. The customisations to the postgres image add a startup script that will define our 3 possible databases and authorise our DB user to be able to access and manage them.

The tsg container also depends upon the db container being healthy.

Split the docker and compose make actions out into the corresponding Makefile.docker and Makefile.compose that are included into the main Makefile.

Added a generate Makefile action that can be used to generate and submit telemetry to a telemetry server instance running locally on port 9999.

Added an end-to-end Makefile action that can be used for testing end-to-end operation.

Updated dockerServer.yaml and composeServer.yaml configs.

Updated README.md to reflect availability of the docker and compose related actions, and that the compose.yaml now deploys the postgres db container.

Add support for using PostgreSQL as the backend database for the
Operational DB at first, meaning the clients table.

Switch to specifying the clients table programmatically rather than
relying purely on embedded SQL scriptlet. This also leverages the
previously added placeholder generators to address the fact that
the different supported backends use different placeholders. Also
updated the ClientsRow implementation to leverage the new table
definition mechanism.

Updated the Dockerfile to install the postgresql16 client tools.

Updated the docker compose.yaml to deploy a customised postgres:16
based db container, backed by a persistent volume, that is plumbed
to be accessible by the tsg container on an internal network. The
customisations to the postgres image add a startup script that will
define our 3 possible databases and authorise our DB user to be able
to access and manage them.

The tsg container also depends upon the db container being healthy.

Split the docker and compose make actions out into the corresponding
Makefile.docker and Makefile.compose that are included into the main
Makefile.

Added a generate Makefile action that can be used to generate and
submit telemetry to a telemetry server instance running locally on
port 9999.

Added an end-to-end Makefile action that can be used for testing
end-to-end operation.

Updated dockerServer.yaml and composeServer.yaml configs.

Updated README.md to reflect availability of the docker and compose
related actions, and that the compose.yaml now deploys the postgres
db container.
@rtamalin rtamalin requested a review from gbuenodevsuse July 12, 2024 16:51
@rtamalin rtamalin changed the title Limited Operational DB PosgreSQL support Limited Operational DB PostgreSQL support Jul 12, 2024
README.md Show resolved Hide resolved
app/telemetry.go Show resolved Hide resolved
docker/postgres/initdb.sql Show resolved Hide resolved
@rtamalin rtamalin merged commit 05f4194 into main Jul 12, 2024
1 check passed
@rtamalin rtamalin deleted the postgresql_support_hacking branch July 24, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants