container.training icon indicating copy to clipboard operation
container.training copied to clipboard

Add support for github codespace

Open remyleone opened this issue 4 years ago • 8 comments

Adding devcontainers could be really useful to have quickly a complete setup with an editor, kubectl and a docker command line installed:

  • https://code.visualstudio.com/docs/remote/devcontainerjson-reference
  • https://docs.github.com/en/codespaces

remyleone avatar Dec 21 '21 11:12 remyleone

Hi!

First of all, happy new year :tada:

I don't have access to codespace (looks like it's only for Team and Enterprise users) and I can't find docs showing how to do more than just a container image; but when it becomes more widely available, we can give it a try, yes.

I've tried gitpod in the past, and it's promising, but all these platforms suffer from a common issue: when learning Docker and Kubernetes, it's important to be able to connect to the machine (e.g. after publishing a container's port, or creating a NodePort or LoadBalancer service) and that requires some specific integration in the platform; like Play-With-Docker has, for instance.

Another approach, if you have a Kubernetes cluster (any Kubernetes cluster) is to use the image jpetazzo/shpod (or ghcr.io/jpetazzo/shpod). It provides a "ready to go" environment that you can use either by kubectl execing into it, or by SSH'ing.

I hope that helps!

jpetazzo avatar Jan 09 '22 16:01 jpetazzo

I think you can do port manipulation with codespace: https://docs.github.com/en/codespaces/getting-started/quickstart I'm not sure to understand what you mean by platform-specific. Right now I can use kubectl natively with codespace (and I don't have team or enterprise) and this repo. I have also access to a docker runtime out of the box. You can configure the image used in the codespace to include arbitrary tools.

remyleone avatar Jan 14 '22 16:01 remyleone

https://github.com/jpetazzo/container.training/pull/604

remyleone avatar Jan 14 '22 16:01 remyleone

Just tested it and I was able to interact with a kapsule cluster in seconds without any special configuration. (I'm planning up a workshop soon that's why I thought of this solution to avoid the heterogeneity of the students configurations).

remyleone avatar Jan 14 '22 16:01 remyleone

I don't think codespaces is generally available, is it? image

jpetazzo avatar Jan 15 '22 18:01 jpetazzo

If that can help --- I have Terraform configs that can spawn arbitrary number of Kapsule clusters, running an SSH server in a pod, with all the tools preinstalled. Ping me on Discord if you're interested, I can show you quickly what that looks like (that's what I use for training sessions)

jpetazzo avatar Jan 15 '22 18:01 jpetazzo

I've been using it for a year I think at https://github.com/codespaces. I love it.

BretFisher avatar Jan 15 '22 21:01 BretFisher

image

"None of your organizations have access to Codespaces yet"

jpetazzo avatar Jan 16 '22 10:01 jpetazzo