只需一个命令,即可在任何基础设施上设置开发环境。
Documentation
·
Report Bug
·
Request Feature
·
Join Our Slack
·
Twitter
文档 · 报告错误 · 请求功能 · 加入我们的 Slack · 推特
- Single Command: Activate a fully configured development environment with a single command.
单个命令:使用单个命令激活一个完全配置好的开发环境。 - Runs everywhere: spin up your development environment on any machine — whether it's local, remote, cloud-based, physical server, or a VM & any architecture x86 or ARM.
随处运行:在任何机器上启动您的开发环境——无论是本地、远程、基于云的、物理服务器还是虚拟机,以及任何 x86 或 ARM 架构。 - Configuration File Support: Initially support for dev container, ability to expand to DevFile, Nix & Flox (Contributions welcome here!).
配置文件支持:最初支持开发容器,能够扩展到 DevFile、Nix 和 Flox(欢迎在此贡献!) - Prebuilds System: Drastically improve environment setup times (Contributions welcome here!).
预构建系统:大幅缩短环境设置时间(欢迎在此贡献!) - IDE Support : Seamlessly supports VS Code & JetBrains locally, ready to use without configuration. Includes a built-in Web IDE for added convenience.
IDE 支持:在本地无缝支持 VS Code 和 JetBrains,无需配置即可使用。包括一个内置的 Web IDE,更加方便。 - Git Provider Integration: GitHub, GitLab, Bitbucket, Bitbucket Server, Gitea, Gitness, Azure DevOps & AWS CodeCommit can be connected, allowing easy repo branch or PR pull and commit back from the workspaces.
Git 提供程序集成:GitHub、GitLab、Bitbucket、Bitbucket Server、Gitea、Gitness、Azure DevOps 和 AWS CodeCommit 可以连接,允许从工作区轻松拉取存储库分支或 PR 并提交回。 - Multiple Project Workspace: Support for multiple project repositories in the same workspace, making it easy to develop using a micro-service architecture.
多项目工作区:在同一工作区支持多个项目存储库,便于使用微服务架构进行开发。 - Reverse Proxy Integration: Enable collaboration and streamline feedback loops by leveraging reverse proxy functionality. Access preview ports and the Web IDE seamlessly, even behind firewalls.
反向代理集成:通过利用反向代理功能实现协作并简化反馈循环。即使在防火墙后面,也能无缝访问预览端口和 Web IDE。 - Extensibility: Enable extensibility with plugin or provider development. Moreover, in any dynamic language, not just Go(Contributions welcome here!).
可扩展性:通过插件或提供程序开发实现可扩展性。此外,在任何动态语言中,不仅仅是 Go(欢迎在此做出贡献!) - Security: Automatically creates a VPN connection between the client machine and the development environment, ensuring a fully secure connection.
安全性:在客户端机器和开发环境之间自动创建 VPN 连接,确保完全安全的连接。 - All Ports: The VPN connection enables access to all ports on the development environments, removing the need to setup port forwards over SSH connection.
所有端口:VPN 连接允许访问开发环境中的所有端口,无需通过 SSH 连接设置端口转发。 - Works on my Machine: Never experience it again.
在我的机器上运行:再也不会经历这种情况了。
curl -sfL https://download.daytona.io/daytona/install.sh | sudo bash && daytona server -y && daytona
Windows PowerShell
This command downloads and installs Daytona and runs the Daytona Server:此命令会下载并安装 Daytona 并运行 Daytona 服务器:
$architecture = if ($env:PROCESSOR_ARCHITECTURE -eq "AMD64") { "amd64" } else { "arm64" }
md -Force "$Env:APPDATA\bin\daytona"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
Invoke-WebRequest -URI "https://download.daytona.io/daytona/latest/daytona-windows-$architecture.exe" -OutFile "$Env:APPDATA\bin\daytona\daytona.exe";
$env:Path += ";" + $Env:APPDATA + "\bin\daytona"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);
daytona serve;
Create your first dev environment by opening a new terminal, and running:
通过打开新终端并运行以下命令来创建您的第一个开发环境:
daytona create --code
Start coding. 开始编码。
Daytona is a radically simple open source development environment manager.
Daytona 是一个极其简单的开源开发环境管理器。
Setting up development environments has become increasingly challenging over time, especially when aiming to set up remotely, where the complexity increases by an order of magnitude. The process is so complex that we've compiled a comprehensive guide detailing all the necessary steps to set one up—spanning 5,000 words, 7 steps, and requiring anywhere from 15 to 45 minutes.
随着时间的推移,设置开发环境变得越来越具有挑战性,尤其是在旨在远程设置时,其复杂性会增加一个数量级。这个过程非常复杂,以至于我们编写了一份全面的指南,详细说明了设置所需的所有步骤——长达 5000 字,分为 7 个步骤,需要 15 到 45 分钟不等。
This complexity is unnecessary.
这种复杂性是不必要的。
With Daytona, you need only to execute a single command: daytona create --code
.
使用 Daytona,您只需执行一个命令: daytona create --code
。
Daytona automates the entire process; provisioning the instance, interpreting and applying the configuration, setting up prebuilds, establishing a secure VPN connection, securely connecting your local or a Web IDE, and assigning a fully qualified domain name to the development environment for easy sharing and collaboration.
Daytona 使整个流程实现自动化;配置实例、解释并应用配置、设置预构建、建立安全的 VPN 连接、安全地连接您的本地或 Web IDE,并为开发环境分配一个完全限定的域名,以便于共享和协作。
As a developer, you can immediately start focusing on what matters most—your code.
作为开发人员,您可以立即开始专注于最重要的事情——您的代码。
We spent most of our careers building cloud development environments. In 2009, we launched what was likely the first commercial Cloud IDE project. At that time, technology was lacking, forcing us to develop everything from scratch—the IDE, the environment orchestrator, and almost everything else. A lot of people were interested, and over 2.5 million developers signed up! But we were too early, and we asked too much from our users to change how they worked.
我们职业生涯的大部分时间都在构建云开发环境。2009 年,我们推出了可能是第一个商业云 IDE 项目。当时,技术匮乏,迫使我们从头开始开发一切——IDE、环境编排器以及几乎所有其他东西。很多人感兴趣,超过 250 万开发者注册!但我们太早了,对用户要求太多,要他们改变工作方式。
Now, 15 years since its inception, we have noticed quite a few things. First, the technology we wished for back then exists now. Second, approximately 50% of developers work in remote dev environments, and third, and most importantly, setting up development environments has become more complex than ever, both locally and to a greater magnitude for remote.
So, we took everything we learned and decided to solve these issues once and for all as a fully open-source project. Our goal was to create a single binary that allows you to set up a development environment anywhere you wish, completely free, and finally fulfill the promise that many have attempted to make.
因此,我们汲取了所学的一切,决定将这些问题一劳永逸地作为一个完全开源的项目来解决。我们的目标是创建一个单一的二进制文件,让您可以在任何您希望的地方免费设置开发环境,并最终实现许多人试图做出的承诺。
Before starting the installation script, please go over all the necessary requirements:
在启动安装脚本之前,请查看所有必要的要求:
- Hardware Resources: Depending on the project requirements, ensure your machine has sufficient resources. Minimum hardware specification is 1cpu, 2GB of RAM and 10GB of disk space.
硬件资源:根据项目要求,确保您的机器有足够的资源。最低硬件规格为 1 个 CPU、2GB 内存和 10GB 磁盘空间。 - Docker: Ensure Docker is installed and running.
Docker:确保 Docker 已安装并正在运行。
Daytona allows you to manage your Development Environments using the Daytona CLI. To install it, please execute the following command:
Daytona 允许您使用 Daytona CLI 管理您的开发环境。要安装它,请执行以下命令:
# Install Daytona into /usr/local/bin
curl -sf -L https://download.daytona.io/daytona/install.sh | sudo bash
# OR if you want to install Daytona to some other path where you don`t need sudo
# curl -sf -L https://download.daytona.io/daytona/install.sh | DAYTONA_PATH=/home/user/bin bash
Manual installation 手动安装
If you don't want to use the provided script, download the binary directly from the URL for your specific OS:如果您不想使用提供的脚本,请直接从针对您特定操作系统的 URL 下载二进制文件:
curl -sf -L https://download.daytona.io/daytona/latest/daytona-darwin-amd64 -o daytona
curl -sf -L https://download.daytona.io/daytona/latest/daytona-darwin-arm64 -o daytona
curl -sf -L https://download.daytona.io/daytona/latest/daytona-linux-amd64 -o daytona
curl -sf -L https://download.daytona.io/daytona/latest/daytona-linux-arm64 -o daytona
curl -sf -L https://download.daytona.io/daytona/latest/daytona-windows-amd64.exe -o daytona
curl -sf -L https://download.daytona.io/daytona/latest/daytona-windows-arm64.exe -o daytona
Make sure that path where daytona
binary is downloaded is in your system PATH.
确保下载 daytona
二进制文件的路径在您的系统路径中。
To initialize Daytona, follow these steps:
要初始化 Daytona,请遵循以下步骤:
1. Start the Daytona Server:
This initiates the Daytona Server in daemon mode. Use the command:
1. 启动 Daytona 服务器:这会以守护进程模式启动 Daytona 服务器。使用以下命令:
daytona server
2. Add Your Git Provider of Choice: Daytona supports GitHub, GitLab, Bitbucket, Bitbucket Server, Gitea, Gitness, AWS CodeCommit and Azure DevOps. To add them to your profile, use the command:
daytona git-providers add
Follow the steps provided.
3. Add Your Provider Target: This step is for choosing where to deploy Development Environments. By default, Daytona includes a Docker provider to spin up environments on your local machine. For remote development environments, use the command:
daytona target set
Following the steps this command adds SSH machines to your targets.
4. Choose Your Default IDE: The default setting for Daytona is VS Code locally. If you prefer, you can switch to VS Code - Browser or any IDE from the JetBrains portfolio using the command:
daytona ide
Now that you have installed and initialized Daytona, you can proceed to setting up your development environments and start coding instantly.
Creating development environments with Daytona is a straightforward process, accomplished with just one command:
daytona create --code
You can skip the --code
flag if you don't wish to open the IDE immediately after creating the environment.
Upon executing this command, you will be prompted with two questions:
- Choose the provider to decide where to create a dev environment.
- Select or type the Git repository you wish to use to create a dev environment.
After making your selections, press enter, and Daytona will handle the rest. All that remains for you to do is to execute the following command to open your default IDE:
daytona code
This command opens your development environment in your preferred IDE, allowing you to start coding instantly.
daytona server stop
daytona server restart
Daytona offers flexibility for extension through the creation of plugins and providers.
Daytona is designed to be infrastructure-agnostic, capable of creating and managing development environments across various platforms. Providers are the components that encapsulate the logic for provisioning compute resources on a specific target platform. They allow for the configuration of different targets within a single provider, enabling, for instance, multiple AWS profiles within an AWS provider.
How does it work? When executing the daytona create --code
command, Daytona communicates the environment details to the selected provider, which then provisions the necessary compute resources. Once provisioned, Daytona sets up the environment on these resources, allowing the user to interact with the environment seamlessly.
Providers are independent projects that adhere to the Daytona Provider interface. They can be developed in nearly any major programming language. More details coming soon.
Plugins enhance Daytona's core functionalities by adding new CLI commands, API methods, or services within the development environments. They offer configurable settings to tailor the plugin's behavior to the user's needs.
Similar to providers, plugins are independent projects that conform to the Daytona Plugin interface and can be developed in a wide range of programming languages. More details coming soon.
Daytona is Open Source under the Apache License 2.0, and is the copyright of its contributors. If you would like to contribute to the software, you must:
- Read the Developer Certificate of Origin Version 1.1 (https://developercertificate.org/)
- Signing all commits to the Daytona project.
This ensures that users, distributors, and other contributors can rely on all the software related to Daytona being contributed under the terms of the License. No contributions will be accepted without following this process.
Afterwards, navigate to the contributing guide to get started.
This repository contains Daytona, covered under the Apache License 2.0, except where noted (any Daytona logos or trademarks are not covered under the Apache License, and should be explicitly noted by a LICENSE file.)
Daytona is a product produced from this open source software, exclusively by Daytona Platforms, Inc. It is distributed under our commercial terms.
Others are allowed to make their own distribution of the software, but they cannot use any of the Daytona trademarks, cloud services, etc.
We explicitly grant permission for you to make a build that includes our trademarks while developing Daytona itself. You may not publish or share the build, and you may not use that build to run Daytona for any other purpose.
You can read more in our packinging guidelines.
This project has adapted the Code of Conduct from the Contributor Covenant. For more information see the Code of Conduct or contact codeofconduct@daytona.io. with any additional questions or comments.
For more information on how to use and develop Daytona, talk to us on Slack.