Skip to content

Commit d1d35a4

Browse files
committed
clean up guide, move cloud examples to unlisted guides
1 parent 15e5edc commit d1d35a4

File tree

11 files changed

+1048
-1043
lines changed

11 files changed

+1048
-1043
lines changed

dgraph/self-hosted.mdx

Lines changed: 38 additions & 1043 deletions
Large diffs are not rendered by default.

dgraph/self-managed/aws.mdx

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
title: "AWS Deployment"
3+
description:
4+
"Deploy your self-hosted Dgraph cluster on Amazon Web Services using Elastic
5+
Kubernetes Service (EKS)"
6+
unlisted: true
7+
unindexed: true
8+
---
9+
10+
## AWS Deployment
11+
12+
Deploy your self-hosted Dgraph cluster on Amazon Web Services using Elastic
13+
Kubernetes Service (EKS).
14+
15+
```mermaid
16+
graph TB
17+
subgraph "AWS Architecture"
18+
A[Application Load Balancer] --> B[EKS Cluster]
19+
B --> C[Dgraph Alpha Pods]
20+
B --> D[Dgraph Zero Pods]
21+
C --> E[EBS Volumes]
22+
D --> F[EBS Volumes]
23+
24+
subgraph "EKS Cluster"
25+
C
26+
D
27+
G[Monitoring]
28+
H[Ingress Controller]
29+
end
30+
31+
I[S3 Backup] --> C
32+
J[CloudWatch] --> G
33+
end
34+
```
35+
36+
### 1. Infrastructure Setup
37+
38+
#### EKS Cluster Creation
39+
40+
<CodeGroup>
41+
```bash Create EKS Cluster
42+
aws eks create-cluster \
43+
--name dgraph-cluster \
44+
--version 1.28 \
45+
--role-arn arn:aws:iam::ACCOUNT:role/eks-service-role \
46+
--resources-vpc-config subnetIds=subnet-12345,securityGroupIds=sg-12345
47+
```
48+
49+
```bash Update Kubeconfig
50+
aws eks update-kubeconfig --region us-west-2 --name dgraph-cluster
51+
```
52+
53+
```bash Create Node Group
54+
aws eks create-nodegroup \
55+
--cluster-name dgraph-cluster \
56+
--nodegroup-name dgraph-nodes \
57+
--instance-types t3.xlarge \
58+
--ami-type AL2_x86_64 \
59+
--capacity-type ON_DEMAND \
60+
--scaling-config minSize=3,maxSize=9,desiredSize=6 \
61+
--disk-size 100 \
62+
--node-role arn:aws:iam::ACCOUNT:role/NodeInstanceRole
63+
```
64+
65+
</CodeGroup>
66+
67+
#### Storage Class Configuration
68+
69+
```yaml aws-storage-class.yaml
70+
apiVersion: storage.k8s.io/v1
71+
kind: StorageClass
72+
metadata:
73+
name: dgraph-storage
74+
provisioner: ebs.csi.aws.com
75+
parameters:
76+
type: gp3
77+
iops: "3000"
78+
throughput: "125"
79+
volumeBindingMode: WaitForFirstConsumer
80+
allowVolumeExpansion: true
81+
```
82+
83+
### 2. Dgraph Deployment on AWS
84+
85+
<Steps>
86+
<Step title="Apply Storage Class">
87+
```bash kubectl apply -f aws-storage-class.yaml ```
88+
</Step>
89+
90+
<Step title="Add Helm Repository">
91+
```bash helm repo add dgraph https://charts.dgraph.io helm repo update ```
92+
</Step>
93+
94+
<Step title="Create Namespace">
95+
```bash kubectl create namespace dgraph ```
96+
</Step>
97+
98+
<Step title="Deploy Dgraph">
99+
```bash
100+
helm install dgraph dgraph/dgraph \
101+
--namespace dgraph \
102+
--set image.tag="v23.1.0" \
103+
--set alpha.persistence.storageClass="dgraph-storage" \
104+
--set alpha.persistence.size="500Gi" \
105+
--set zero.persistence.storageClass="dgraph-storage" \
106+
--set zero.persistence.size="100Gi" \
107+
--set alpha.replicaCount=3 \
108+
--set zero.replicaCount=3 \
109+
--set alpha.resources.requests.memory="8Gi" \
110+
--set alpha.resources.requests.cpu="2000m"
111+
```
112+
</Step>
113+
</Steps>
114+
115+
### 3. Load Balancer Configuration
116+
117+
```yaml aws-ingress.yaml
118+
apiVersion: networking.k8s.io/v1
119+
kind: Ingress
120+
metadata:
121+
name: dgraph-ingress
122+
namespace: dgraph
123+
annotations:
124+
kubernetes.io/ingress.class: alb
125+
alb.ingress.kubernetes.io/scheme: internet-facing
126+
alb.ingress.kubernetes.io/target-type: ip
127+
alb.ingress.kubernetes.io/certificate-arn: arn:aws:acm:REGION:ACCOUNT:certificate/CERT-ID
128+
spec:
129+
rules:
130+
- host: dgraph.yourdomain.com
131+
http:
132+
paths:
133+
- path: /
134+
pathType: Prefix
135+
backend:
136+
service:
137+
name: dgraph-dgraph-alpha
138+
port:
139+
number: 8080
140+
```

