-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #83 from devzero-inc/staging
fixes broking links
- Loading branch information
Showing
32 changed files
with
326 additions
and
35 deletions.
There are no files selected for viewing
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.
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
146 changes: 146 additions & 0 deletions
146
how-to-guides/cloud-services/gcp/connecting-to-cloud-sql.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 & | ||
</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> |
Oops, something went wrong.