Ken
03/20/2020, 12:59 AMdagster.core.errors.DagsterInvalidConfigError: Errors whilst loading configuration for {'service_account_name': <class 'str'>, 'job_image': <class 'str'>, 'in
stance_config_map': <class 'str'>, 'dagster_home': <class 'str'>, 'image_pull_secrets': Field(<dagster.config.config_type.Noneable object at 0x7f1646c88250>,
default=@, is_required=False), 'image_pull_policy': Field(<dagster.config.config_type.String object at 0x7f164f18ce90>, default=Always, is_required=False), 'j
ob_namespace': <class 'str'>, 'env_config_maps': Field(<dagster.config.config_type.Noneable object at 0x7f162684a910>, default=@, is_required=False), 'env_sec
rets': Field(<dagster.config.config_type.Noneable object at 0x7f162684ab10>, default=@, is_required=False)}.
Error 1: Fields "['kubeconfig_file', 'load_kubeconfig']" are not defined at document config root. Available fields: "['dagster_home', 'env_config_maps', '
env_secrets', 'image_pull_policy', 'image_pull_secrets', 'instance_config_map', 'job_image', 'job_namespace', 'service_account_name']"
To my understanding, shouldn't kubeconfig_file
and load_kubeconfig
be accepted in the dagster.yaml ?
Details posted in thread of this post.run_launcher:
module: dagster_k8s.launcher
class: K8sRunLauncher
config:
service_account_name: "environments/tester-imagery-service-account.json"
job_image: "<http://gcr.io/tester-gcr-registry/dagster_demo_pipeline_image:v1|gcr.io/tester-gcr-registry/dagster_demo_pipeline_image:v1>"
instance_config_map: "tester-dagster-demo"
job_namespace: dagster_demo_pipeline_namespace
dagster_home: "/tmp"
load_kubeconfig: True
kubeconfig_file: "environments/kube.config"
Having that, I ran dagster pipeline execute -f ./pipelines/main_pipeline.py -n process_image_pipeline -d cloud -p cloud
=> See error.alex
03/20/2020, 1:07 AMError 1: Fields “[‘kubeconfig_file’, ‘load_kubeconfig’]” are not defined at document config root. Available fields: “[‘dagster_home’, ‘env_config_maps’, 'env_secrets’, ‘image_pull_policy’, ‘image_pull_secrets’, ‘instance_config_map’, ‘job_image’, ‘job_namespace’, ‘service_account_name’]”
Ken
03/20/2020, 1:13 AMFile ".../lib/python3.7/site-packages/kubernetes/config/incluster_config.py", line 51, in _load_config
raise ConfigException("Service host/port is not set.")
kubernetes.config.config_exception.ConfigException: Service host/port is not set.
alex
03/20/2020, 1:17 AMKen
03/20/2020, 1:19 AMalex
03/20/2020, 1:22 AMpip install -e python_modules/libraries/dagster-k8s
and make these modifications https://dagster.phacility.com/D2296nate
03/20/2020, 1:24 AMKen
03/20/2020, 1:25 AMdagster pipeline execute -f ./pipelines/main_pipeline.py -n process_image_pipeline -d cloud -p cloud
• The pipeline will be executed as a Kubernetes Job on Google GKE.
Resources:
+ My Dagster.yaml file:
run_launcher:
module: dagster_k8s.launcher
class: K8sRunLauncher
config:
service_account_name: "environments/tester-imagery-service-account.json"
job_image: "<http://gcr.io/tester-gcr-registry/dagster_demo_pipeline_image:v1|gcr.io/tester-gcr-registry/dagster_demo_pipeline_image:v1>"
instance_config_map: "tester-dagster-demo"
job_namespace: dagster_demo_pipeline_namespace
dagster_home: "/tmp"
load_kubeconfig: True
kubeconfig_file: "environments/kube.config"
telemetry:
enabled: true
instance_id: 8a67c01a-34c5-4161-ab60-cc4c1de95a86
+ The documentation that I used:
https://github.com/dagster-io/dagster/blob/master/docs/sections/deploying/k8s.rst
and source code at "github/dagster/python_modules/libraries/dagster-k8s/dagster_k8s/launcher.py"
+ Version of Dagster:
latest master branch,
With patch from https://dagster.phacility.com/D2296 ( addition of the 2 configuration lines for kube_config )
Is there anything I am missing ? or am I misunderstanding anything ?max
03/21/2020, 1:33 AMdagster pipeline execute
actually bypasses the run launcher. We should add a command line utility that uses the run launcher! Should be pretty straightforwardKen
03/21/2020, 1:36 AMmax
03/21/2020, 2:35 AMKen
03/21/2020, 6:38 AMinstructions=get_pipeline_instructions('execute')
Perhaps you meant
instructions=get_pipeline_instructions('launch')
Since that will generate a templated docs for the proposed dagster pipeline launch
command.
<<<
2. >>>
I propose that we add
group.add_command(pipeline_launch_command)
To:
File: python_modules/dagster/dagster/cli/pipeline.py
Line: 42
So that user can perform dagster pipeline launch
.
At the moment, running that command will throw error Error: No such command 'launch'.
<<<
Other than that, this code revision is now triggering the kubernetes.client package successfully upon dagster pipeline launch
Again, I really appreciate your work!!nate
03/21/2020, 3:41 PM