https://dagster.io/ logo
#deployment-kubernetes
Title
# deployment-kubernetes
k

Kevin

01/20/2021, 9:13 PM
Hi All 🙂 I've just upgraded from 0.9.9 to 0.10.0 -- i think i've caught most of the breaking changes, but I am now encountering an error with my pipelines that are loaded from gRPC:
d

daniel

01/20/2021, 9:15 PM
hi kevin - is your grpc server using the same instance config that dagit is using? it looks like the run storage is different for some reason on the gRPC server.
k

Kevin

01/20/2021, 9:17 PM
it should be; the grpc image is built from the same image as the dagit image -- it just has the .py files that include the pipelines
d

daniel

01/20/2021, 9:18 PM
got it - what are you using for your run storage?
any chance you could post the dagster.yaml that you're using?
k

Kevin

01/20/2021, 9:25 PM
telemetry:   enabled: false                run_storage:   module: dagster_postgres.run_storage   class: PostgresRunStorage   #  config:   #  postgres_db:   #    username:   #      env: DAGSTER_PG_USERNAME   #    password:   #      env: DAGSTER_PG_PASSWORD   #    hostname:   #      env: DAGSTER_PG_HOST   #    db_name:   #      env: DAGSTER_PG_DB   #    port: 5432 event_log_storage:   module: dagster_postgres.event_log   class: PostgresEventLogStorage   #config:   #  postgres_db:   #    username:   #      env: DAGSTER_PG_USERNAME   #    password:   #      env: DAGSTER_PG_PASSWORD   #    hostname:   #      env: DAGSTER_PG_HOST   #    db_name:   #      env: DAGSTER_PG_DB   #    port: 5432 scheduler:   module: dagster_cron.cron_scheduler   class: SystemCronScheduler schedule_storage:   module: dagster_postgres.schedule_storage   class: PostgresScheduleStorage   #config:   #  postgres_db:   #    username:   #      env: DAGSTER_PG_USERNAME   #    password:   #      env: DAGSTER_PG_PASSWORD   #    hostname:   #      env: DAGSTER_PG_HOST   #    db_name:   #      env: DAGSTER_PG_DB   #    port: 5432   #compute_logs:   #module: dagster_aws.s3.compute_log_manager   #class: S3ComputeLogManager   #config:   #  bucket: "mycorp-dagster-compute-logs"   #  prefix: "dagster-test-" # ================================================================================================== # Run Launcher # ================================================================================================== # Component that determines where runs are executed. #run_launcher: #  module: dagster_k8s.launcher #  class: CeleryK8sRunLauncher local_artifact_storage:   module: dagster.core.storage.root   class: LocalArtifactStorage   config:     base_dir: "/opt/dagster/local/" # ================================================================================================== # Execution # ================================================================================================== # Defining the execution to use celery-k8s #execution: #  celery-k8s: #    config: #      job_image: 'genimind/dagster-core:v0.0.2' #      job_namespace: 'dagster'
d

daniel

01/20/2021, 9:26 PM
do those comments indicate that the run storage doesn't have any config?
k

Kevin

01/20/2021, 9:27 PM
it's quite possible i'm returning to Dagster after what feels like a 6 month hiatus, so teach me sensei
d

daniel

01/20/2021, 9:27 PM
So I was under the impression that you needed to have some kind of config on postgres storage for it to work - but if you're able to use that instance in dagit I may be wrong?
so just to confirm - you're able to load dagit just fine, and the first time you run into problems is when you try to launch a run?
👍 1
k

Kevin

01/20/2021, 9:29 PM
exactly
i see all my pipelines -- they fail to execute with the posted error
d

daniel

01/20/2021, 9:30 PM
what i'd expect if you use an instance with no config is that you'd see an error like this when you start dagit: "Error 1: Must specify a field at the root if more than one field is defined. Defined fields: ['postgres_db', 'postgres_url']"
(i just tried it myself and that's what I saw - is there any way to triple-check that that's actually the instance file that your dagit is using?)
an instance with no config set on your postgres storage, that is
one possibility that might explain all this is that it's not actually loading your instance file - so it's using a default Sqlite implementation instead that isn't available in the gRPC server
k

