Skip to content

Commit bbe3cd8

Browse files
Merge pull request #1508 from jasonrandrews/tool-installs
New Learning Path on Daytona
2 parents 17250f2 + 6789c87 commit bbe3cd8

File tree

13 files changed

+868
-0
lines changed

13 files changed

+868
-0
lines changed
496 KB
Loading
245 KB
Loading
900 KB
Loading
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Manage Arm development environments with Daytona
3+
4+
draft: true
5+
cascade:
6+
draft: true
7+
8+
minutes_to_complete: 30
9+
10+
who_is_this_for: This is an introductory topic for software developers who want to manage development environments on Arm computers using Daytona.
11+
12+
learning_objectives:
13+
- Install and configure Daytona.
14+
- Create and manage local development environments.
15+
- Create and manage remote development environments.
16+
17+
prerequisites:
18+
- One or more Arm-based computers running Windows, macOS, or Linux computer with Docker installed.
19+
- An AWS account to create cloud development environments (optional).
20+
21+
author_primary: Jason Andrews
22+
23+
armips:
24+
- Neoverse
25+
26+
### Tags
27+
skilllevels: Introductory
28+
subjects: Containers and Virtualization
29+
tools_software_languages:
30+
- Daytona
31+
32+
### Cross-platform metadata only
33+
shared_path: true
34+
shared_between:
35+
- servers-and-cloud-computing
36+
- laptops-and-desktops
37+
- embedded-systems
38+
39+
### FIXED, DO NOT MODIFY
40+
# ================================================================================
41+
weight: 1 # _index.md always has weight of 1 to order correctly
42+
layout: "learningpathall" # All files under learning paths have this same wrapper
43+
learning_path_main_page: "yes" # This should be surfaced when looking for related content. Only set for _index.md of learning path content.
44+
---
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
# ================================================================================
3+
# Edit
4+
# ================================================================================
5+
6+
next_step_guidance: >
7+
You can continue learning about managing development environments with Docker.
8+
# 1-3 sentence recommendation outlining how the reader can generally keep learning about these topics, and a specific explanation of why the next step is being recommended.
9+
10+
recommended_path: "/learning-paths/cross-platform/docker/"
11+
# Link to the next learning path being recommended.
12+
13+
14+
# further_reading links to references related to this path. Can be:
15+
# Manuals for a tool / software mentioned (type: documentation)
16+
# Blog about related topics (type: blog)
17+
# General online references (type: website)
18+
19+
further_reading:
20+
- resource:
21+
title: Daytona Documentation
22+
link: https://www.daytona.io/docs/
23+
type: documentation
24+
- resource:
25+
title: Daytona Blogs
26+
link: https://www.daytona.io/dotfiles/
27+
type: blog
28+
29+
# ================================================================================
30+
# FIXED, DO NOT MODIFY
31+
# ================================================================================
32+
weight: 21 # set to always be larger than the content in this path, and one more than 'review'
33+
title: "Next Steps" # Always the same
34+
layout: "learningpathall" # All files under learning paths have this same wrapper
35+
---
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
# ================================================================================
3+
# Edit
4+
# ================================================================================
5+
6+
# Always 3 questions. Should try to test the reader's knowledge, and reinforce the key points you want them to remember.
7+
# question: A one sentence question
8+
# answers: The correct answers (from 2-4 answer options only). Should be surrounded by quotes.
9+
# correct_answer: An integer indicating what answer is correct (index starts from 0)
10+
# explanation: A short (1-3 sentence) explanation of why the correct answer is correct. Can add additional context if desired
11+
12+
13+
review:
14+
- questions:
15+
question: >
16+
Can Daytona be used to manage local dev container based environments?
17+
answers:
18+
- "Yes"
19+
- "No"
20+
correct_answer: 1
21+
explanation: >
22+
Daytona can manage local development environments.
23+
24+
- questions:
25+
question: >
26+
Which abstraction takes care of the details of the connection to your source code projects?
27+
answers:
28+
- "Provider"
29+
- "Target"
30+
- "Git provider"
31+
correct_answer: 3
32+
explanation: >
33+
Git providers connect your source code to your workspaces.
34+
35+
- questions:
36+
question: >
37+
Can Daytona manage remote development environments in machines provided by cloud service providers?
38+
answers:
39+
- "Yes"
40+
- "No"
41+
correct_answer: 1
42+
explanation: >
43+
Daytona can manage development environments in AWS, Azure, and GCP. All offer Arm-based virtual machines.
44+
45+
46+
# ================================================================================
47+
# FIXED, DO NOT MODIFY
48+
# ================================================================================
49+
title: "Review" # Always the same title
50+
weight: 20 # Set to always be larger than the content in this path
51+
layout: "learningpathall" # All files under learning paths have this same wrapper
52+
---
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: "Configure a Git provider"
3+
weight: 4
4+
5+
layout: "learningpathall"
6+
---
7+
8+
If you plan to use Daytona to work on code in your GitHub account, you can set up a Git provider.
9+
10+
{{% notice Note %}}
11+
This step is optional to complete the Learning Path, because Daytona doesn't require a Git provider if you want run the example project without making any changes.
12+
{{% /notice %}}
13+
14+
## How do I configure GitHub as a Git Provider for Daytona?
15+
16+
Daytona allows you to integrate with various Git providers to manage your code repositories. You can add GitHub as a Git provider using a GitHub Personal Access Token.
17+
18+
Refer to the [Daytona documentation](https://www.daytona.io/docs/configuration/git-providers/) for other Git providers.
19+
20+
### How do I create a Personal Access Token on GitHub?
21+
22+
1. Log in to your GitHub account.
23+
24+
2. Navigate to **Settings** > **Developer settings** > **Personal access tokens** > **Tokens (classic)**
25+
26+
3. Click on **Generate new token**.
27+
28+
4. Provide a note for the token, select the required scopes, `repo` and `user`, and click **Generate token**.
29+
30+
5. Copy the generated token and save it securely. You will need it in the next step.
31+
32+
33+
### How do I configure Daytona to use the GitHub Token?
34+
35+
Make sure the Daytona server is running on your computer.
36+
37+
To configure GitHub run the command below:
38+
39+
```console
40+
daytona git-providers add
41+
```
42+
43+
Select GitHub from the list using the arrow keys.
44+
45+
Paste your GitHub token and enter your GitHub username.
46+
47+
### How do I verify the GitHub Configuration?
48+
49+
To verify that Daytona is configured correctly to use GitHub, run the following command:
50+
51+
```console
52+
daytona git-provider list
53+
```
54+
55+
The output displays GitHub as one of the configured Git providers with your GitHub username.
56+
57+
```output
58+
59+
Name Alias Username
60+
─────────────────────────────────────────────────────────────────────────────────────────────────────────────
61+
GitHub jasonrandrews jasonrandrews
62+
```
63+
64+
You have now successfully configured GitHub as a Git provider for Daytona. You can now use Daytona to manage your code repositories hosted on GitHub.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
---
2+
title: "Install Daytona and run the server"
3+
weight: 3
4+
5+
layout: "learningpathall"
6+
---
7+
8+
## How do I install Daytona on Arm computers?
9+
10+
Installing Daytona on Arm-based computers is easy. The application is a single binary which can be placed anywhere. You can add the location of the `daytona` binary to your search path to make it easy to run.
11+
12+
Below are some recommended ways to install Daytona on a variety of operating systems.
13+
14+
### How do I install Daytona on macOS?
15+
16+
```console
17+
curl -sf -L https://download.daytona.io/daytona/install.sh | sudo bash
18+
```
19+
20+
### How do I install Daytona on Arm Linux or Chrome OS?
21+
22+
```console
23+
curl -sf -L https://download.daytona.io/daytona/install.sh | sudo bash
24+
```
25+
26+
### How do I install Daytona on Windows on Arm?
27+
28+
Copy the commands below and run them at a PowerShell Prompt:
29+
30+
```console
31+
$architecture = if ($env:PROCESSOR_ARCHITECTURE -eq "AMD64") { "amd64" } else { "arm64" }
32+
md -Force "$Env:APPDATA\bin\daytona"; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12';
33+
Invoke-WebRequest -URI "https://download.daytona.io/daytona/v0.50/daytona-windows-$architecture.exe" -OutFile "$Env:APPDATA\bin\daytona\daytona.exe";
34+
$env:Path += ";" + $Env:APPDATA + "\bin\daytona"; [Environment]::SetEnvironmentVariable("Path", $env:Path, [System.EnvironmentVariableTarget]::User);
35+
```
36+
37+
You can also manually download the binary for a particular operating system and place it on your computer.
38+
39+
Refer to the [Daytona documentation](https://www.daytona.io/docs/installation/installation/) for full details.
40+
41+
## How do I confirm Daytona is installed?
42+
43+
Print the version to confirm Daytona works on your computer:
44+
45+
```console
46+
daytona --version
47+
```
48+
49+
The output displays the installed version:
50+
51+
```output
52+
Daytona version v0.50.0
53+
```
54+
55+
## How do I start the Daytona server?
56+
57+
After installing Daytona, you need to start the Daytona server.
58+
59+
{{% notice Note %}}
60+
Always make sure Docker is running before using Daytona.
61+
62+
Even if you plan to develop on remote computers, you still need the server on your local machine.
63+
{{% /notice %}}
64+
65+
There are 3 options you can use to start the Daytona server.
66+
67+
Option 1: start the server in the background with a confirmation prompt:
68+
69+
```console
70+
daytona server
71+
```
72+
73+
Option 2: start the server in the background with no confirmation:
74+
75+
```console
76+
daytona server -y
77+
```
78+
79+
Option 3: start the server in the current terminal so you can see the output:
80+
81+
```console
82+
daytona serve
83+
```
84+
85+
Running in the current terminal is the easiest way to learn about what Daytona is doing.
86+
87+
Below is the output from option 3:
88+
89+
```output
90+
INFO[0000] Using default FRPS config
91+
INFO[0000] Starting api server on port 3986
92+
INFO[0000] Starting local container registry...
93+
INFO[0000] Starting headscale server...
94+
INFO[0002] Headscale server started
95+
INFO[0002] Starting Daytona server
96+
INFO[0002] Image already pulled
97+
INFO[0010] Downloading default providers
98+
INFO[0010] Downloading docker-provider
99+
INFO[0011] Default providers downloaded
100+
INFO[0011] Registering providers
101+
INFO[0011] Provider docker-provider registered
102+
INFO[0012] Setting preset targets for docker-provider
103+
INFO[0012] Target local set
104+
INFO[0012] Preset targets set for docker-provider
105+
INFO[0012] Provider docker-provider initialized
106+
INFO[0012] Provider requirement met: Docker is installed
107+
INFO[0012] Provider requirement met: Docker is running
108+
INFO[0012] Providers registered
109+
INFO[0013] API REQUEST URI=/health/ latency=1.322542ms method=GET status=200
110+
111+
112+
Daytona
113+
114+
## Daytona Server is running on port: 3986
115+
116+
===
117+
118+
You may now begin developing
119+
```
120+
121+
If you are curious, leave the Daytona server running in the terminal and see the activity as you manage development environments.
122+
123+
## How do I stop the Daytona server?
124+
125+
If the server is running in the terminal, use Control-C to stop it.
126+
127+
If the server is running in the background, use the command below to stop it:
128+
129+
```console
130+
daytona server stop
131+
```
132+
133+
## How do I uninstall Daytona?
134+
135+
You can uninstall Daytona using:
136+
137+
```console
138+
daytona purge
139+
```
140+
141+
{{% notice Note %}}
142+
If you have any trouble with Daytona on macOS, remove the directory `$HOME/Library/Application\ Support/daytona`
143+
{{% /notice %}}
144+
145+
With Daytona installed and the server running, you are ready to continue configuring Daytona.
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: "Welcome to Daytona"
3+
weight: 2
4+
5+
layout: "learningpathall"
6+
---
7+
8+
[Daytona](https://www.daytona.io/) is a powerful open-source tool for managing development environments. It enables you to easily create, manage, and switch between different environments, both local and remote.
9+
10+
Daytona is based on dev containers, which provide isolated and reproducible development environments.
11+
12+
Dev containers are lightweight, portable, and consistent environments that can be used across different development setups. They ensure that your development environment is the same regardless of where you are working.
13+
14+
For more information about dev containers, you can refer to the following resources:
15+
- [Introduction to Dev Containers](https://code.visualstudio.com/docs/remote/containers/)
16+
- [Development Containers Specification and dev container resources](https://github.com/devcontainers/)
17+
18+
Daytona is a single executable that runs on a variety of computers, including Windows on Arm, Arm Linux, and macOS with Apple Silicon. It's a great way to develop on Arm as it can be used to access local and remote Arm hardware.
19+
20+
You can use Daytona to create development environments on your local computer, on remote computers running on your local network, and on remote computers from cloud service providers such as AWS and Azure.
21+
22+
## Daytona terminology
23+
24+
Understanding basic Daytona definitions makes it easier to get started.
25+
26+
### What are Git providers?
27+
28+
A Git provider hosts Git repositories and provides tools for managing and collaborating on source code. Examples of Git providers include GitHub, GitLab, Bitbucket, and Azure Repos. With Daytona, a Git provider supplies the source code for your development environments.
29+
30+
### What are providers?
31+
32+
In Daytona, providers supply the resources needed to run development environments, these can be virtual machines (VMs) from AWS or Azure or container providers such as Docker. Providers abstract away the details of the underlying compute, networking, and storage.
33+
34+
### What are targets?
35+
36+
A target in Daytona is the specific configuration of the development environment, including the provider, operating system, CPU and memory resources, and development tools.
37+
38+
The combination of a code repository from a Git provider and a target from a provider bring a development environment to life.
39+
40+
## Before you begin
41+
42+
To try out Daytona, you need one or more Arm-based computers running Windows, macOS, or Linux. Each computer must have Docker installed. Refer to the [Docker install guide](/install-guides/docker/) for installation options.
43+
44+
Next, learn how to install and configure Daytona.

0 commit comments

Comments
 (0)