Farman Pirzada
08/19/2022, 2:56 PMPORT=8080 && docker run -p 9090:${PORT} -e PORT=${PORT} 4239d2f8608b
This is the error message I am seeing:
time="2022-08-19T04:04:47Z" level=info msg="Config loaded" func=cmd/lakefs/cmd.initConfig file="cmd/root.go:103" fields.file=/home/lakefs/.lakefs.yaml file="cmd/root.go:103" phase=startup
time="2022-08-19T04:04:47Z" level=fatal msg="Invalid config" func=cmd/lakefs/cmd.initConfig file="cmd/root.go:108" error="bad configuration: missing required keys: [auth.encrypt.secret_key blockstore.type]" fields.file=/home/lakefs/.lakefs.yaml file="cmd/root.go:108" phase=startup
I understand what I'm missing:
auth.encrypt.secret_key
blockstore.type
However, how do i check these vales? This is my Dockerfile
:
FROM treeverse/lakefs:latest
I'm using Cloud Run and have my values like so values.yaml
from the example:
logging:
format: json
level: WARN
output: "-"
auth:
encrypt:
secret_key: "10a718b3f285d89c36e9864494cdd1507f3bc85b342df24736ea81f9a1134bcc"
blockstore:
type: gs
If I run this as suggest in the docs as lakefs-config.yaml
I will not be able to proceed because I don't have a local SQL connection to create. I am newish to Docker so I appreciate your patience with me here and can try to provide as much as possible but I'm not sure how to get the .lakefs.yaml
file to read the values i have in my values.yaml
- if I'm reading the error message correctly.Damon C
08/19/2022, 5:43 PMCOPY values.yml /home/lakefs/.lakefs.yaml
or define your config as environment variables in GCP. As shown in the lakefs docs, you need:
LAKEFS_DATABASE_CONNECTION_STRING="[DATABASE_CONNECTION_STRING]"
LAKEFS_AUTH_ENCRYPT_SECRET_KEY="[ENCRYPTION_SECRET_KEY]"
LAKEFS_BLOCKSTORE_TYPE="gs"
You will need to create a PostgreSQL instance in GCP as well.Farman Pirzada
08/19/2022, 5:44 PMI'll try this!COPY values.yml /home/lakefs/.lakefs.yaml
Damon C
08/19/2022, 5:49 PMApplications can connect to a PostgreSQL interface-enabled Spanner database using native Spanner clients or PGAdapter
Farman Pirzada
08/19/2022, 6:55 PMLAKEFS_DATABASE_CONNECTION_STRING="[DATABASE_CONNECTION_STRING]"
LAKEFS_AUTH_ENCRYPT_SECRET_KEY="[ENCRYPTION_SECRET_KEY]"
Are they something I need to generate from somewhere with LakeFS or GCP - or is it a randomly generated string I can put in?Damon C
08/19/2022, 6:57 PMLAKEFS_DATABASE_CONNECTION_STRING
is the connection string for your postgres database. With Spanner, I’m not sure where that comes from because it looks like you also have to run PGAdapter somewhere… With a regular postgres installation, lakefs has a section on setting it up here: https://docs.lakefs.io/deploy/gcp.html#creating-the-database-on-gcp-sql
LAKEFS_AUTH_ENCRYPT_SECRET_KEY
will be a randomly generated string. So a UUID or something similar.Farman Pirzada
08/19/2022, 6:58 PMDamon C
08/19/2022, 7:06 PMFarman Pirzada
08/19/2022, 7:07 PMDamon C
08/19/2022, 7:08 PMFarman Pirzada
08/19/2022, 7:08 PMgcs_storage
---
logging:
format: json
level: WARN
output: "-"
database:
connection_string: "<postgres://user:pass@lakefs.rds.amazonaws.com:5432/postgres>"
auth:
encrypt:
secret_key: "10a718b3f285d89c36e9864494cdd1507f3bc85b342df24736ea81f9a1134bcc"
blockstore:
type: gs
gs:
credentials_file: /secrets/lakefs-service-account.json
Damon C
08/19/2022, 7:10 PMFarman Pirzada
08/19/2022, 7:10 PMDamon C
08/19/2022, 7:11 PM<http://lakefs.rds.amazonaws.com|lakefs.rds.amazonaws.com>
with whatever your postgres hostname is.blockstore
sections and the rest of the yaml is just placeholders/generic.Farman Pirzada
08/19/2022, 7:12 PMDamon C
08/19/2022, 7:16 PMFarman Pirzada
08/19/2022, 7:21 PMDamon C
08/19/2022, 7:22 PMFarman Pirzada
08/19/2022, 7:24 PM