Hi all, I was trying to run dagster CLI commands f...
# ask-community
s
Hi all, I was trying to run dagster CLI commands from AKS cluster dagster deployed version (command: dagster job launch -j <job name>). I am facing below Error: DagsterInvariantViolationError(\ndagster.core.errors.DagsterInvariantViolationError: $DAGSTER_HOME "/opt/dagster/dagster_home" is not a directory or does not exist. Dagster requires this environment variable to be set to an existing directory in your filesystem\n'
🤖 1
c
In order to run
dagster job launch
, you need to have the
$DAGSTER_HOME
environment variable set and pointed at a directory wherever the job is launching from: https://docs.dagster.io/deployment/dagster-instance#dagster-instance for docs on setting DAGSTER_HOME
s
we are using Dagster helm deployment in AKS, how can we add DAGSTER_HOME in this deployment
r
DAGSTER_HOME should already be present if you are using the Helm chart to deploy
s
I am receiving the above error in Helm deployment: DagsterInvariantViolationError(\ndagster.core.errors.DagsterInvariantViolationError: $DAGSTER_HOME "/opt/dagster/dagster_home" is not a directory or does not exist. Dagster requires this environment variable to be set to an existing directory in your filesystem\n'
r
what pod did you ssh into?
You should ssh into the
dagit
pod to launch a job.
$DAGSTER_HOME
is defined there, and there is a configuration file that your CLI will read. For example, in our helm deployment:
Copy code
internal-3.8.7 ❯ k exec --stdin --tty user-deployment-dagster-dagit-69d79587db-5c7rp -- bash
Defaulted container "dagster" out of: dagster, check-db-ready (init), init-user-deployment-hacker-news (init), init-user-deployment-hacker-news-assets (init)
root@user-deployment-dagster-dagit-69d79587db-5c7rp:/# echo $DAGSTER_HOME
/opt/dagster/dagster_home
root@user-deployment-dagster-dagit-69d79587db-5c7rp:/# ls opt/dagster/dagster_home
dagster.yaml
s
We have added dagsterhome variable to helmchart values like belowglobal postgresqlSecretName: "postgresql-secret" # The DAGSTER_HOME env var is set by default on all nodes from this value dagsterHome: "/opt/dagster/dagster_home"