dgraph/self-managed/azure.mdx

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: "Azure Deployment"
3+
description:
4+
"Deploy your self-hosted Dgraph cluster on Microsoft Azure using Azure
5+
Kubernetes Service (AKS)"
6+
unlisted: true
7+
unindexed: true
8+
---
9+
10+
## Azure Deployment
11+
12+
Deploy your self-hosted Dgraph cluster on Microsoft Azure using Azure Kubernetes
13+
Service (AKS).
14+
15+
```mermaid
16+
graph TB
17+
subgraph "Azure Architecture"
18+
A[Application Gateway] --> B[AKS Cluster]
19+
B --> C[Dgraph Alpha Pods]
20+
B --> D[Dgraph Zero Pods]
21+
C --> E[Azure Disks]
22+
D --> F[Azure Disks]
23+
24+
subgraph "AKS Cluster"
25+
C
26+
D
27+
G[Azure Monitor]
28+
H[Ingress Controller]
29+
end
30+
31+
I[Azure Storage] --> C
32+
J[Azure Monitor] --> G
33+
end
34+
```
35+
36+
### 1. AKS Cluster Creation
37+
38+
<CodeGroup>
39+
```bash Create Resource Group
40+
az group create --name dgraph-rg --location eastus
41+
```
42+
43+
```bash Create AKS Cluster
44+
az aks create \
45+
--resource-group dgraph-rg \
46+
--name dgraph-cluster \
47+
--node-count 3 \
48+
--node-vm-size Standard_D4s_v3 \
49+
--node-osdisk-size 100 \
50+
--enable-addons monitoring \
51+
--generate-ssh-keys
52+
```
53+
54+
```bash Get Credentials
55+
az aks get-credentials --resource-group dgraph-rg --name dgraph-cluster
56+
```
57+
58+
```bash Create Storage Class
59+
kubectl apply -f - <<EOF
60+
apiVersion: storage.k8s.io/v1
61+
kind: StorageClass
62+
metadata:
63+
name: dgraph-storage
64+
provisioner: kubernetes.io/azure-disk
65+
parameters:
66+
storageaccounttype: Premium_LRS
67+
kind: Managed
68+
volumeBindingMode: WaitForFirstConsumer
69+
allowVolumeExpansion: true
70+
EOF
71+
```
72+
73+
</CodeGroup>
74+
75+
### 2. Deploy Dgraph on AKS
76+
77+
```bash
78+
# Create namespace
79+
kubectl create namespace dgraph
80+
81+
# Deploy with Helm
82+
helm install dgraph dgraph/dgraph \
83+
--namespace dgraph \
84+
--set alpha.persistence.storageClass="dgraph-storage" \
85+
--set zero.persistence.storageClass="dgraph-storage" \
86+
--set alpha.persistence.size="500Gi" \
87+
--set zero.persistence.size="100Gi"
88+
```
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
title: "Digital Ocean Deployment"
3+
description:
4+
"Deploy your self-hosted Dgraph cluster on Digital Ocean using Digital Ocean
5+
Kubernetes Service (DOKS)"
6+
unlisted: true
7+
unindexed: true
8+
---
9+
10+
## Digital Ocean Deployment
11+
12+
### Kubernetes Deployment (DOKS)
13+
14+
```mermaid
15+
graph TB
16+
subgraph "Digital Ocean Kubernetes Architecture"
17+
A[Load Balancer] --> B[DOKS Cluster]
18+
B --> C[Dgraph Alpha Pods]
19+
B --> D[Dgraph Zero Pods]
20+
C --> E[Block Storage]
21+
D --> F[Block Storage]
22+
23+
subgraph "DOKS Cluster"
24+
C
25+
D
26+
G[DO Monitoring]
27+
end
28+
29+
I[Spaces Storage] --> C
30+
end
31+
```
32+
33+
#### 1. DOKS Cluster Setup
34+
35+
<CodeGroup>
36+
```bash Create Cluster
37+
doctl kubernetes cluster create dgraph-cluster \
38+
--region nyc1 \
39+
--version 1.28.2-do.0 \
40+
--node-pool="name=worker-pool;size=s-4vcpu-8gb;count=3;auto-scale=true;min-nodes=3;max-nodes=9"
41+
```
42+
43+
```bash Get Kubeconfig
44+
doctl kubernetes cluster kubeconfig save dgraph-cluster
45+
```
46+
47+
```bash Apply Storage Class
48+
kubectl apply -f - <<EOF
49+
apiVersion: storage.k8s.io/v1
50+
kind: StorageClass
51+
metadata:
52+
name: dgraph-storage
53+
provisioner: dobs.csi.digitalocean.com
54+
allowVolumeExpansion: true
55+
volumeBindingMode: WaitForFirstConsumer
56+
EOF
57+
```
58+
59+
</CodeGroup>
60+
61+
#### 2. Deploy Dgraph on DOKS
62+
63+
```bash
64+
# Create namespace
65+
kubectl create namespace dgraph
66+
67+
# Deploy with Helm
68+
helm install dgraph dgraph/dgraph \
69+
--namespace dgraph \
70+
--set alpha.persistence.storageClass="dgraph-storage" \
71+
--set zero.persistence.storageClass="dgraph-storage" \
72+
--set alpha.persistence.size="500Gi" \
73+
--set zero.persistence.size="100Gi"
74+
```

0 commit comments

Comments
 (0)