-
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 #51 from devzero-inc/staging
Friday 19.07
- Loading branch information
Showing
30 changed files
with
347 additions
and
122 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.
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
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 |
---|---|---|
@@ -1,25 +1,25 @@ | ||
# Personal | ||
# User-scoped | ||
|
||
Saving an environment variable | ||
### Saving an user-scoped environment variable | ||
|
||
Visit the Environment Variables section at [https://www.devzero.io/dashboard/environment-variables/personal](https://www.devzero.io/dashboard/environment-variables/personal) to add, remove, or update your environment personal environment variables and secrets. Personal environment variables can only be seen, managed, and used by you. | ||
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. | ||
|
||
{% hint style="info" %} | ||
Personal environment variables are automatically made available on each of your running workspaces by default. | ||
User-scoped environment variables are automatically made available on each of your running workspaces by default. | ||
{% endhint %} | ||
|
||
<figure><img src="../.gitbook/assets/Personal variables.gif" alt=""><figcaption><p>pkjujuiuytreAdding personal environment variables</p></figcaption></figure> | ||
<figure><img src="../.gitbook/assets/Personal variables.gif" alt=""><figcaption><p>Adding personal environment variables</p></figcaption></figure> | ||
|
||
## Using an environment variable | ||
### Using an environment variable | ||
|
||
<figure><img src="../.gitbook/assets/Update environment variables (1).png" alt=""><figcaption><p>Personal Environment Variables</p></figcaption></figure> | ||
|
||
## Using an environment variable | ||
### Using an environment variable | ||
|
||
Using an environment variable within your workspace is how you would normally use any environment variable (eg: `echo $NOT_SO_SECRET_KEY`). | ||
|
||
To use it in a build, you can reference it the same way. If your environment variable is called `MY_KEY`: | ||
|
||
<figure><img src="../.gitbook/assets/env-var-in-build.png" alt=""><figcaption><p>Environment Variables during build-stage</p></figcaption></figure> | ||
|
||
Need to store a sensitive environment variable or secret? Check out the [secrets.md](secrets.md "mention") page. | ||
Need to store a secret environment variable? Check out the [secrets.md](secrets.md "mention") page. |
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 |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# Team | ||
# Team-scoped | ||
|
||
## Saving a team environment variable | ||
### Saving a team-scoped environment variable | ||
|
||
Visit the Environment Variables section at [https://www.devzero.io/dashboard/environment-variables/team](https://www.devzero.io/dashboard/environment-variables/team) to add, remove or update your environment variables for your team. Team environment variables can be referenced and used by anyone within your DevZero team. | ||
Visit the Environment Variables section at [https://www.devzero.io/dashboard/environment-variables/team](https://www.devzero.io/dashboard/environment-variables/team) to add, remove or update your team-scoped environment variables. Team-scoped environment variables can be referenced and used by anyone within your DevZero team. | ||
|
||
<figure><img src="../.gitbook/assets/Update environment variables (1).png" alt=""><figcaption><p>Team environment variables</p></figcaption></figure> | ||
|
||
{% hint style="info" %} | ||
Team-scoped environment variables and secrets must be directly referenced in your recipe template steps. Unlike personal environment variables, they are **not** automatically added to every workspace. | ||
Team-scoped environment variables and secrets must be directly referenced in your recipe template steps. Unlike user-scoped environment variables, they are **not** automatically added to every workspace. | ||
{% endhint %} | ||
|
||
<figure><img src="../.gitbook/assets/Update environment variables.png" alt=""><figcaption><p>Team Environment Variables</p></figcaption></figure> | ||
|
||
## Using a team environment variable | ||
### Using a team-scoped environment variable | ||
|
||
Using an environment variable within your workspace is how you would normally use any environment variable (eg: `echo $NOT_SO_SECRET_KEY`). | ||
|
||
To use it in a build, you can reference it the same way. If your environment variable is called `MY_KEY`: | ||
|
||
<figure><img src="../.gitbook/assets/env-var-in-build.png" alt=""><figcaption><p>Environment Variables during build-stage</p></figcaption></figure> | ||
|
||
Need to store a sensitive environment variable or secret? Check out the [secrets.md](secrets.md "mention") page. | ||
Need to store a secret environment variable? Check out the [secrets.md](secrets.md "mention") page. |
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
94 changes: 94 additions & 0 deletions
94
how-to-guides/cloud-services/aws/connect-to-a-documentdb-cluster.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,94 @@ | ||
# Amazon DocumentDB | ||
Connecting to DocumentDB running in the private subnet of AWS VPC from your DevBox. | ||
|
||
## Architecture Diagram: | ||
|
||
![image](../../../.gitbook/assets/documentdb-architecture.png) | ||
|
||
## Existing Database | ||
|
||
### Step 1: Accessing DocumentDB from a DevBox | ||
|
||
1. Follow the [Connecting to AWS](../../existing-network/connecting-to-aws.md) guide. | ||
2. Go to **Amazon DocumentDB > Clusters > Your Cluster**. | ||
3. Select **Connectivity & Security**. You will see the commands and DocumentDB hostname for accessing it. | ||
|
||
![image](../../../.gitbook/assets/documentDB-connectivity-and-security.png) | ||
|
||
4. In your **DevBox**, import the MongoDB public GPG key:\ | ||
` | ||
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \ | ||
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \ | ||
--dearmor | ||
` | ||
5. Add MongoDB package repository source:\ | ||
` | ||
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list | ||
` | ||
6. Reload local package database:\ | ||
` | ||
sudo apt-get update | ||
` | ||
7. Install MongoDB:\ | ||
` | ||
sudo apt-get install -y mongodb-org | ||
` | ||
8. Download the certificate:\ | ||
` | ||
wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem | ||
` | ||
9. Connect to the database:\ | ||
` | ||
mongosh --tls --host <your-cluster-endpoint>:27017 --tlsCAFile /path/to/global-bundle.pem --username <your-username> --password <your-password> | ||
`\ | ||
where the cluster endpoint will be available in **Connectivity & Security** section. | ||
|
||
![image](../../../.gitbook/assets/documentdb-access.png) | ||
|
||
|
||
## New Database | ||
|
||
### Step 1: Creating a DocumentDB Instance | ||
|
||
1. Follow the [Connecting to AWS](../../existing-network/connecting-to-aws.md) guide. | ||
2. Go to **Amazon DocumentDB > Create Cluster**. | ||
3. Select **Instance Based Cluster**. | ||
4. In the **Configuration** section choose **Instance Class**, number of instances for your cluster. | ||
5. Set **Username and Password**. | ||
6. Turn on **Show advanced settings**. | ||
7. In the **Network settings** , choose the VPC where your bastion host is running, subnet group and assign a security group which has inbound access to only VPC. | ||
8. Click **Create cluster**. | ||
|
||
![image](../../../.gitbook/assets/documentdb-cluster.png) | ||
|
||
### Step 2: Accessing DocumentDB from a DevBox | ||
|
||
1. In your **DevBox**, import the MongoDB public GPG key:\ | ||
` | ||
curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | \ | ||
sudo gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg \ | ||
--dearmor | ||
` | ||
2. Add MongoDB package repository source:\ | ||
` | ||
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list | ||
` | ||
3. Reload local package database:\ | ||
` | ||
sudo apt-get update | ||
` | ||
4. Install MongoDB:\ | ||
` | ||
sudo apt-get install -y mongodb-org | ||
` | ||
5. Download the certificate:\ | ||
` | ||
wget https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem | ||
` | ||
6. Connect to the database:\ | ||
` | ||
mongosh --tls --host <your-cluster-endpoint>:27017 --tlsCAFile /path/to/global-bundle.pem --username <your-username> --password <your-password> | ||
`\ | ||
where the cluster endpoint will be available in **Connectivity & Security** section. | ||
|
||
![image](../../../.gitbook/assets/documentdb-access.png) |
Oops, something went wrong.