-
Notifications
You must be signed in to change notification settings - Fork 914
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
Docker dev environment support #2196
Comments
@ashwin-pc +1 this sounds great. Can you provide a few more concrete details about what you envision the docker startup and dev process to look like (rough pseudo-flow comparison to the current local dev would be fine). |
Havent had the time to setup a POC for this yet but it should be fairly simple. We can have a base docker image that has all the dependencies we need to build OpenSearch Dashboards and build it and then use a compose file like this: verison: "3.9"
services:
os:
image: opensearchproject/opensearch:latest
ports:
- "9300:9300"
# Other env params
osd:
build: . # Or alternatively it can be an base image with all the dependencies installed that we can provide
ports:
- "5601:5601"
volumes:
- "./:{container_path_to_project_root}/" to setup any docker image for OpenSearch Engine. Now we can connect to the osd container to run any commands that would not be supported on the native OS and any changes made to the code during development would run in the docker environment |
[Triage]: @ashwin-pc is this issue sth you will be interested to look into? |
I cant promise that i'll get around to it soon, but if no one picks this up in a month or two, I may give it a whirl. |
Alternatively, Vagrant might be of use here, which can use Docker as a back-end and is made specifically with development in mind. It essentially spins up identical virtual machines (or Docker containers) for development. |
wow, never used that, could we get a demo :) |
@BSFishy Thats actually pretty neat! Last time i used Vagrant, it could only run on a VM which was a big overhead especially if you are trying to develop on not the latest and greatest hardware. That being said i'd still lean just a lil bit towards only using docker since:
But I agree with @seraphjiang, it would be cool to see a working demo of this workflow! |
I'll be working on a work-in-progress Vagrantfile over here. Right now, it's getting hung up on ssh access, but that may just be a configuration issue on my machine. Additionally, ssh access might not even be necessary if I can configure it to just start the development server, then let OSD optimizer deal with file watching. It wouldn't be ideal for letting people run commands on the code base other than running the dev server, but I think it would be fine for a quick proof-of-concept. |
After a bit more tampering, it seems that we would need a custom Docker image for SSH access. Essentially Vagrant needs the container to have sshd running, which most images, such as I could try creating a new image with the necessary parts, but I'm not extremely experienced with creating Docker images, and at that point it may be more to maintain than just having a Docker configuration like what was previously posted here. |
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 |
Is your feature request related to a problem? Please describe.
Currently, development for OSD is optimized for the Linux environment. This adds friction to the development flow even if tools like remote dev servers are used. E.g. functional testing.
Describe the solution you'd like
Add a docker dev container so that every contributor can work on an identical dev environment and not worry about local OS limitations. This can additionally simplify the process of development with a bundled version of OpenSeach and plugins by simply switching out the dev container used.
Describe alternatives you've considered
Rolling out supported distributions for every major platform available.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: