Skip to content

Commit

Permalink
Merge pull request #83 from devzero-inc/staging
Browse files Browse the repository at this point in the history
fixes broking links
  • Loading branch information
mishushakov authored Aug 6, 2024
2 parents a78f5ac + 04d20e8 commit d03f881
Show file tree
Hide file tree
Showing 32 changed files with 326 additions and 35 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/gcp-cloudsql-access.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/gcp-cloudsql-architecture.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/gcp-cloudsql-creation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/gcp-cloudsql-network-peer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Linkspector
on: [pull_request]
jobs:
check-links:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run linkspector
uses: umbrelladocs/action-linkspector@v1
with:
reporter: github-pr-review
fail_on_error: true
4 changes: 2 additions & 2 deletions README (1).md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DevZero is a [cloud development platform](https://www.devzero.io/cloud-developme

With the DevZero platform, you can centrally define and manage cloud environment [specifications](references/terminology.md#recipe) for development, testing, CI, and more. This ensures that developer environments are always consistent, up-to-date, and secure.

Developers can use these [specifications](recipes/syntax.md) alongside our CLI to launch their own [ephemeral, namespaced](#user-content-fn-1)[^1], and [extensible cloud environments](references/terminology.md#workspace). Developers can connect using any IDE of their choice or leverage a browser-based IDE/shell. We automatically take care of all the ergonomics, too, like shell config, dotfiles, and more, to ensure things match your preferences.
Developers can use these [specifications](recipes/syntax.md) alongside our CLI to launch their own ephemeral, namespaced, and [extensible cloud environments](references/terminology.md#workspace). Developers can connect using any IDE of their choice or leverage a browser-based IDE/shell. We automatically take care of all the ergonomics, too, like shell config, dotfiles, and more, to ensure things match your preferences.

## How does it work?

Expand All @@ -18,7 +18,7 @@ If you're ready to get hands-on, we recommend diving into the [quickstart.md](ge

## Ready to Get Started?

[Visit our dashboard](#user-content-fn-2)[^2] ([devzero.io/dashboard](https://devzero.io/dashboard)) to create your free account and install our CLI. Then head to the [quickstart.md](getting-started/quickstart.md "mention") section of our docs.
Visit our dashboard ([devzero.io/dashboard](https://devzero.io/dashboard)) to create your free account and install our CLI. Then head to the [quickstart.md](getting-started/quickstart.md "mention") section of our docs.

[^1]: More on this in [Terminology > Kubernetes Cluster](references/terminology.md#kubernetes-cluster-ephemeral-namespaced)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ We recommend getting started with our [README (1).md](<README (1).md> "mention")

## Product Components

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f4bb">💻</span><strong>DevBox</strong></td><td></td><td>Virtualized cloud development environment that you connect to using your preferred IDE.</td><td><a href="references/terminology.md#devbox">#devbox</a></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f310">🌐</span><strong>Network</strong></td><td></td><td>WireGuard based network connecting all of your workspaces and other network resources.</td><td><a href="broken-reference/">broken-reference</a></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f4be">💾</span><strong>Storage</strong></td><td></td><td>Fully elastic volumes and S3 buckets that you can use alongside your workspaces.</td><td><a href="broken-reference">Broken link</a></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f47b">👻</span><strong>Ephemeral K8s Cluster</strong></td><td></td><td>Each workspace comes with its own Kubernetes cluster, backed by flexible nodes and compute.</td><td><a href="references/terminology.md#workspace-cluster">#workspace-cluster</a></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f513">🔓</span><strong>Secure Environments</strong></td><td></td><td>Securely share workspaces with colleagues or teams to collaborate in real-time.</td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f5fa">🗺️</span><strong>Edge Regions</strong></td><td></td><td>Globally distributed edge regions allow you to work from anywhere with virtually no latency.</td><td><a href="workspaces/regions/">regions</a></td></tr></tbody></table>
<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f4bb">💻</span><strong>DevBox</strong></td><td></td><td>Virtualized cloud development environment that you connect to using your preferred IDE.</td><td><a href="references/terminology.md#devbox">#devbox</a></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f310">🌐</span><strong>Network</strong></td><td></td><td>WireGuard based network connecting all of your workspaces and other network resources.</td><td><a href="/">broken-reference</a></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f4be">💾</span><strong>Storage</strong></td><td></td><td>Fully elastic volumes and S3 buckets that you can use alongside your workspaces.</td><td><a href="/">Broken link</a></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f47b">👻</span><strong>Ephemeral K8s Cluster</strong></td><td></td><td>Each workspace comes with its own Kubernetes cluster, backed by flexible nodes and compute.</td><td><a href="references/terminology.md#workspace-cluster">#workspace-cluster</a></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f513">🔓</span><strong>Secure Environments</strong></td><td></td><td>Securely share workspaces with colleagues or teams to collaborate in real-time.</td><td></td></tr><tr><td><span data-gb-custom-inline data-tag="emoji" data-code="1f5fa">🗺️</span><strong>Edge Regions</strong></td><td></td><td>Globally distributed edge regions allow you to work from anywhere with virtually no latency.</td><td><a href="workspaces/regions/">regions</a></td></tr></tbody></table>

***

Expand Down
70 changes: 70 additions & 0 deletions STYLE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# DevZero docs style guide

1. Images should have descriptive alt description

Wrong:

```
![](image.png)
```

Correct:

```
![a giraffe](image.png)
```

2. Prefer code-blocks (```) instead of code-formatting (`)

Wrong:

`ssh root@example.com`

Correct:

```
ssh root@example.com
```

3. Shell commands should not have syntax highlighting

Wrong:

```sh
ssh root@example.com
```

Correct:

```
ssh root@example.com
```

4. No bold dot

Wrong:

**End of sentence.**

Correct:

**End of sentence**.


5. Navigation

Example:

**Dashboard > Create new recipe**

```
**Dashboard > Create new recipe**
```
6. Buttons/Dropdowns/Fields
Use respective labels to refer to input elements.
Example:
Click on "Create new recipe". Select "Operating System". Type into the "Search" field.
2 changes: 2 additions & 0 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
* [BigQuery](how-to-guides/cloud-services/gcp/connecting-to-bigquery.md)
* [GKE](how-to-guides/cloud-services/gcp/connecting-to-kubernetes-cluster.md)
* [Cloud Storage](how-to-guides/cloud-services/gcp/connecting-to-cloud-storage.md)
* [Cloud SQL](how-to-guides/cloud-services/gcp/connecting-to-cloud-sql.md)
* [Existing Network](how-to-guides/existing-network/README.md)
* [AWS VPC](how-to-guides/existing-network/connecting-to-aws.md)
* [GCP VPC](how-to-guides/existing-network/connecting-to-gcp.md)
Expand All @@ -73,6 +74,7 @@
* [Docker](how-to-guides/build-cache/docker-remote-build-cache.md)
* [CI](how-to-guides/ci/README.md)
* [GitHub Actions](how-to-guides/ci/run-github-actions-in-a-devbox.md)
* [Remote Desktop](how-to-guides/remote-desktop.md)

## 🛠️ Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion devzero-network/connecting.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ dz network status
## Advertise routes to your DevZero network

1. Get a shell inside the node that you want to add to the network.
2. Install the CLI following [these steps](broken-reference).
2. Install the CLI following [these steps](./../references/cli-man-page/install-the-cli.md).
3. Run

{% code %}
Expand Down
2 changes: 1 addition & 1 deletion environment-variables/env-vars.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ You may store environment variables or secrets with line breaks.

You can access environment variables within builds or at launch-time. If your variable is called `MY_KEY`, to access its value anywhere, use `$MY_KEY`. At runtime, you can use the `env` binary to verify that the secrets are present within that context.

<figure><img src="../recipes/.gitbook/assets/env-var-in-build.png" alt=""><figcaption><p>Environment Variables in Builds</p></figcaption></figure>
<figure><img src="../.gitbook/assets/env-var-in-build.png" alt=""><figcaption><p>Environment Variables in Builds</p></figcaption></figure>

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Team</td><td>Environment variables that are shared across your team.</td><td><a href="team.md">team.md</a></td><td><a href="../.gitbook/assets/multiple-users-silhouette.png">multiple-users-silhouette.png</a></td></tr><tr><td>Personal</td><td>Environment variables that can only be accessed by the current user.</td><td><a href="personal.md">personal.md</a></td><td><a href="../.gitbook/assets/single-user-silhouette.png">single-user-silhouette.png</a></td></tr></tbody></table>
2 changes: 1 addition & 1 deletion environment-variables/personal.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Saving an user-scoped environment variable

Visit the Environment Variables section at [https://www.devzero.io/dashboard/environment-variables/u](https://www.devzero.io/dashboard/environment-variables/personal)[ser](https://www.devzero.dev/dashboard/environment-variables/user) to add, remove, or update your user-scoped environment variables and secrets. User-scoped environment variables can only be seen, managed, and used by you.
Visit the Environment Variables section at [https://www.devzero.io/dashboard/environment-variables/user](https://www.devzero.io/dashboard/environment-variables/user) to add, remove, or update your user-scoped environment variables and secrets. User-scoped environment variables can only be seen, managed, and used by you.

{% hint style="info" %}
User-scoped environment variables are automatically made available on each of your running workspaces by default.
Expand Down
4 changes: 2 additions & 2 deletions getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ You can connect your source code provider during the workspace creation or thoug

We currently only offer native support for GitHub as a code provider for DevZero's workspaces. Bitbucket and GitLab support are coming soon!\
\
If you only plan to work with public repositories, you do not need to enable our GitHub integration. However, if you'd like to work with private codebases, you'll need to head to [https://www.devzero.io/dashboard/settings/personal#git-providers](https://www.devzero.io/dashboard/settings/personal#git-providers) and complete the installation and authorization steps.
If you only plan to work with public repositories, you do not need to enable our GitHub integration. However, if you'd like to work with private codebases, you'll need to head to [https://www.devzero.io/dashboard/settings/user-settings](https://www.devzero.io/dashboard/settings/user-settings) and complete the installation and authorization steps.

{% hint style="info" %}
For more information (including a hack to use Bitbucket and GitLab repos), see our [Source Code in Recipes](broken-reference) guide.
For more information (including a hack to use Bitbucket and GitLab repos), see our [Source Code in Recipes](./../recipes/cloning-source-code.md) guide.
{% endhint %}

### Step 3. Creating Your First Recipe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Using the AWS CLI

1. Install the [AWS CLI](../../references/starter-templates/third-party/aws.md) into your DevBox.
1. Install the [AWS CLI](../../../references/starter-templates/third-party/aws.md) into your DevBox.
2. Go to **AWS Console > IAM > Users > Create user**.
3. Add the following permissions to the user: **AmazonS3FullAccess**.
4. After you obtained the credentials, log into the AWS CLI by running:
Expand Down
9 changes: 9 additions & 0 deletions how-to-guides/cloud-services/gcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,14 @@
<a href="../../../.gitbook/assets/gcp-cloudstorage-logo.png">gcp-cloudstorage-logo.png</a>
</td>
</tr>
<tr>
<td>Connecting to GCP Cloud SQL</td>
<td>
<a href="connecting-to-cloud-sql.md">connecting-to-cloud-sql.md</a>
</td>
<td>
<a href="../../../.gitbook/assets/gcp-cloudstorage-logo.png">gcp-cloudstorage-logo.png</a>
</td>
</tr>
</tbody>
</table>
146 changes: 146 additions & 0 deletions how-to-guides/cloud-services/gcp/connecting-to-cloud-sql.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
# Cloud SQL
Connecting to an Cloud SQL running in the private subnet of GCP VPC to your DevBox.

## Architecture Diagram:

![image](../../../.gitbook/assets/gcp-cloudsql-architecture.png)

## Prerequisites:

- Follow the [Connecting to GCP](../../existing-network/connecting-to-GCP.md) guide.

## Existing Database

### Step 1: Accessing Cloud SQL Instance from a DevBox

1. Go to **Cloud SQL > Instances** and copy the Internal IP Address of the instance.

![image](../../../.gitbook/assets/gcp-cloudsql-creation.png)

2. Go to **VPC network > Routes** and select the region where you have deployed the instance.
3. Copy the **Destination IP Range** of the **Peering Subnet** route which contains the IP address of the Cloud SQL Instance.

![image](../../../.gitbook/assets/gcp-cloudsql-network-peer.png)

4. SSH into your **Bastion Host** and enter the following command:

{% code overflow="wrap" lineNumbers="false" %}
```
sudo dz net connect --ssh --advertise-routes=<Destionation-IP-Range>
```
{% endcode %}

5. Go to **DevBox**.
6. Connecting to the Database.

Run the following commands:

{% tabs %}
{% tab title="MySQL" %}
To install the mysql client cli:

```
sudo apt install mysql-client
```

To access the database:

{% code %}
```
mysql -h <Endpoint> -u <Username> --database <Database Name> -p
```
{% endcode %}
{% endtab %}

{% tab title="PostgreSQL" %}
To install the psql client cli:

```
sudo apt install postgresql-client
```

To access the database:

{% code %}
```
psql -h <Endpoint> --username <Username> -d <Database Name> --password
```
{% endcode %}
{% endtab %}
{% endtabs %}

![image](../../../.gitbook/assets/gcp-cloudsql-access.png)


## New Database

### Step 1: Creating an Cloud SQL Instance

1. Go to **Cloud SQL > Create an instance**.
2. Use one of the [database Engine](https://cloud.google.com/products/databases?hl=en) in the Configuration.
3. Choose the **Available Versions** of the **Database.**
4. Enter your **Instance ID** and **Password**.
5. Go to **Choose region and zonal availability** and select the zone where you have provisioned your **Private Subnet**.
6. Scroll down to **Customize your instance > Connections** and choose **Private IP** only.
7. Enter your **VPC** when prompted.
8. Click on create a **private service access connection** and select **Use automatically assigned IP range** while choosing **Allocated IP range**.
9. Click on **Create Instance**.

![image](../../../.gitbook/assets/gcp-cloudsql-creation.png)

### Step 2: Accessing Cloud SQL from DevBox

1. Go to **Cloud SQL > Instances** and copy the Internal IP Address of the instance.
2. Go to **VPC network > Routes** and select the region where you have deployed the instance.
3. Copy the **Destination IP Range** of the **Peering Subnet** route which contains the IP address of the Cloud SQL Instance.

![image](../../../.gitbook/assets/gcp-cloudsql-network-peer.png)

4. SSH into your **Bastion Host** and enter the following command:

{% code overflow="wrap" lineNumbers="false" %}
```
sudo dz net connect --ssh --advertise-routes=<Destionation-IP-Range>
```
{% endcode %}

5. Go to **DevBox**.
6. Connecting to the Database.

Run the following commands:

{% tabs %}
{% tab title="MySQL" %}
To install the mysql client cli:

```
sudo apt install mysql-client
```

To access the database:

{% code %}
```
mysql -h <Endpoint> -u <Username> --database <Database Name> -p
```
{% endcode %}
{% endtab %}

{% tab title="PostgreSQL" %}
To install the psql client cli:

```
sudo apt install postgresql-client
```

To access the database:

{% code %}
```
psql -h <Endpoint> --username <Username> -d <Database Name> --password
```
{% endcode %}
{% endtab %}
{% endtabs %}

![image](../../../.gitbook/assets/gcp-cloudsql-access.png)
52 changes: 52 additions & 0 deletions how-to-guides/remote-desktop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Remote Desktop

You can access your DevBox interactively using Remote Desktop.

### Installing Lightweight Desktop Environment

1. Make sure the package repositories are up-to-date:

```
sudo apt update
```

2. Install Xfce Desktop Environment:

```
sudo apt install xfce4 xfce4-goodies
```

3. Install a VNC server:

```
sudo apt install tightvncserver
```

4. Create a new file in `~/.vnc/xstartup` :

<pre><code><strong>#!/bin/bash
</strong>xrdb $HOME/.Xresources
startxfce4 &#x26;
</code></pre>

5. Start the VNC server:

```
vncserver
```

You will be prompted to create a password.

### Connecting to remote desktop

You can connect to the remote desktop using VNC protocol.

```
vnc://<your-devbox-hostname>:5901
```

{% hint style="info" %}
Make sure your machine is connected to the DevZero network
{% endhint %}

<figure><img src="../.gitbook/assets/Screenshot 2024-08-06 at 13.04.47.png" alt=""><figcaption><p>DevBox Remote Desktop</p></figcaption></figure>
Loading

0 comments on commit d03f881

Please sign in to comment.