title | description | date | author | tags | |||
---|---|---|---|---|---|---|---|
Setting Up Daytona DigitalOcean Provider |
A step-by-step guide to setting up and configuring the Daytona DigitalOcean Provider for managing workspace projects on DigitalOcean droplets. |
2024-09-10 |
Kiran Naragund |
|
The DigitalOcean Provider allows Daytona to create and manage Workspace projects on DigitalOcean droplets. This provider integrates Daytona with DigitalOcean, enabling scalable and flexible management of Workspaces in a cloud environment. To use the DigitalOcean Provider, we need a DigitalOcean API token with appropriate permissions. This token grants the necessary access to manage droplets, critical for Daytona’s Workspace project creation and management.
In this article, we will walk you through the setup and configuration of the Daytona DigitalOcean Provider, including creating an API token with the required permissions.
To follow along with this article, you should have:
- A basic understanding of DigitalOcean and Droplets.
- A DigitalOcean account with access to create API tokens.
- Installed Daytona latest version [install from here]
Note: [In this article, Daytona v0.29.1 is used]
-
Creating a DigitalOcean API Token with necessary permissions.
-
Install and configure the Daytona DigitalOcean Provider for creating and managing workspaces.
-
Set up DigitalOcean targets, including configuring auth token, size, region, and more.
-
Troubleshooting tips for common issues like invalid API Token, Droplet Creation Failure, and Provider Errors.
To configure the Daytona DigitalOcean Provider, create a DigitalOcean API token
with Full Access
permission. This token will allow Daytona to manage your
droplets. Follow the steps below to create an API token:
-
Step 1.1: Log in to your DigitalOcean account and navigate to the API section in the dashboard.
-
Step 1.2: Click on Generate New Token under the Personal Access Tokens section.
-
Step 1.3: Give your token a descriptive name (e.g., daytona-provider) and select the scopes required for managing droplets.
Note: [Select
Full Access
Scope, by selecting this you will give both read and write permission] -
Step 1.4: Click Generate Token and copy your token to use it later.
Now that you have your API token, you're ready to set up the Daytona DigitalOcean Provider.
Start the daytona server by running the command
daytona server
Run the below command, You will be prompted to choose a provider. Select
digitalocean-provider
from the list
daytona provider install
Run the following command to initiate the target setup process:
daytona target set
You will be prompted to choose a provider. Select digitalocean-provider
from
the list
After selecting the DigitalOcean provider, choose to create a new target and
enter a unique and descriptive name for your DigitalOcean target (e.g.,
daytona-digitalocean-target
).
You will be prompted to enter several configuration options for the DigitalOcean provider. Here's an overview:
-
Auth Token:
Enter the API token you generated earlier. If you left empty, Daytona will attempt to retrieve it from the
DIGITALOCEAN_API_TOKEN
environment variable. -
Disk Size:
The size of the disk, in GB. Default is 20 GB.
-
Image:
Select the base image for your droplet (e.g.,
ubuntu-24-04-x64
). More information on images can be found here. here -
Region:
Select the DigitalOcean region where the droplets will be deployed (e.g.,
nyc3
for New York). Check available regions here -
Size:
Choose the droplet size (e.g., s-1vcpu-1gb). Find available droplet sizes here
Click enter after filling all the details.
Congratulations, You have successfully setup and configured Daytona DigitalOcean Provider to create and manage workspace on droplets.
To verify daytona DigitalOcean provider has been successfully installed or not, run the below command you will get provider and target configuration information you have configured.
daytona provider list
While setting up and configuring the DigitalOcean Provider with Daytona, you may encounter some common issues. Below are troubleshooting tips to help resolve them:
-
Problem: Invalid API Token
Solution: Double-check that your DigitalOcean API token is correct and has the necessary scopes. You can generate a new token if needed.
-
Problem: Droplet Creation Failure
Solution: Ensure the selected region, droplet size, and image are valid for your target. Verify that you have sufficient resources (e.g., account limits) on DigitalOcean.
-
Problem: Provider Errors
Solution: If you encounter issues with the DigitalOcean provider, it could be due to bugs or limitations in the latest release. Keep an eye on the DigitalOcean Provider GitHub Repository for updates and fixes.
By following this article, you’ve successfully set up and configured the Daytona DigitalOcean Provider. You can now manage Workspaces on DigitalOcean using Daytona, leveraging its powerful infrastructure for your development and deployment needs.
For the latest information, refer to the official Daytona documentation.