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

[Feature] Easier developer environment setup #3065

Closed
dtaivpp opened this issue Dec 12, 2022 · 8 comments
Closed

[Feature] Easier developer environment setup #3065

dtaivpp opened this issue Dec 12, 2022 · 8 comments
Labels
devex enhancement New feature or request good first issue Good for newcomers help wanted Community development is encouraged

Comments

@dtaivpp
Copy link
Contributor

dtaivpp commented Dec 12, 2022

Is your feature request related to a problem? Please describe.

It can be really challenging to setup a developer environment for OpenSearch dashboards. There should be a straightforward way to create a reproducible development environment to assist new contributors.

Describe the solution you'd like

There are several ways this could be achieved but I believe some sort of developer container setup would be the most straightforward as there are several projects already working on this. Codespaces and Gitpod are the two that immediately come to mind.

I am pro-Codespaces as it is integrated nicely into GitHub.

Describe alternatives you've considered

There are several alternatives such as packaging a VM but that is a clunky hard to maintain solution.

Additional context

@dtaivpp dtaivpp added the enhancement New feature or request label Dec 12, 2022
@ashwin-pc
Copy link
Member

@dtaivpp While i like the idea of a reproducible development environment like codespaces, you mentioned that its quite challenging to setup a development environment today for OpenSearch Dashboards. Can you elaborate on that?

The instructions to setup the dev environment is quite simple in my opinion and outlined in the developer guide

We also have a similar issue open to discuss using docker as a dev container to have a reproducible dev environment (#2196)

@joshuarrrr joshuarrrr added the help wanted Community development is encouraged label Dec 13, 2022
@joshuarrrr
Copy link
Member

I'm not sure exactly what's involved in setting up Codespaces for the project, but I imagine we'd be very interested in a community contribution to help us do that if someone is familiar with it.

@dtaivpp
Copy link
Contributor Author

dtaivpp commented Dec 15, 2022

To add some data to the thread when I setup an environment with MacOS it took ~ 1.5 hours. There were some things that weren't covered in the documentation which was why it took a bit longer (Installing nvm without brew, nvm install).

After that I tried to spin up a windows dev environment. Took ~50 minutes. Nvm on windows is very rough. There are issues requiring users to modify nvm's settings files, .nvmrc file isn't found, etc. Only reason it didn't take longer is I was aware of windows path limitations.

I think maintaining one install guide along with a single curated development environment would be much smoother. It likely will not have to be updated as it relies on .nvmrc, .node-version, etc for config. Also, it would allow us to get people in a working environment in probably under 5 min which would be good for contributors.

++It also has the benefit of being able to be run as a standalone container for dev

@ashwin-pc
Copy link
Member

@joshuarrrr Codespaces uses docker under the hood. We basically need to specify a docker config that has the dev environment setup for the project. its quite simple and a low hanging fruit imo.

@dtaivpp thanks for that context. Yes i'm actually surprised you got it working on mac with our instructions because one of the steps is to use yarn opensearch snapshots which does not work on mac. So I see the value here.

I'm a big fan of local development though, so I would love for us to also take a look into how we can solve this problem for folks who dont want to develop on the cloud. For example when there is spotty internet connections.

@dtaivpp
Copy link
Contributor Author

dtaivpp commented Dec 19, 2022

@ashwin-pc I agree we should have this work equally well from local and remote containers. I will dig some more and see if anyone has a tool that lets people run them locally easily or if that would take modification.

@joshuarrrr could we/should we add good first issue to this? I feel like this is something fairly straightforward.

@ashwin-pc ashwin-pc added the good first issue Good for newcomers label Dec 20, 2022
@Abyl10
Copy link

Abyl10 commented Mar 27, 2023

Dear @dtaivpp and @ashwin-pc,

I wanted to inform you that I have made some updates to the Docker documentation for MacOS related to OpenSearch Dashboards. Could you kindly review the pull request, which can be found at this link: #3694. Thank you for your time and attention.

@abbyhu2000
Copy link
Member

Hi @dtaivpp, we have created a Docker dev env set up manual for the new contributors.

The docker setup is accomplished in this PR:#3444

Here is a YouTube demo on the Docker set up: https://www.youtube.com/watch?v=tEBExO9mMuU

Here is the Docker manual: https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/docs/docker-dev/docker-dev-setup-manual.md

@dtaivpp
Copy link
Contributor Author

dtaivpp commented Apr 14, 2023

This is awesome thank you @abbyhu2000!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devex enhancement New feature or request good first issue Good for newcomers help wanted Community development is encouraged
Projects
None yet
Development

No branches or pull requests

5 participants