Kevin

01/20/2021, 9:35 PM
this is the other place i would think i would have defined it
and if it is the situation you are thinking of -- what would the quick and dirty method of getting the images talking to each other??
d

daniel

01/20/2021, 9:36 PM
that looks right - so if you go into dagit you should be able to click on Instance Details - that should show you the YAML that dagit at least is using
so we can see what that is, and then try to figure out why it doesn't seem to be the same on the gRPC server
k

Kevin

01/20/2021, 9:37 PM
run_storage: module: dagster.core.storage.runs class: SqliteRunStorage config: base_dir: /tmp/tmpa48gq0s6/history/
so definitely not using that postgres -- but if this is the default is there a way to get the grpc to talk to this?
d

daniel

01/20/2021, 9:38 PM
i think our best bet is to get it using the postgres rather than finding a way to get the gRPC to reach sqlite
one possibility is that DAGSTER_HOME isn't set to what it needs to be?
k

Kevin

01/20/2021, 9:42 PM
ENV DAGSTER_HOME=/opt/dagster/dagster_home
d

daniel

01/20/2021, 9:43 PM
are these yaml files based on our helm chart? If so I can see how this is supposed to work there
k

Kevin

01/20/2021, 9:44 PM
it should be -- when updating to 0.10.0, i copied over the new helm chart from your repo
d

daniel

01/20/2021, 9:45 PM
got it - so your dagit deployment should have something like this then?
Copy code
volumeMounts:
            - name: dagster-instance
              mountPath: "{{ .Values.dagsterHome }}/dagster.yaml"
              subPath: dagster.yaml
and then similarly in the helm chart, there's a helper that should define the environment variable: {{- define "dagster.shared_env" -}} DAGSTER_HOME: "{{ .Values.dagsterHome }}" which is then included in the dagit pod
if all those are in place, i'd expect it to be using postgres in dagit - so some piece of that may be missing?
backing up for a second - if you're using our helm chart, shouldn't you just need to specify a values.yaml and let helm manage the complexity here? (as opposed to recreating the config maps that are already in the helm chart)
k

Kevin

01/20/2021, 9:59 PM
yeah so using the helm chart this is the values.yaml file we pass to it
d

daniel

01/20/2021, 10:05 PM
got it - to confirm, you're running into this issue when using the standard helm chart? With the only thing modified is the values.yaml?
k

Kevin

01/20/2021, 10:16 PM
yes that and the instance-config which i previously sent
d

daniel

01/20/2021, 10:19 PM
i think for dagit you should be able to use the default repository/tag that comes in the helm chart (since your user code is in a different container anyway) - maybe try using the default value for that instead of repo/dagster-core , and see if your instance is configured correctly using postgres now?
👍 1
if it is, that might be a clue that the problem is somewhere in the docker build process for the containers
like it's not getting the expected value of DAGSTER_HOME or something
k

Kevin

01/20/2021, 10:23 PM
okay i'll give that a whirl and let you know!
then should i also build my user code off of the default value for the dagit image?
j

johann

01/20/2021, 10:32 PM
You should build user code ideally with the same dagster version as whatever the dagit image you’re using is, in this case with 0.10.0 versions of all libraries
👍 1
k

Kevin

01/20/2021, 10:34 PM
yeah i made sure of that, with my own images -- but if i'm already using 0.10.0 versions of the libraries would it make any difference to base it off of your default 0.10.0 dagit image?
d

daniel

01/20/2021, 10:37 PM
I don't think basing it on the dagit image would make a difference - mostly just trying to isolate differences to figure out why the instance doesn't seem to be loading. Once we get dagit working we can hopefully get to the bottom of why its not loading in your gRPC server