-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: running locally through dev container #8677
Conversation
Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
347b34c
to
749a5f0
Compare
Signed-off-by: Tianchu Zhao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! How fast is it? How long does it take to run “make pre-commit -B”? Could we always use bullseye? How do I run this if I use a different IDE? Does it work with Codespaces?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want some hard data on using a Dev Container is vs local install.
Engineers will run:
make start
make pre-commit -B
make test
Can you add how long these take without a dev container vs local?
.devcontainer/devcontainer.json
Outdated
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ], | ||
|
||
"remoteUser": "vscode", | ||
"features": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there anyway to make this faster by removing some of these?
We don't need to use k3s
, minikube
, would be fine. Do we need docker-in-docker
? I'm pretty sure we don't need python
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- removed
kubectl-helm-minikube
feature, change to installkubectl
inDOCKERFILE
. - removed
git
feature, change to installgit
inDOCKERFILE
- leaving the rest of the features, considering they can be quite architecture-dependent and can become quite complicated to write in DOCKERFILE, better rely on the vscode maintainence?
- we need
docker-in-docker
, since k3s cluster container is running from the dev-container, this is adocker-in-docker
setup. - we need
python
for themkdocs
, this gets run as part of themake pre-commit
- Total dev-container build time is about 7 min on 16vcore i7-11800h windows after the above changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moved features to DOCKERFILE with versioning pinning,
dev-container feature offers 2 ways to install, through sh script (DOCKERFILE) or through feature tag (devcontainer.json):
For the time being:
- sh script offers more customisable parameters, the GOPATH is an important one to our setup
- sh scripts supports installation script versioning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…bullseye variant Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
…iner Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
bullseye works fine, changed. |
tested on
(assuming all dependencies are preinstalled)
|
Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
… of home, this can cause issues Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
Fixes #8589
Tested with commands and access to UI
working:
not working
with
(assuming all dependencies are preinstalled)