Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples & blog posts #335

Open
Tracked by #132
bpmct opened this issue Sep 2, 2024 · 8 comments
Open
Tracked by #132

Examples & blog posts #335

bpmct opened this issue Sep 2, 2024 · 8 comments
Assignees
Labels
docs Improvements or additions to documentation

Comments

@bpmct
Copy link
Member

bpmct commented Sep 2, 2024

In preparation for the v1.0 launch on Oct 1, let's create the following examples (for examples/ dir) and blog posts so people can find these use cases on Google:

  • Run Dev Container on Kubernetes: Example Kubernetes spec yaml
  • Run Dev Container on OpenShift: Example OpenShift spec
  • Run Dev Container on Red Hat Code Ready / Eclipse Che: Example blog post + issue comment on how folks can run Dev Containers on Red Hat Code Ready as a workaround
  • Build Dev Containers in CI / GitHub Actions: Example workflow to build & push a dev container image or to run your pipeline with it
@coder-labeler coder-labeler bot added docs Improvements or additions to documentation enhancement labels Sep 2, 2024
This was referenced Sep 2, 2024
@mattvollmer
Copy link

Do we see this content living within a single blog post? It's good stuff, but I have reservations about flooding the blog with too much at one time. Or, would we start with K8s and drip the remaining posts over 'n' days/weeks?

@phorcys420
Copy link
Member

hey @mattvollmer, the way I understood it when talking with Ben was that each use case would have it's own post

@bpmct
Copy link
Member Author

bpmct commented Sep 11, 2024 via email

@phorcys420
Copy link
Member

I've started working on the Kubernetes and GitHub Actions examples but ran into some pretty important road blocks/questions.

For GH actions, GitHub forces tail as the entrypoint, and we also need a shell to run the job, both things which the envbuilder image lacks (this should be an easy fix though, talked about this w/ @johnstcn today and we could replace the base image with busybox to keep it light).
The other issue is that you'd need to pass registry auth to envbuilder through ENVBUILDER_DOCKER_CONFIG_JSON_BASE64, which is not convenient at all.

Now to put it in contrast with the other option, there is an already existing devcontainers/ci action that lets you prebuild images and push them to the registry, also lets you run tests/builds within the devcontainer.

The issue with this is that envbuilder is honestly less convenient to use than the official option in its current state, and i'm not sure if it would make sense to use it instead.


For Kubernetes, it's pretty simple but I would like to know what example use-case makes the most sense.
Running tests and building makes more sense in CI, and running the devcontainer to do programming in feels weird to promote outside of a CDE.

So I'm not sure in which case it would even make sense to run Devcontainers in k8s in the first place (envbuilder or not).


I know we're trying to showcase the fact that envbuilder is not a Coder-only product, but I don't think we should be pushing less convenient use-cases to show that off, Eclipse Che/OpenShift Dev Spaces is definitely a great use-case though!

cc: @bpmct

@bpmct
Copy link
Member Author

bpmct commented Sep 22, 2024 via email

@phorcys420
Copy link
Member

phorcys420 commented Sep 22, 2024

Oh nice TIL about devcontainers CI. Makes sense. Although I assume you also need to pass docker config to that?

You kinda do but it actually respects .docker/config.json so you can use the existing docker/login-action action, which won't work with envbuilder AFAICT.

For kubernetes, a basic YAML spec similar to the existing docker run would be good just so people know it’s possible to run in k8s and can get into a shell

Alright I see, so not highlighting anything specific, just showing that you can build&run devcontainers on the fly.

EDIT: You mentioned in DMs that people could run their staging infra on devcontainers and I think that's actually a valid use-case.

@bpmct
Copy link
Member Author

bpmct commented Sep 22, 2024 via email

@phorcys420
Copy link
Member

phorcys420 commented Sep 22, 2024

Alright so I'll see if I can get access to Tim's OCP cluster, otherwise there's probably a way to get a trial or something.


Given that K8S/OCP are basically the same thing with different resource names, I think we should do both of those in the same article.

So in the end we'd end up with:

  • Run Dev Container on Kubernetes/OpenShift: Example Kubernetes & OpenShift spec yaml
    • Run an existing devcontainer
    • Run your staging env on dev containers for easier debugging since all the right tools are there
  • Run Dev Container on Red Hat Code Ready / Eclipse Che

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants