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

Windows Daytona workspace #1339

Open
Tpuljak opened this issue Nov 14, 2024 · 50 comments
Open

Windows Daytona workspace #1339

Tpuljak opened this issue Nov 14, 2024 · 50 comments
Assignees
Labels
enhancement New feature or request ⚔️ Quest Tracks quest-bot quests

Comments

@Tpuljak
Copy link
Member

Tpuljak commented Nov 14, 2024

Describe the solution you'd like
We should explore the possibility of running Windows images with Daytona to allow users to create workspaces in a Windows environment. This feature might enable additional native development workflows that can not be ran on Linux.
We should look into https://github.com/dockur/windows as possible images to use.

Additional context
We should first discuss the approach here and outline the necessary changes, if any, needed to make this happen.

@Tpuljak Tpuljak added the enhancement New feature or request label Nov 14, 2024
@quest-bot quest-bot bot added the ⚔️ Quest Tracks quest-bot quests label Nov 14, 2024
Copy link

quest-bot bot commented Nov 14, 2024

New Quest! image New Quest!

A new Quest has been launched in @daytonaio’s repo.
Merge a PR that solves this issue to loot the Quest and earn your reward.


Loot of 500 USD has been stashed in this issue to reward the solver!

🗡 Comment @quest-bot embark to check-in for this Quest and start solving the issue. Other solvers will be notified!

⚔️ When you submit a PR, comment @quest-bot loot #1339 to link your PR to this Quest.

Questions? Check out the docs.


👉 If no one is assigned to the issue, you are welcome to embark on the quest and tackle it without confirmation from us. In the event that multiple PRs are made from different people, we will generally accept those with the cleanest code.

@divanshu-go

This comment was marked as abuse.

@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 14, 2024

@divanshu-go the current default image that daytona ships with (daytonaio/workspace-project) is built with the devcontainer definition found here https://github.com/daytonaio/daytona/tree/main/hack/project_image.

@divanshu-go

This comment was marked as abuse.

@divanshu-go

This comment was marked as abuse.

@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 14, 2024

what the use of [builder_image/.devcontainer](https://github.com/daytonaio/daytona/tree/main/hack/ then

You can ignore that for now.

are there any other hacks or workarounds to configure while testing it ?

No need for hacks.
You can configure the default by running daytona server configure or do it on a per-workspace basis with --custom-image and --custom-image-user (or in the advanced config view) when running daytona create.

@divanshu-go

This comment was marked as abuse.

@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 14, 2024

@divanshu-go you're free to suggest any approach that will accomplish the goal of creating a windows-based workspace.

@divanshu-go

This comment was marked as abuse.

@vishwamartur
Copy link

@quest-bot embark

Copy link

quest-bot bot commented Nov 15, 2024

@vishwamartur has embarked on their Quest. 🗡

  • @vishwamartur has been on GitHub since 2020.
  • They have merged 0 public PRs in that time.
  • Their swords are blessed with HTML and CSS magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@divanshu-go

This comment was marked as abuse.

Copy link

quest-bot bot commented Nov 15, 2024

@divanshu-go has embarked on their Quest. 🗡

  • @divanshu-go has been on GitHub since 2024.
  • They have merged 12 public PRs in that time.
  • Their swords are blessed with CSS and JavaScript magic ✨
  • They have contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 15, 2024

  1. using one of the official images https://hub.docker.com/r/microsoft/windows

@divanshu-go, I don't believe that this is a viable options. From what I can see, windows containers aren't meant for this use case but rather only for deployment on Windows Servers.

  1. using https://github.com/dockur/windows

Even though the support is currently lacking for MacOS, I suggest you try this out.
You can create an example repository with a devcontainer configuration that has this (https://github.com/dockur/windows?tab=readme-ov-file#usage-) docker compose set. Then try to run daytona create THAT_REPO and let us know how it goes.
Looking at the compose, Daytona might not even have to do anything special here if it can be fully configured with the devcontainer standard.

@divanshu-go

This comment was marked as abuse.

@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 15, 2024

@Tpuljak If we go with option 1 of using microsoft images and if we want to test them out on linux or macs , we use setups mentioned here accordingly , https://github.com/StefanScherer/windows-docker-machine?tab=readme-ov-file

using this will enable support on all three OS - linux , mac , windows (might work on home edition if we use WSL)

@divanshu-go okay. Please try out both setups yourself and let use know how it goes and what might be the better option in the context of Daytona.

@divanshu-go

This comment was marked as abuse.

@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 15, 2024

which image should we use.

@divanshu-go use anything you want. Ideally, all of them will work normally.

@divanshu-go

This comment was marked as abuse.

@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 15, 2024

I meant to say that should we show a option to the user regarding this or whatever we choose ?

If this can be solved through a devcontainer, there is no need to implement anything in Daytona.

@divanshu-go

This comment was marked as abuse.

@divanshu-go

This comment was marked as abuse.

@naaa760
Copy link

naaa760 commented Nov 15, 2024

@quest-bot embark

Copy link

quest-bot bot commented Nov 15, 2024

@naaa760 has embarked on their Quest. 🗡

  • @naaa760 has been on GitHub since 2024.
  • They have merged 3 public PRs in that time.
  • Their swords are blessed with JavaScript and TypeScript magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@Vivekgaddigi
Copy link

@quest-bot embark

Copy link

quest-bot bot commented Nov 16, 2024

@Vivekgaddigi has embarked on their Quest. 🗡

  • @Vivekgaddigi has been on GitHub since 2022.
  • They have merged 0 public PRs in that time.
  • Their swords are blessed with Shell and Makefile magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@divanshu-go

This comment was marked as abuse.

vishwamartur added a commit to vishwamartur/daytona that referenced this issue Nov 18, 2024
Related to daytonaio#1339

Add support for Windows images in Daytona to create workspaces in a Windows environment.

* **Devcontainer Configuration**
  - Add a new feature for Windows images using `ghcr.io/devcontainers/features/windows:1` in `hack/project_image/.devcontainer/devcontainer.json`
  - Update the `overrideFeatureInstallOrder` to include the new Windows feature

* **Server Configuration**
  - Add an option to configure Windows images in the `configureCmd` in `pkg/cmd/server/configure.go`
  - Update the `apiServerConfig` to include Windows image configuration

* **Workspace Creation**
  - Add support for creating workspaces with Windows images in the `CreateCmd` in `pkg/cmd/workspace/create.go`
  - Update the `processPrompting` function to handle Windows image options
  - Add a flag for Windows image support in the workspace creation command

* **Project Configuration**
  - Add logic to handle Windows images in the `GetProjectsCreationDataFromPrompt` function in `pkg/cmd/workspace/util/creation_data.go`
  - Update the `ProjectConfigDefaults` to include Windows image defaults
vishwamartur added a commit to vishwamartur/daytona that referenced this issue Nov 18, 2024
Related to daytonaio#1339

Add support for Windows images in Daytona to create workspaces in a Windows environment.

* **Devcontainer Configuration**
  - Add a new feature for Windows images using `ghcr.io/devcontainers/features/windows:1` in `hack/project_image/.devcontainer/devcontainer.json`
  - Update the `overrideFeatureInstallOrder` to include the new Windows feature

* **Server Configuration**
  - Add an option to configure Windows images in the `configureCmd` in `pkg/cmd/server/configure.go`
  - Update the `apiServerConfig` to include Windows image configuration

* **Workspace Creation**
  - Add support for creating workspaces with Windows images in the `CreateCmd` in `pkg/cmd/workspace/create.go`
  - Update the `processPrompting` function to handle Windows image options
  - Add a flag for Windows image support in the workspace creation command

* **Project Configuration**
  - Add logic to handle Windows images in the `GetProjectsCreationDataFromPrompt` function in `pkg/cmd/workspace/util/creation_data.go`
  - Update the `ProjectConfigDefaults` to include Windows image defaults

Signed-off-by: Vishwanath Martur <[email protected]>
@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 19, 2024

@divanshu-go based on the discussion we had in slack, you managed to get a windows-based container running and the next step is to figure out how to get agent ssh server running on windows so we can have it running and connected to the daytona server.

@divanshu-go

This comment was marked as abuse.

@Tpuljak
Copy link
Member Author

Tpuljak commented Nov 19, 2024

@divanshu-go no need for this. If you send me a message on Slack, expect a response there.

If you want to discuss the approach here, which we prefer, you will get a response here.

@Rutik7066
Copy link
Contributor

@quest-bot embark

Copy link

quest-bot bot commented Nov 19, 2024

@Rutik7066 has embarked on their Quest. 🗡

  • @Rutik7066 has been on GitHub since 2019.
  • They have merged 12 public PRs in that time.
  • Their swords are blessed with Dockerfile and JavaScript magic ✨
  • They have contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@Shr11
Copy link

Shr11 commented Dec 1, 2024

@quest-bot embark

Copy link

quest-bot bot commented Dec 1, 2024

@Shr11 has embarked on their Quest. 🗡

  • @Shr11 has been on GitHub since 2022.
  • They have merged 9 public PRs in that time.
  • Their swords are blessed with Python and Jupyter Notebook magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@ARYPROGRAMMER
Copy link
Contributor

@quest-bot embark

Copy link

quest-bot bot commented Dec 4, 2024

@ARYPROGRAMMER has embarked on their Quest. 🗡

  • @ARYPROGRAMMER has been on GitHub since 2020.
  • They have merged 38 public PRs in that time.
  • Their swords are blessed with Kotlin and Swift magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@ARYPROGRAMMER
Copy link
Contributor

@Tpuljak

Proposal: Implement Windows Image Support for Daytona

Problem Statement:
Currently, Daytona lacks native support for Windows development environments, limiting its usability for developers working with Windows-specific technologies or workflows. This proposal aims to expand Daytona's capabilities by introducing comprehensive Windows image support.

Proposed Solution:
We will implement Windows image support by leveraging the https://github.com/dockur/windows project as a potential base for Windows images. The implementation will involve a multi-faceted approach to integrating Windows container support into Daytona's existing infrastructure.

Detailed Approach:

  1. Image Runtime Integration

    • Modify pkg/runtime/runtime.go to:
      • Add OS type detection
      • Create specialized runtime configuration for Windows images
      • Implement validation for Windows-specific container requirements
  2. Image Builder Enhancement

    • Update pkg/build/builder.go to:
      • Recognize and process Windows images
      • Handle Windows-specific build and configuration requirements
      • Create fallback mechanisms for Windows image provisioning
  3. Workspace Configuration

    • Extend pkg/config/workspace.go to:
      • Support Windows-specific workspace parameters
      • Add validation for Windows image selection
      • Create new configuration options for Windows workspace creation

Key Implementation Strategies:

  • Utilize dockur/windows images as a primary reference implementation
  • Develop flexible detection and configuration mechanisms
  • Ensure minimal impact on existing Linux-based workflows
  • Provide comprehensive error handling and validation

Technical Challenges to Address:

  • Performance optimization for Windows containers
  • Networking and volume mounting complexities
  • Licensing and security considerations
  • Compatibility with different development scenarios

Proposed Research and Validation:

  1. Conduct a proof of concept (PoC) with minimal Windows development scenarios
  2. Investigate Windows Subsystem for Linux (WSL) integration options
  3. Explore alternative Windows containerization technologies

Potential Benefits:

  • Expanded platform support
  • Increased flexibility for developers
  • Support for Windows-native development workflows
  • Broader adoption of Daytona across different development environments

Implementation Roadmap:

  1. Initial research and architectural design
  2. Prototype implementation
  3. Comprehensive testing
  4. Documentation updates
  5. Community and maintainer feedback integration

Additional Context:
This proposal directly addresses the need to explore running Windows images with Daytona, enabling users to create workspaces in Windows environments and supporting development workflows that cannot be easily run on Linux.

Requested Actions:

  • Review the proposed approach
  • Provide guidance on specific implementation details
  • Discuss any additional considerations or constraints

I am prepared to:

  • Conduct in-depth research
  • Develop a detailed implementation plan
  • Create proof of concept code
  • Collaborate closely with maintainers throughout the process

Alignment with Project Goals:
This enhancement aligns with Daytona's mission of providing flexible, powerful development environments by expanding platform support and user capabilities.

@ARYPROGRAMMER
Copy link
Contributor

@Tpuljak please assign me this issue so that I can start working on Implementation part, we can discuss & refine the details in the PR raised by me, if assigned.

@Rutik7066
Copy link
Contributor

@ARYPROGRAMMER To use Windows 10, and 11 on a VM, the user will need the license key. Please check for Windows terms and conditions for virtualization.

@Tpuljak
Copy link
Member Author

Tpuljak commented Dec 5, 2024

@ARYPROGRAMMER I'm about 99% sure that #1339 (comment) is AI generated. Most of it doesn't really have anything to do with the issue and is mostly bloat.

If you're serious about working on the issue, you can, without getting assigned.

@Rutik7066 and @unsuman are already working on it.

@ARYPROGRAMMER
Copy link
Contributor

@ARYPROGRAMMER I'm about 99% sure that #1339 (comment) is AI generated. Most of it doesn't really have anything to do with the issue and is mostly bloat.

If you're serious about working on the issue, you can, without getting assigned.

@Rutik7066 and @unsuman are already working on it.

10% was, i just had an idea and just beautified it with ai, would work on it

@Tpuljak
Copy link
Member Author

Tpuljak commented Dec 5, 2024

would work on it

Go for it then. You can record a video of your approach and solution and post it here for discussion.

@hunnywar
Copy link
Contributor

hunnywar commented Dec 7, 2024

@quest-bot embark

Copy link

quest-bot bot commented Dec 7, 2024

@hunnywar has embarked on their Quest. 🗡

  • @hunnywar has been on GitHub since 2024.
  • They have merged 0 public PRs in that time.
  • Their swords are blessed with Go and HTML magic ✨
  • They haven't contributed to this repo before.

This is not an assignment to the issue. Please check the repo’s contribution guidelines before submitting a PR.

Questions? Check out the docs.

@hunnywar
Copy link
Contributor

hunnywar commented Dec 19, 2024

@Tpuljak here is my approach to the issue . , my devcontainer link , https://github.com/hunnywar/go-web.git

user also view web VNC on port 8080 (without password)
image
also you can connect to VNC on local port 5900

user can do RDP on port 3389 (with password)
image

it also setup powershell remoting inside the windows VM
after daytona ssh , you can do cd /vagrant && vagrant ssh to open a interactive powershell
it also setups WinRM, The default HTTP port is 5985. The default HTTPS port is 5986

also openssh is fully configured in windows VM
image

@hunnywar
Copy link
Contributor

RDP
image

@hunnywar
Copy link
Contributor

hunnywar commented Dec 19, 2024

Screencast From 2024-12-19 18-16-13.webm
cd /vagrant and then vagrant ssh
then it basically do ssh with vagrant ssh-config

@Tpuljak I suggest that we send the traffic of our daytona agent to the open ssh port of windows VM inside container , either we can do the same thing with WinRM ports

@Tpuljak
Copy link
Member Author

Tpuljak commented Dec 19, 2024

@hunnywar nice work, seems like an interesting approach.

We have @Rutik7066 already assigned to the issue and working on it as we speak. You can connect via Slack and work on this together if you're interested. Both of you would be rewarded, of course.

@hunnywar
Copy link
Contributor

@Tpuljak can you please share the slack link , I'm not able to find it

@Tpuljak
Copy link
Member Author

Tpuljak commented Dec 19, 2024

@Tpuljak can you please share the slack link , I'm not able to find it

https://go.daytona.io/slack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ⚔️ Quest Tracks quest-bot quests
Projects
None yet
Development

No branches or pull requests

9 participants