You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.rst
+52Lines changed: 52 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -173,6 +173,13 @@ If you see this error, run the following command (assuming you are at the projec
173
173
174
174
setfacl -m u:26:-wx ./pg_data
175
175
176
+
If you need to run PostgreSQL using SSL for local development:
177
+
178
+
1. Ensure that you have ``openssl`` installed.
179
+
2. Ensure that you have the ``KOKU_PATH`` environment set to the koku source root directory.
180
+
3. Execute ``${KOKU_PATH}/scripts/genssc`` and follow the prompts to create local a self-signed certificate for PostgreSQL.
181
+
4. In the ``docker-compose.yml`` file, there are two commented sections labeled "PostgreSQL SSL". Follow the directions in these comments to enable the volume mounts and command options to use SSL.
182
+
176
183
See https://access.redhat.com/containers/?tab=overview#/registry.access.redhat.com/rhel8/postgresql-12
177
184
178
185
@@ -217,6 +224,51 @@ Information about PostgreSQL statistics can be found here: https://www.postgresq
217
224
Information about Grafana dashboards can be found here: https://grafana.com/docs/grafana/latest/features/dashboard/dashboards/
218
225
219
226
227
+
Using Trino and MinIO
228
+
^^^^^^^^^^^^^^^^^^^^^
229
+
230
+
We have a special docker-compose file specifically for running Trino (formerly Presto) with MinIO for object storage. With the proper environment variables set the app will run circumventing our conventional Postgres processing in favor of using Trino.
231
+
232
+
Set the following environment variables ::
233
+
234
+
ENABLE_PARQUET_PROCESSING=True
235
+
S3_BUCKET_NAME=koku-bucket
236
+
S3_ENDPOINT=http://kokuminio:9000
237
+
S3_ACCESS_KEY=kokuminioaccess
238
+
S3_SECRET=kokuminiosecret
239
+
240
+
To spin up the minimum targets for Trino use ::
241
+
242
+
make docker-up-min-presto
243
+
244
+
To skip building the koku image base ::
245
+
246
+
make docker-up-min-presto-no-build
247
+
248
+
To tear down containers ::
249
+
250
+
make docker-presto-down-all
251
+
252
+
With all containers running any source added will be processed by saving CSV files in MinIO and storing Parquet files in MinIO. The source's data will be summarized via Trino. Summarized data will land in the appropriate daily_summary table for the source type for consumption by the API.
253
+
254
+
To add test sources and data ::
255
+
256
+
make create-test-customer
257
+
make load-test-customer-data (optional)start={start_date} (optional)end={end_date}
258
+
259
+
The MinIO UI will be available at http://127.0.0.1:9000/minio/. Use the S3_ACCESS_KEY and S3_SECRET set in your env as login credentials.
260
+
261
+
The Trinio UI will be available at http://127.0.0.1:8080/ui/. Login as `admin`. Details can be found there on queries. This is particularly useful for troubleshooting failures.
262
+
263
+
For command line interactions with Trino install the CLI from https://trino.io/docs/current/installation/cli.html and follow instructions there. Use the following to login ::
0 commit comments