Is there a good “dagster on kubernetes” example I ...
# deployment-kubernetes
m
Is there a good “dagster on kubernetes” example I can pull down and run in a test cluster?
m
I’ve seen it, but am not familiar with helm. Is that the best example to try out?
r
Yeah that’s the best example to try out. Helm basically allows us to package a set of Kubernetes resources that define a Dagster deployment, as well as expose some useful, common configuration on those resources.
👍 1
m
r
yeah, that’s correct
m
cool, thank you
ok I’ve figured out Helm enough to stand up Dagster in our test cluster with the example user code repo. I can see that the user code example repo is published as a docker image:
Copy code
Environment:
      DAGSTER_CURRENT_IMAGE:                   <http://docker.io/dagster/user-code-example:0.15.8|docker.io/dagster/user-code-example:0.15.8>
but I don’t see a Dockerfile in https://github.com/dagster-io/dagster/tree/master/examples/deploy_k8s/example_project - how can I build my own image that can be run as a dagster workspace/repository? I’d like to tinker with some IO (S3, RDS, Redshift) and I don’t see an obvious path forward for either extending the provided user code and redeploying, or for creating a new repository of my own. Can anyone point me in the right direction?
a
Yeah that's right. Otherwise you can treat is as a completely separate release and not include it in dagster's helm chart
m
thanks - I will probably go that route as I’m not very familiar with Helm, I think it’d be faster. Am I understanding correctly that in the
dagsterApiGrpcArgs
block
Copy code
dagsterApiGrpcArgs:
      - "-f"
      - "/example_project/example_repo/repo.py"
that python file just needs to have a
@repository
defined? If I run the
dagster new-project PROJECT_NAME
command, can I just point that
dagsterApiGrpcArgs
argument at that new project’s
PROJECT_NAME/repository.py
(https://docs.dagster.io/getting-started/create-new-project#create-a-new-project)
a
Yeah that's right
keanu thanks 1
m
And is this the right Dockerfile to build the image for my new user code repository? (from https://docs.dagster.io/deployment/guides/docker#multi-container-docker-deployment)
Copy code
FROM python:3.7-slim

# Checkout and install dagster libraries needed to run the gRPC server
# exposing your repository to dagit and dagster-daemon, and to load
# the DagsterInstance

RUN pip install \
    dagster \
    dagster-postgres \
    dagster-docker

# Set $DAGSTER_HOME and copy dagster instance there

ENV DAGSTER_HOME=/opt/dagster/dagster_home

RUN mkdir -p $DAGSTER_HOME

COPY dagster.yaml $DAGSTER_HOME

# Add repository code

WORKDIR /opt/dagster/app

COPY repo.py /opt/dagster/app

# Run dagster gRPC server on port 4000

EXPOSE 4000

# Using CMD rather than ENTRYPOINT allows the command to be overridden in
# run launchers or executors to run other commands using this image
CMD ["dagster", "api", "grpc", "-h", "0.0.0.0", "-p", "4000", "-f", "repo.py"]
a
You should copy your whole project in the docker image, not only repo.py
m
ah, that’’s a good catch