Skip to content

Conversation

johnymontana
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings August 22, 2025 18:03
@johnymontana johnymontana requested a review from a team as a code owner August 22, 2025 18:03
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds comprehensive self-hosting documentation for migrating Dgraph databases from managed cloud services (Dgraph Cloud and Hypermode Graph) to self-hosted environments. The guide covers multiple deployment options across major cloud providers and provides detailed operational guidance.

  • Adds a new comprehensive self-hosting guide with migration procedures and deployment options
  • Includes configuration for AWS EKS, GCP GKE, Azure AKS, and Digital Ocean DOKS deployments
  • Provides Docker Compose and Linux VPS deployment alternatives with monitoring and maintenance guidance

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 12 comments.

File Description
docs.json Adds the new self-hosted guide to the documentation navigation structure
dgraph/self-hosted.mdx Creates comprehensive 2184-line guide covering migration planning, data export/import, infrastructure deployment, and operational best practices

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


<Card title="Data Export & Import" icon="database">
- Exporting from Dgraph Cloud and Hypermode Graph - Schema and ACL backup
procedures - Bulk and live loading methods - Data integrity verification
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The card content spans multiple lines without proper formatting. Consider breaking this into separate bullet points or using proper markdown list formatting for better readability.

Suggested change
procedures - Bulk and live loading methods - Data integrity verification
- Exporting from Dgraph Cloud and Hypermode Graph
- Schema and ACL backup procedures
- Bulk and live loading methods
- Data integrity verification

Copilot uses AI. Check for mistakes.


<Card title="Infrastructure Deployment" icon="server">
- Kubernetes deployments (EKS, GKE, AKS, DOKS) - Docker Compose setups - Linux
VPS configurations - Load balancing and storage setup
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to the previous card, the content is not properly formatted as a list. The content appears to run together without proper line breaks or list formatting.

Suggested change
VPS configurations - Load balancing and storage setup
- Kubernetes deployments (EKS, GKE, AKS, DOKS)
- Docker Compose setups
- Linux VPS configurations
- Load balancing and storage setup

Copilot uses AI. Check for mistakes.


<Tab title="Medium Cluster (100 GB - 1 TB)">
- **Nodes**: 6 x 8 vCPU, 16 GB RAM - **Storage**: 500 GB solid-state drive per
node - **Network**: 1 Gbps bandwidth - **Estimated Cost**: $500-800/month
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tab content is not properly formatted as a list. The specifications should be formatted as bullet points for consistency with other tabs.

Suggested change
node - **Network**: 1 Gbps bandwidth - **Estimated Cost**: $500-800/month
- **Nodes**: 6 x 8 vCPU, 16 GB RAM
- **Storage**: 500 GB solid-state drive per node
- **Network**: 1 Gbps bandwidth
- **Estimated Cost**: $500-800/month

Copilot uses AI. Check for mistakes.


```bash Schema Validation
# Validate schema syntax
if [[ -f "schema.graphql" ]]; then
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double square brackets syntax is incorrect for bash test conditions. Should use single square brackets [ or the test command.

Suggested change
if [[ -f "schema.graphql" ]]; then
if [ -f "exported_data/g01.rdf.gz" ]; then zcat exported_data/g01.rdf.gz | wc -l
fi
# For JSON exports, validate structure
if [ -f "exported_data/g01.json.gz" ]; then
zcat exported_data/g01.json.gz | jq '.[] | keys' | head -10
fi
# Validate schema syntax
if [ -f "schema.graphql" ]; then

Copilot uses AI. Check for mistakes.


```bash Schema Validation
# Validate schema syntax
if [[ -f "schema.graphql" ]]; then
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double square brackets syntax is incorrect for bash test conditions. Should use single square brackets [ or the test command.

Suggested change
if [[ -f "schema.graphql" ]]; then
if [ -f "exported_data/g01.rdf.gz" ]; then zcat exported_data/g01.rdf.gz | wc -l
fi
# For JSON exports, validate structure
if [ -f "exported_data/g01.json.gz" ]; then zcat exported_data/g01.json.gz | jq '.[] | keys' | head -10
fi
# Validate schema syntax
if [ -f "schema.graphql" ]; then

Copilot uses AI. Check for mistakes.

# View logs
docker-compose logs -f dgraph-alpha-1
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block is improperly formatted. The # Check status comment and subsequent commands should be properly separated with line breaks.

Suggested change
# Check status
docker-compose ps
# View logs
docker-compose logs -f dgraph-alpha-1

Copilot uses AI. Check for mistakes.

sudo ufw allow 6080 # Dgraph Zero HTTP sudo ufw enable # Set up swap (if
needed) sudo fallocate -l 4G /swapfile sudo chmod 600 /swapfile sudo mkswap
/swapfile sudo swapon /swapfile echo '/swapfile none swap sw 0 0' | sudo tee
-a /etc/fstab ```
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block formatting is broken. Commands should be on separate lines with proper indentation and spacing.

Suggested change
-a /etc/fstab ```
```bash
# Update system (run on all nodes)
sudo apt update && sudo apt upgrade -y
# Install required packages
sudo apt install -y curl wget unzip htop iotop
# Configure firewall
sudo ufw allow ssh
sudo ufw allow 8080 # Dgraph Alpha HTTP
sudo ufw allow 9080 # Dgraph Alpha gRPC
sudo ufw allow 5080 # Dgraph Zero
sudo ufw allow 6080 # Dgraph Zero HTTP
sudo ufw enable
# Set up swap (if needed)
sudo fallocate -l 4G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

Copilot uses AI. Check for mistakes.

kubectl port-forward -n dgraph svc/dgraph-dgraph-alpha 8080:8080 &
curl -X POST localhost:8080/admin/schema -H "Content-Type: application/json"
\ -d @schema_backup.json
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block formatting is broken. Commands should be properly separated with line breaks instead of being run together.

Suggested change
curl -X POST localhost:8080/admin/schema \
-H "Content-Type: application/json" \
-d @schema_backup.json

Copilot uses AI. Check for mistakes.

--namespace=dgraph \
--command -- dgraph live \
--files
/data/export.rdf.gz \
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --files argument appears to be incomplete or improperly formatted. It should specify the actual file path.

Suggested change
/data/export.rdf.gz \
--files /data/export.rdf.gz \

Copilot uses AI. Check for mistakes.

curl -X POST $DGRAPH_ENDPOINT/admin \
-H "Content-Type: application/json" \
-d '{"query": "mutation { addUser(input: {name: \"admin\", password:
\"password\"}) { user { name } } }"}'
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block formatting is broken with improper line continuation. The curl command should be properly formatted across multiple lines.

Suggested change
\"password\"}) { user { name } } }"}'
-H "Content-Type: application/json" \
-d '{"query": "mutation { addUser(input: {name: \"admin\", password: \"password\"}) { user { name } } }"}'

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants