Figuring out how to deploy Dagster for my companie...
# ask-community
Figuring out how to deploy Dagster for my companies environment (GKE). And I'm not sure exactly how I'm supposed to containerize and deploy my "user code". This guide explains decoupling the code base, and I'm assuming I need to modify The helm chart of
needs to be modifed
Copy code
# List of unique deployments
    - name: "k8s-example-user-code-1"
        # When a tag is not supplied, it will default as the Helm chart version.
        repository: "<|>"
        tag: ~

        # Change with caution! If you're using a fixed tag for pipeline run images, changing the
        # image pull policy to anything other than "Always" will use a cached/stale image, which is
        # almost certainly not what you want.
        pullPolicy: Always
Such that the
is pointing to an image of my user code. I'm trying to find the source code for or any explanation for how this is supposed to be structured
dagster bot responded by community 1
The helm chart will set the proper command and entrypoint for your user code, provided that you pass the matching values to the chart for the python module/file to load
Giving this a shot, thank you
I'm unable to get my user-code helm chart to update to the new image. Per the documents in the dagster chart I set the enableSubchart to false. In the user-deployment helm chart I modified
Copy code
    - name: "unifyco-dagster"
        # When a tag is not supplied, it will default as the Helm chart version.
        repository: PRIVATE_REPO_URL
        tag: "0.0.1"
        imagePullSecrets: PRIVATE_REPO_SECRET
Yet when I apply it's spinning up the user-repo pod from the demo.
Copy code
NAME                                                     READY   STATUS      RESTARTS   AGE
dagster-daemon-795899b4b8-mflph                          1/1     Running     0          4h1m
dagster-dagit-6fdf977b95-868z8                           1/1     Running     0          4h1m
dagster-postgresql-0                                     1/1     Running     0          9h
dagster-run-8ea28b97-46b9-48aa-9281-3b19194ecde3-86nh4   0/1     Completed   0          9h
lpieri@unifyai unify-dagster % helm upgrade --install user-code dagster/dagster-user-deployments -f helm/user-code-values.yaml
Release "user-code" does not exist. Installing it now.
NAME: user-code
LAST DEPLOYED: Mon Jul 10 22:02:43 2023
NAMESPACE: default
STATUS: deployed
lpieri@unifyai unify-dagster % k get pods                                                                                     
user-code-dagster-user-deployments-k8s-example-user-code-1lrcbh   1/1     Running     0          8s
That pod
is the image I was using previously.
It sounds like something isn’t quite right with your values file if I had to guess. Is the snippet above the whole file? Can you share enough to see the overall structure?
The deployment contains the image despite it not being mentioned in the yaml.
ah ha - yeah, as I suspected, helm issue. you used a values.yaml for the main chart (i.e., rather than one for the user code subchart ( Since you didn't override these lines, the sample was deployed:
If you haven't worked much with helm before, I'd recommend stepping back and doing a tutorial there - it'll help you in the future. you can always check what was actually applied to the chart too
helm get values <helm-deployment-name>
will do a help tutorial and get back to this 🫡
blob salute