Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
.DS_Store
*.lock
static/images/.DS_Store
tmp/.htmltest/htmltest.log
tmp/.htmltest/refcache.json
18 changes: 18 additions & 0 deletions .htmltest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
DirectoryPath: "public"
CheckDoctype: true
CheckExternal: true
CheckInternalHash: true
IgnoreDirectoryMissingTrailingSlash: true
IgnoreAltMissing: true
IgnoreEmptyHref: true
IgnoreInternalEmptyHash: true
IgnoreURLs:
- "https://fonts.googleapis.com"
- "https://cdnjs.cloudflare.com"
- "https://www.npmjs.com/package/@grpc/grpc-js"
- "https://www.npmjs.com/package/apollo-client"
- "http://localhost:*"
- "/livereload.js"
- ".*livereload.*"
- "^#$"
ExternalTimeout: 15
10 changes: 1 addition & 9 deletions content/deploy/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,8 @@ aliases = ["/deploy/overview"]
identifier = "deploy"
+++

You can deploy and manage Dgraph database in a variety of self-managed deployment scenarios, including:
You can deploy and manage Dgraph database in a variety of self-managed deployment scenarios.

* Running Dgraph on your on-premises infrastructure (bare-metal physical servers)
* Running Dgraph on your cloud infrastructure (AWS, GCP and Azure)

