-
Notifications
You must be signed in to change notification settings - Fork 10
Add self hosted Dgraph guide #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
dgraph/self-hosted.mdx
Outdated
|
||
<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 |
There was a problem hiding this comment.
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.
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.
dgraph/self-hosted.mdx
Outdated
|
||
<Card title="Infrastructure Deployment" icon="server"> | ||
- Kubernetes deployments (EKS, GKE, AKS, DOKS) - Docker Compose setups - Linux | ||
VPS configurations - Load balancing and storage setup |
There was a problem hiding this comment.
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.
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.
dgraph/self-hosted.mdx
Outdated
|
||
<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 |
There was a problem hiding this comment.
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.
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 |
There was a problem hiding this comment.
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.
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 |
There was a problem hiding this comment.
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.
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 | ||
There was a problem hiding this comment.
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.
# 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 ``` |
There was a problem hiding this comment.
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.
-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 | ||
There was a problem hiding this comment.
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.
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 \ |
There was a problem hiding this comment.
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.
/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 } } }"}' |
There was a problem hiding this comment.
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.
\"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.
No description provided.