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

feat: running locally through dev container #8677

Merged
merged 16 commits into from
May 12, 2022

Conversation

tczhao
Copy link
Member

@tczhao tczhao commented May 8, 2022

Fixes #8589

Tested with commands and access to UI

make argoexec-image
make start API=true PROFILE=mysql
make pre-commit -B

working:

  • MacOS 12.2 with M1 Pro
  • Microsoft Windows 10 Pro: 10.0.19044 Build 19044
  • Ubuntu 20.04 LTS with Docker Desktop

not working

  • Ubuntu 20.04 LTS with docker (The k3d does not detect dind correctly and end up using the incorrect setting when create k3s cluster)

with

  • windows wsl2 with i7-11800h 16vcore 10GB ram
  • macbook pro with m1 pro 8vcore 16GB ram
  • Ubuntu 20.04 LTS i5-4200u 4vcore 6GB ram

(assuming all dependencies are preinstalled)

locally win-wsl2 dev-container win-wsl2 dev-container mac-m1pro dev-container ubuntu
dev-container build na 7m 25m 17m
make pre-commit -B 3m30s 4m15s 11m30s 9m42s
make test 52s 1m15s 5m26s 3m31s
make start (without waiting minio) 7s 8s 1m26s 20s

tczhao added 2 commits May 8, 2022 23:14
Signed-off-by: Tianchu Zhao <[email protected]>
Signed-off-by: Tianchu Zhao <[email protected]>
@tczhao tczhao changed the title Feature/dev container feat: running locally through dev container May 8, 2022
Copy link
Contributor

@alexec alexec left a 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?

Copy link
Contributor

@alexec alexec left a 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?

docs/running-locally.md Outdated Show resolved Hide resolved
docs/running-locally.md Outdated Show resolved Hide resolved
docs/running-locally.md Outdated Show resolved Hide resolved
docs/running-locally.md Outdated Show resolved Hide resolved
docs/running-locally.md Outdated Show resolved Hide resolved
docs/running-locally.md Outdated Show resolved Hide resolved
docs/running-locally.md Outdated Show resolved Hide resolved
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],

"remoteUser": "vscode",
"features": {
Copy link
Contributor

@alexec alexec May 8, 2022

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.

Copy link
Member Author

@tczhao tczhao May 10, 2022

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 install kubectl in DOCKERFILE.
  • removed git feature, change to install git in DOCKERFILE
  • 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 a docker-in-docker setup.
  • we need python for the mkdocs, this gets run as part of the make pre-commit
  • Total dev-container build time is about 7 min on 16vcore i7-11800h windows after the above changes

Copy link
Member Author

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

@alexec alexec requested a review from dpadhiar May 9, 2022 17:02
Copy link
Member

@dpadhiar dpadhiar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tczhao
Copy link
Member Author

tczhao commented May 10, 2022

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?

bullseye works fine, changed.
Not sure about codespaces, its only available for team/enterprise, assuming most of the users won't have access to it.

@tczhao
Copy link
Member Author

tczhao commented May 10, 2022

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?

tested on

  • windows wsl2 with i7-11800h 16vcore 10GB ram
  • macbook pro with m1 pro 8vcore 16GB ram
  • Ubuntu 20.04 LTS i5-4200u 4vcore 6GB ram

(assuming all dependencies are preinstalled)

locally win-wsl2 dev-container win-wsl2 dev-container mac-m1pro dev-container ubuntu
dev-container build na 7m 25m 17m
make pre-commit -B 3m30s 4m15s 11m30s 9m42s
make test 52s 1m15s 5m26s 3m31s
make start (without waiting minio) 7s 8s 1m26s 20s

docs/running-locally.md Outdated Show resolved Hide resolved
@tczhao tczhao requested a review from alexec May 10, 2022 14:47
docs/running-locally.md Outdated Show resolved Hide resolved
@tczhao tczhao requested a review from alexec May 12, 2022 03:03
@alexec alexec merged commit 1f2417e into argoproj:master May 12, 2022
@agilgur5 agilgur5 added the area/build Build or GithubAction/CI issues label Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Build or GithubAction/CI issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dev Container - like Codespaces, Gitpod(?) or VSCode
4 participants