This section focuses exclusively on deployment and management for these self-managed
scenarios. To learn about fully-managed options that let you focus on
building apps and websites, rather than managing infrastructure, see the
[Dgraph cloud services docs](https://dgraph.io/docs/cloud/), or
[Try Dgraph Cloud](https://cloud.dgraph.io/).

A Dgraph cluster consists of the following:

Expand Down
10 changes: 5 additions & 5 deletions content/deploy/admin/dgraph-administration.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,11 @@ When the new cluster (that uses the upgraded version of Dgraph) is up and runnin
### Upgrade from v1.2.2 to v20.03.0 for Enterprise customers

<!-- TODO: Redirect(s) -->
1. Use [binary backup]({{< relref "enterprise-features/binary-backups.md">}}) to export data from old cluster
1. Use [binary backup]({{< relref "binary-backups.md">}}) to export data from old cluster
2. Ensure it is successful
3. [Shutdown Dgraph]({{< relref "#shut-down-database" >}}) and wait for all writes to complete
4. Upgrade `dgraph` binary to `v20.03.0`
5. [Restore]({{< relref "enterprise-features/binary-backups.md#restore-from-backup">}}) from the backups using upgraded `dgraph` binary
5. Restore from the backups using upgraded `dgraph` binary
6. Start a new Dgraph cluster using the restored data directories
7. Upgrade ACL data using the following command:

Expand All @@ -219,7 +219,7 @@ dgraph upgrade --acl -a localhost:9080 -u groot -p password
2. Ensure it is successful
3. [Shutdown Dgraph]({{< relref "#shut-down-database" >}}) and wait for all writes to complete
4. Upgrade `dgraph` binary to `v20.07.0`
5. [Restore]({{< relref "enterprise-features/binary-backups.md#restore-from-backup">}}) from the backups using upgraded `dgraph` binary
5. Restore from the backups using upgraded `dgraph` binary
6. Start a new Dgraph cluster using the restored data directories
7. Upgrade ACL data using the following command:
```sh
Expand All @@ -244,7 +244,7 @@ are affected. Then, you can drop the old types and predicates from DB.
2. Ensure it is successful
3. [Shutdown Dgraph]({{< relref "#shut-down-database" >}}) and wait for all writes to complete
4. Upgrade `dgraph` binary to `v21.03.0`
5. [Restore]({{< relref "enterprise-features/binary-backups.md#restore-from-backup">}}) from the backups using the upgraded `dgraph` binary
5. Restore from the backups using the upgraded `dgraph` binary
6. Start a new Dgraph cluster using the restored data directories
7. Upgrade the CORS and persisted queries. To upgrade an ACL cluster use:
```sh
Expand All @@ -268,4 +268,4 @@ as backup and restore are cluster-wide operations and a single namespace cannot

## Post Installation

Now that Dgraph is up and running, to understand how to add and query data to Dgraph, follow [Query Language Spec](/query-language). Also, have a look at [Frequently asked questions](/faq).
Now that Dgraph is up and running, to understand how to add and query data to Dgraph, follow [Query Language Spec](/query-language).
2 changes: 1 addition & 1 deletion content/deploy/admin/dgraph-alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ query {
- **`group`**: Group assigned based on the replication factor.
- **`lastEcho`**: Last time, in Unix epoch, when the instance was contacted by another Alpha or Zero server.
- **`ongoing`**: List of ongoing operations in the background.
- **`indexing`**: List of predicates for which indexes are built in the background. Read more [here]({{< relref "/dql/dql-schema.md#indexes-in-background" >}}).
- **`indexing`**: List of predicates for which indexes are built in the background.

{{% notice "note" %}}
The same information (except `ongoing` and `indexing`) is available from the `/health` and `/health?all` HTTP endpoints.
Expand Down
8 changes: 4 additions & 4 deletions content/deploy/admin/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ You can run multiple Jaeger collector components for the same single Jaeger back

Once you have this configured, you can filter by tags in the Jaeger UI. Filter traces by tags matching `env=dev`:

{{% load-img "/images/jaeger-ui.png" "Jaeger UI" %}}
{{% load-img "images/jaeger-ui.png" "Jaeger UI" %}}

Every trace has your custom tags set under the “Process” section of each span:

{{% load-img "/images/jaeger-server-query.png" "Jaeger Query" %}}
{{% load-img "images/jaeger-server-query.png" "Jaeger Query" %}}

Filter traces by tags matching `env=qa`:

{{% load-img "/images/jaeger-json.png" "Jaeger JSON" %}}
{{% load-img "images/jaeger-json.png" "Jaeger JSON" %}}

{{% load-img "/images/jaeger-server-query-2.png" "Jaeger Query Result" %}}
{{% load-img "images/jaeger-server-query-2.png" "Jaeger Query Result" %}}

To learn more about Jaeger, see [Jaeger's Deployment Guide](https://www.jaegertracing.io/docs/deployment/).
2 changes: 1 addition & 1 deletion content/deploy/installation/single-host-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ The command should return basic cluster information:
```

### Connect Ratel
Ratel is a web-based UI dashboard for interacting with Dgraph using Dgraph's query language,[DQL](./glossary#DQL).
Ratel is a web-based UI dashboard for interacting with Dgraph using Dgraph's query language, [DQL]({{<relref "/dgraph-glossary#DQ">}}).

Optionnaly, launch Ratel using the dgraph/ratel docker image :

Expand Down
2 changes: 1 addition & 1 deletion content/dgraph-glossary.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ A relationship is a named, directed link relating one [node](#node) to another.
Sharding is a database architecture pattern to achieve horizontal scale by distributing data among many servers. Dgraph shards data per relationship, so all data for one relationship form a single shard, and are stored on one (group of) servers, an approach referred to as 'predicate-based sharding'.

### Triple ###
Because RDF statements consist of three elements: <subject> <predicate> <object>, they are called triples. A triple represents a single atomic statement about a node. The object in an RDF triple can be a literal value or can point to another node. See [DQL RDF Syntax]("/dql/dql-syntax/dql-rdf") for more details.
Because RDF statements consist of three elements: <subject> <predicate> <object>, they are called triples. A triple represents a single atomic statement about a node. The object in an RDF triple can be a literal value or can point to another node. See [DQL RDF Syntax](/dql/dql-syntax/dql-rdf) for more details.
- when we store that a node name is "Alice". The predicate is ``name`` and predicate value is the string "Alice". The string becomes a node property.
- when we store that Alice knows Bob, we may use a predicate ``knows`` with the node representing Alice. The value of this predicate would be the [uid](#uid) of the node representing Bob. In that case, ``knows`` is a [relationship](#relationship).

Expand Down
4 changes: 2 additions & 2 deletions content/dgraph-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Dgraph is built from the ground up as a distributed system. Data is automaticall

Each Dgraph cluster consists of multiple server groups (shards) that work together to store and query your data. Queries are automatically distributed across the relevant shards and results are aggregated, making the distributed nature transparent to your application. This architecture provides both horizontal scalability and high availability.

For detailed information about Dgraph's distributed architecture, clustering, and replication, see the [Architecture documentation]("/deploy/archiveture").
For detailed information about Dgraph's distributed architecture, clustering, and replication, see the [Architecture documentation](/deploy/dgraph-architecture).

## Enterprise-Grade Features

Expand Down Expand Up @@ -120,7 +120,7 @@ The graph model naturally represents connected data, making it straightforward t
## What's Next

- Get familiar with some terms in our [Glossary](/dgraph-glossary)
- Go through some [tutorials]("/learn")
- Go through some [tutorials]({{<relref "learn">}})



Expand Down
6 changes: 0 additions & 6 deletions content/dql/clients/csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,7 @@ client.Login(lr)
In the example above, the client logs into namespace `123` using username `userId` and password `password`.
Once logged in, the client can perform all the operations allowed to the `userId` user of namespace `123`.

### Creating a Client for Dgraph Cloud Endpoint

If you want to connect to Dgraph running on your [Dgraph Cloud](https://cloud.dgraph.io) instance, then all you need is the URL of your Dgraph Cloud endpoint and the API key. You can get a client using them as follows:

```c#
var client = new DgraphClient(SlashChannel.Create("https://frozen-mango.eu-central-1.aws.cloud.dgraph.io/graphql", "api-key-here"));
```

### Altering the Database

Expand Down
16 changes: 0 additions & 16 deletions content/dql/clients/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,7 @@ if err := dc.LoginIntoNamespace(ctx, "groot", "password", 123); err != nil {
In the example above, the client logs into namespace `123` using username `groot` and password `password`.
Once logged in, the client can perform all the operations allowed to the `groot` user of namespace `123`.

### Creating a Client for Dgraph Cloud Endpoint

If you want to connect to Dgraph running on your [Dgraph Cloud](https://cloud.dgraph.io) instance, then all you need is the URL of your Dgraph Cloud endpoint and the API key. You can get a client using them as follows:

```go
// This example uses dgo
conn, err := dgo.DialCloud("https://frozen-mango.eu-central-1.aws.cloud.dgraph.io/graphql", "<api-key>")
if err != nil {
log.Fatal(err)
}
defer conn.Close()
dgraphClient := dgo.NewDgraphClient(api.NewDgraphClient(conn))
```

{{% notice "note" %}}
The `dgo.DialSlashEndpoint()` method has been deprecated and will be removed in v21.07. Please use `dgo.DialCloud()` instead.
{{% /notice %}}

## Alter the database

Expand Down
14 changes: 1 addition & 13 deletions content/dql/clients/java.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,6 @@ dgraphClient.loginIntoNamespace(USER_ID, USER_PASSWORD, NAMESPACE);

Once logged-in, the `dgraphClient` object can be used to do any further operations.

### Creating a Client for Dgraph Cloud Endpoint

If you want to connect to Dgraph running on your [Dgraph Cloud](https://cloud.dgraph.io) instance, then all you need is the URL of your Dgraph Cloud endpoint and the API key. You can get a client using them as follows :

```java
DgraphStub stub = DgraphClient.clientStubFromCloudEndpoint("https://civic-wine.us-west-2.aws.cloud.dgraph.io/graphql", "your-api-key");
DgraphClient dgraphClient = new DgraphClient(stub);
```

{{% notice "note" %}}
The `DgraphClient.clientStubFromSlashEndpoint()` method has been deprecated and will be removed in v21.07. Please use `DgraphClient.clientStubFromCloudEndpoint()` instead.
{{% /notice %}}

### Creating a Secure Client using TLS

Expand Down Expand Up @@ -155,7 +143,7 @@ dgraphClient.alter(operation);
Starting Dgraph version 20.03.0, indexes can be computed in the background.
You can call the function `setRunInBackground(true)` as shown below before
calling `alter`. You can find more details
[here]({{< relref "dql-schema.md#indexes-in-background" >}}).
[here]({{< relref "update-dgraph-types.md#indexes-in-background" >}}).

```java
String schema = "name: string @index(exact) .";
Expand Down
19 changes: 1 addition & 18 deletions content/dql/clients/javascript/grpc.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,23 +80,6 @@ await dgraphClientStub.loginIntoNamespace("groot", "password", 123); // where 12
In the example above, the client logs into namespace `123` using username `groot` and password `password`.
Once logged in, the client can perform all the operations allowed to the `groot` user of namespace `123`.

### Creating a Client for Dgraph Cloud Endpoint

If you want to connect to Dgraph running on your [Dgraph Cloud](https://cloud.dgraph.io) instance, then all you need is the URL of your Dgraph Cloud endpoint and the API key. You can get a client using them as follows:

```js
const dgraph = require("dgraph-js");

const clientStub = dgraph.clientStubFromSlashGraphQLEndpoint(
"https://frozen-mango.eu-central-1.aws.cloud.dgraph.io/graphql",
"<api-key>"
);
const dgraphClient = new dgraph.DgraphClient(clientStub);
```

{{% notice "note" %}}
The `dgraph.clientStubFromSlashGraphQLEndpoint()` method has been deprecated and will be removed in v21.07.
{{% /notice %}}

### Altering the Database

Expand All @@ -113,7 +96,7 @@ await dgraphClient.alter(op);
Starting Dgraph version 20.03.0, indexes can be computed in the background.
You can set `setRunInBackground` field of the `Operation` object to `true`
before passing it to the `DgraphClient#alter(Operation)` method. You can find more details
[here]({{< relref "dql-schema.md#indexes-in-background" >}}).
[here]({{< relref "update-dgraph-types.md#indexes-in-background" >}}).

```js
const schema = "name: string @index(exact) .";
Expand Down
28 changes: 2 additions & 26 deletions content/dql/clients/javascript/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,6 @@ const dgraphClient = new dgraph.DgraphClient(clientStub);

To facilitate debugging, [debug mode](#debug-mode) can be enabled for a client.

### Create a Client for Dgraph Cloud Endpoint

If you want to connect to Dgraph running on your [Dgraph Cloud](https://cloud.dgraph.io) instance, then all you need is the URL of your Dgraph Cloud endpoint and the API key. You can get a client using them as follows:

```js
const dgraph = require("dgraph-js-http");

//here we pass the cloud endpoint
const clientStub = new dgraph.DgraphClientStub(
"https://super-pail.us-west-2.aws.cloud.dgraph.io",
);

const dgraphClient = new dgraph.DgraphClient(clientStub);

//here we pass the API key
dgraphClient.setSlashApiKey("<api-key>");
```

{{% notice "note" %}}
You need to remove the `/graphql` path when copying the endpoint URL from the Dgraph Cloud dashboard.
{{% /notice %}}

### Login into Dgraph

Expand Down Expand Up @@ -105,18 +84,15 @@ await clientStub.login();

Some Dgraph configurations require extra access tokens.

1. Alpha servers can be configured with [Secure Alter Operations]({{< relref "dgraph-administration.md" >}}).

Alpha servers can be configured with [Secure Alter Operations]({{< relref "dgraph-administration.md" >}}).
In this case the token needs to be set on the client instance:

```js
dgraphClient.setAlphaAuthToken("My secret token value");
```

2. [Dgraph Cloud](https://cloud.dgraph.io/) requires API key for HTTP access:

```js
dgraphClient.setSlashApiKey("Copy the Api Key from Dgraph Cloud admin page");
```

### Create https connection

Expand Down
15 changes: 1 addition & 14 deletions content/dql/clients/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,7 @@ client.login_into_namespace("groot", "password", "123")
In the example above, the client logs into namespace `123` using username `groot` and password `password`.
Once logged in, the client can perform all the operations allowed to the `groot` user of namespace `123`.

### Creating a Client for Dgraph Cloud Endpoint

If you want to connect to Dgraph running on your [Dgraph Cloud](https://cloud.dgraph.io) instance, then all you need is the URL of your Dgraph Cloud endpoint and the API key. You can get a client using them as follows:

```python
import pydgraph

client_stub = pydgraph.DgraphClientStub.from_cloud("https://frozen-mango.eu-central-1.aws.cloud.dgraph.io/graphql", "<api-key>")
client = pydgraph.DgraphClient(client_stub)
```

{{% notice "note" %}}
The `DgraphClientStub.from_slash_endpoint()` method has been deprecated and will be removed in v21.07. Please use `DgraphClientStub.from_cloud()` instead.
{{% /notice %}}

### Altering the Database

Expand All @@ -88,7 +75,7 @@ client.alter(op)
Starting with Dgraph version 20.03.0, indexes can be computed in the background.
You can set the `run_in_background` field of `pydgraph.Operation` to `True`
before passing it to the `Alter` function. You can find more details
[here]({{< relref "dql-schema.md#indexes-in-background" >}}).
[here]({{< relref "update-dgraph-types.md#indexes-in-background" >}}).

```python
schema = 'name: string @index(exact) .'
Expand Down
6 changes: 3 additions & 3 deletions content/dql/dql-get-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ aliases = ["/get-started"]
parent = ""
+++

This is a quick start guide to run [DQL]({{< relref "dgraph-glossary.md#RDF" >}}) queries and mutations.
This is a quick start guide to run [DQL]({{< relref "dgraph-glossary.md#rdf" >}}) queries and mutations.


This guide helps you:
Expand Down Expand Up @@ -64,14 +64,14 @@ Ratel UI makes it easier to run queries and mutations.
}
```

The input data is in JSON Format. Dgraph also supports [RDF]({{<relref "dgraph-glossary.md#RDF">}}) notation.
The input data is in JSON Format. Dgraph also supports [RDF]({{<relref "dgraph-glossary.md#rdf">}}) notation.

The sample JSON data is an array of two movies with some attributes. These are stored as [Nodes]({{<relref "dgraph-glossary.md#node">}}) in Dgraph.

There will be stored as [Nodes]({{<relref "dgraph-glossary.md#node">}}) in Dgraph.

The "Star Wars" movie has a `director` field which is an JSON object and a `starring` field which is an array of JSON objects.
Each object is also stored as a Node in Dgraph . The `director` and `starring` are stored as [relations]({{<relref "dgraph-glossary.md#relation">}}).
Each object is also stored as a Node in Dgraph . The `director` and `starring` are stored as [relationship]({{<relref "dgraph-glossary.md#relationship">}}).


3. Click **Run** to execute the mutation.
Expand Down
Loading