From 2c810e9ac273f81f35de160ef781dadc20b1e7c1 Mon Sep 17 00:00:00 2001 From: Sudhish <108091997+skrdgraph@users.noreply.github.com> Date: Thu, 20 Oct 2022 14:00:01 -0700 Subject: [PATCH 1/8] fix(docs): update version (#331) updating version to release v22 --- scripts/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build.sh b/scripts/build.sh index 328bcac2..c183034c 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -40,6 +40,7 @@ MAJOR_VERSIONS=( ) VERSIONS_ARRAY=( + 'v22.0' ${MAJOR_VERSIONS:0} ${MAJOR_VERSIONS[@]:1} 'main' From 4ba1c9546a10b8550302e98a28bb654cfbc31bc3 Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Thu, 27 Oct 2022 08:57:15 +0530 Subject: [PATCH 2/8] [Docs] Access Control Lists : add the command and random keys (#333) Fixes: https://github.com/dgraph-io/dgraph-docs/issues/305 page: https://dgraph.io/docs/enterprise-features/access-control-lists/ --- .../enterprise-features/access-control-lists.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/content/enterprise-features/access-control-lists.md b/content/enterprise-features/access-control-lists.md index 84294485..b8a1f463 100644 --- a/content/enterprise-features/access-control-lists.md +++ b/content/enterprise-features/access-control-lists.md @@ -20,9 +20,13 @@ is only allowed to access the data permitted by the ACL rules. The ACL feature can be turned on by following these steps: -1. Create a plain text file, and store a randomly generated secret key in it. The secret +1. Create a plain text file named `hmac_secret_file`, and store a randomly generated secret key in it. The secret key is used by Dgraph Alpha nodes to sign JSON Web Tokens (JWT). Keep this secret key secret to avoid data security issues. The secret key must have at least 256-bits (32 ASCII characters) to support the HMAC-SHA256 signing algorithm. + ```bash + echo '9z$C&F)J@NcRfUjXn2r5u8x!A%D*G-Ka' > hmac_secret_file + ``` + 2. Start all the Dgraph Alpha nodes in your cluster with the option `--acl secret-file="/path/to/secret"`, and make sure that they are all using the same secret key file created in Step 1. Alternatively, you can [store the secret in Hashicorp Vault](#storing-acl-secret-in-hashicorp-vault). @@ -41,7 +45,7 @@ Here is an example that starts a Dgraph Zero node and a Dgraph Alpha node with t ```bash ## Create ACL secret key file with 32 ASCII characters -echo '12345678901234567890123456789012' > hmac_secret_file +echo '9z$C&F)J@NcRfUjXn2r5u8x!A%D*G-Ka' > hmac_secret_file ## Start Dgraph Zero in different terminal tab or window dgraph zero --my=localhost:5080 --replicas 1 --raft idx=1 @@ -80,7 +84,7 @@ You can run this with: ```bash ## Create ACL secret key file with 32 ASCII characters -echo '12345678901234567890123456789012' > hmac_secret_file +echo '9z$C&F)J@NcRfUjXn2r5u8x!A%D*G-Ka' > hmac_secret_file ## Start Docker Compose docker-compose up @@ -94,7 +98,7 @@ The first step is to encode the secret with base64: ```bash ## encode a secret without newline character and copy to the clipboard -printf '12345678901234567890123456789012' | base64 +printf '9z$C&F)J@NcRfUjXn2r5u8x!A%D*G-Ka' | base64 ``` The next step is that we need to create a [Helm](https://helm.sh/) chart config values file, e.g. `dgraph_values.yaml`. We want to copy the results of encoded secret as paste this into the `hmac_secret_file` like the example below: @@ -105,7 +109,7 @@ alpha: acl: enabled: true file: - hmac_secret_file: MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI= + hmac_secret_file: 9z$C&F)J@NcRfUjXn2r5u8x!A%D*G-Ka configFile: config.yaml: | acl: @@ -138,7 +142,7 @@ Do the following to set up on the [Hashicorp Vault](https://www.vaultproject.io/ "cas": 0 }, "data": { - "hmac_secret_file": "12345678901234567890123456789012" + "hmac_secret_file": "9z$C&F)J@NcRfUjXn2r5u8x!A%D*G-Ka" } } ``` From 4096ae40124c758cabfc29790c8cb3b08af56ee5 Mon Sep 17 00:00:00 2001 From: Rajakavitha Kodhandapani Date: Thu, 27 Oct 2022 08:58:32 +0530 Subject: [PATCH 3/8] [Docs] Encryption at Rest: added a note for macOS (#334) - added a note about the command for macOS and the command to view the key. - updated the key in the example Fixes: https://github.com/dgraph-io/dgraph-docs/issues/304 --- content/enterprise-features/encryption-at-rest.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/enterprise-features/encryption-at-rest.md b/content/enterprise-features/encryption-at-rest.md index 96436061..184f2fa0 100644 --- a/content/enterprise-features/encryption-at-rest.md +++ b/content/enterprise-features/encryption-at-rest.md @@ -37,7 +37,9 @@ desired key size): ```bash tr -dc 'a-zA-Z0-9' < /dev/urandom | dd bs=1 count=32 of=enc_key_file ``` - +{{% notice "note" %}} +On a macOS you may have to use `LC_CTYPE=C; tr -dc 'a-zA-Z0-9' < /dev/urandom | dd bs=1 count=32 of=enc_key_file`. To view the key use `cat enc_key_file`. +{{% /notice %}} Alternatively, you can use the `--vault` [superflag's]({{< relref "deploy/cli-command-reference.md" >}}) options to enable encryption, as [explained below](#example-using-dgraph-cli-with-hashicorp-vault-configuration). ## Turn on Encryption @@ -71,7 +73,7 @@ To use [Hashicorp Vault](https://www.vaultproject.io/), meet the following prere "cas": 0 }, "data": { - "enc_key": "1234567890123456" + "enc_key": "qIvHQBVUpzsOp74PmMJjHAOfwIA1e6zm%" } } ``` From d01e2ed62541bb4b0ab949b7a528fb2b9b137386 Mon Sep 17 00:00:00 2001 From: Michel Diz Date: Mon, 31 Oct 2022 15:53:29 -0300 Subject: [PATCH 4/8] docs(release): Dgraph v22.0.0 release (#335) - Update the Releases page with the latest release, Dgraph v22.0.0 - Update the previous versions' patch release information. - Remove support for v21.12.x, v21.03.x, v20.07 and v20.11. - Set v21.12.x as discontinued --- content/releases/index.md | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/content/releases/index.md b/content/releases/index.md index f8fbe524..23b7e8d3 100644 --- a/content/releases/index.md +++ b/content/releases/index.md @@ -6,13 +6,10 @@ title = "Dgraph Releases" weight = 14 +++ -The latest Dgraph release is the v21.03 series. +The latest Dgraph release is the v22.00 series. -Dgraph releases starting with v20.03 follow -[calendar versioning](https://calver.org). To learn more about our switch from -semantic to calendar versioning, and why v2-v19 don't exist as a result of this -switch, see our Blog post on the -[switch to calendar versioning](https://dgraph.io/blog/post/dgraph-calendar-versioning/). +Dgraph releases starting v22.0.0 is following semver +[See the post here](https://discuss.dgraph.io/t/dgraph-v22-0-0-rc1-20221003-release-candidate/). To learn about the latest releases and other important announcements, watch the [Announce][] category on Discuss. @@ -23,19 +20,21 @@ To learn about the latest releases and other important announcements, watch the Dgraph Release Series | Current Release | Supported? | First Release Date | End of life -----------------------|-----------------|------------|--------------------|-------------- - v21.03.x | [v21.03.0][] | Yes | March 2021 | March 2022 - v20.11.x | [v20.11.0][] | Yes | December 2020 | December 2021 - v20.07.x | [v20.07.3][] | Yes | July 2020 | July 2021 + v22.0.x | [v22.0.0][] | Yes | October 2022 | N/A + v21.12.x(discontinued)| [v21.12.0][] | No | December 2021 | December 2022 + v21.03.x | [v21.03.0][] | Yes | March 2021 | June 2023 + v20.11.x | [v20.11.0][] | No | December 2020 | December 2021 + v20.07.x | [v20.07.3][] | No | July 2020 | July 2021 v20.03.x | [v20.03.7][] | No | March 2020 | March 2021 v1.2.x | [v1.2.8][] | No | January 2020 | January 2021 v1.1.x | [v1.1.1][] | No | January 2020 | January 2021 v1.0.x | [v1.0.18][] | No | December 2017 | March 2020 - +[v22.0.0]: https://discuss.dgraph.io/t/dgraph-v22-0-0-is-now-ga/17889 [v21.03.0]: https://discuss.dgraph.io/t/release-notes-v21-03-0-resilient-rocket/13587 [v20.11.0]: https://discuss.dgraph.io/t/release-notes-v20-11-0-tenacious-tchalla/11942 [v20.07.3]: https://discuss.dgraph.io/t/dgraph-v20-07-3-release/12107 [v20.03.7]: https://discuss.dgraph.io/t/dgraph-v20-03-7-release/12077 [v1.2.8]: https://discuss.dgraph.io/t/dgraph-v1-2-8-release/11183 [v1.1.1]: https://discuss.dgraph.io/t/dgraph-v1-1-1-release/5664 -[v1.0.18]: https://discuss.dgraph.io/t/dgraph-v1-0-18-release/5663 +[v1.0.18]: https://discuss.dgraph.io/t/dgraph-v1-0-18-release/5663 \ No newline at end of file From b05f66c55f4e5d8d463eeb1fdd30b02d5177d80e Mon Sep 17 00:00:00 2001 From: Raphael Date: Tue, 13 Dec 2022 22:33:32 -0800 Subject: [PATCH 5/8] Cherry pick/v22.0/glossary (#364) --- content/dgraph-glossary.md | 77 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 content/dgraph-glossary.md diff --git a/content/dgraph-glossary.md b/content/dgraph-glossary.md new file mode 100644 index 00000000..0b9799c3 --- /dev/null +++ b/content/dgraph-glossary.md @@ -0,0 +1,77 @@ ++++ +title = "Dgraph Glossary" +description = "Introduction to Dgraph Database. Dgraph is a horizontally scalable and distributed GraphQL database that you can run on-premises, in your cloud infrastructure, or fully-managed (hosted). Learn Dgraph and GraphQL terms from our glossary." +[menu.main] + name = "Dgraph Glossary" + identifier = "glossary" + weight = 15 ++++ + + +**Alpha** +Dgraph consists of different servers, zero and alpha. Alpha servers host predicates and indexes. A Dgraph instance, aka a Dgraph cluster, has at least 1 Alpha server and scale horizontally by adding more Alpha servers. + +**Badger** +A fast, open-source key-value database written in pure Go that provides the disk layer for Dgraph. +More at [Badger documentation](https://dgraph.io/docs/badger) + + +**Dgraph** +your preferred graph database ! Dgraph is a horizontally scalable and distributed database. + +**Dgraph Cloud** +The fully-managed version of Dgraph available as a service. +More at [Dgraph Cloud documentation](https://dgraph.io/docs/cloud) + +**DQL** Dgraph Query Language is Dgraph's proprietary language to insert, update, delete and query data. + +**Endpoints** + + +**Entity** + +**Edge** +In the mental picture of a graph: bubbles connected by lines ; the bubbles are nodes, the lines are edges. +In Dgraph terminology edges are `entity predicates`. + +**GraphQL** is a declarative language for querying data used by application developers to get the data they need using GraphQL APIs. Dgraph supports the deployment of GraphQL data model (GraphQL schema) and automatically exposes a GraphQL API endpoint accepting GraphQL queries. + + +**Group** + +**gRPC** + +**Lambda** Dgraph takes care of all the logic to execute GraphQL queries when a GraphQL data model is deployed. Lambda provides a way to extend this capability and to write your custom logic integrated with Dgraph execution model. + +**Mutation** A mutation is a request to modify server-side data. It is covering insert, update, or delete operations. + +**Node** +In the mental picture of a graph: bubbles connected by lines ; the bubbles are nodes, the lines are edges. +Dgraph terminology favors the term [Entity](#entity), but the two terms are used interchangeably in our documentation. + +Node is also used in software architecture to reference a physical computer or a virtual machine running a module of Dgraph in a cluster. E.g : 'our archictecture has 3 Alpha nodes'. + +**Predicate** From [Cambridge Dictionary](https://dictionary.cambridge.org/us/dictionary/english/predicate) a predicate is *the part of a sentence that gives information about the subject*. In Dgraph, a predicate is the smallest piece of information about an [entity](#entity). A predicate can hold a literal value or can describe a relation to another entity : +- when we store that an entity name is "Alice". The predicate is ``name`` and predicate value is the string "Alice". We say that ``name`` is a **value predicate**. +- when we store that Alice knows Bob, we may use a predicate ``knows`` for the entity representing Alice. The value of this predicate would be the [uid](#uid) of the entity representing Bob. We say that ``knows`` is an **entity predicate** or a [relation](#relation). + + +**RATEL** Ratel is a tool for data visualization and cluster management that’s designed to work with Dgraph and DQL. More at [Ratel User's guide](https://dgraph.io/docs/ratel/overview/). + +**RDF** RDF 1.1 is a Semantic Web Standards for data interchange. It allows us to make statements about resources. The format of these statements is simple and in the form of `> `. +Dgraph uses RDF format to create, import and export data. Note that Dgraph also supports JSON format. + + +**Relation** A relation is a predicate which object is an entity. It's simply an information that an entity is related to another entity. See [predicate](#predicate). + +**Sharding** + +**Triple** Because RDF statements consist of three elements they are called triples. + +**UID** UID is the Universal Identifier of an entity. `uid` is a reserved predicate holding the UID value. UIDs are generated by Dgraph. + + +**Upsert** + +**Zero** +Dgraph consists of different servers, zero and alpha. Zero servers control the Dgraph database cluster : assign Alpha servers to groups, re-balance data between groups, handle transaction timestamp and UID assignment. From 004bba5f90e945158e9ddafd32abb8b751252db0 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 12 Jan 2023 16:00:45 -0800 Subject: [PATCH 6/8] Cherry pick/v22.0/glossary update (#387) last cherry pick was not the latest version of glossary. Took the right commit for this one. --- content/dgraph-glossary.md | 91 ++++++++++++++++++++------------------ 1 file changed, 48 insertions(+), 43 deletions(-) diff --git a/content/dgraph-glossary.md b/content/dgraph-glossary.md index 0b9799c3..8616744b 100644 --- a/content/dgraph-glossary.md +++ b/content/dgraph-glossary.md @@ -1,77 +1,82 @@ +++ title = "Dgraph Glossary" -description = "Introduction to Dgraph Database. Dgraph is a horizontally scalable and distributed GraphQL database that you can run on-premises, in your cloud infrastructure, or fully-managed (hosted). Learn Dgraph and GraphQL terms from our glossary." +description = "Dgraph terms" [menu.main] name = "Dgraph Glossary" identifier = "glossary" weight = 15 +++ +
-**Alpha** -Dgraph consists of different servers, zero and alpha. Alpha servers host predicates and indexes. A Dgraph instance, aka a Dgraph cluster, has at least 1 Alpha server and scale horizontally by adding more Alpha servers. +### Alpha ### +Dgraph consists of [Zero](#zero) and Alpha nodes. Alpha nodes host predicates and indexes. Dgraph scales horizontally by adding more Alphas. -**Badger** -A fast, open-source key-value database written in pure Go that provides the disk layer for Dgraph. +### Badger ### +Badger is a fast, open-source key-value database written in pure Go that provides the disk layer for Dgraph. More at [Badger documentation](https://dgraph.io/docs/badger) +### DQL ### +Dgraph Query Language is Dgraph's proprietary language to insert, update, delete and query data. -**Dgraph** -your preferred graph database ! Dgraph is a horizontally scalable and distributed database. - -**Dgraph Cloud** -The fully-managed version of Dgraph available as a service. -More at [Dgraph Cloud documentation](https://dgraph.io/docs/cloud) - -**DQL** Dgraph Query Language is Dgraph's proprietary language to insert, update, delete and query data. - -**Endpoints** - - -**Entity** - -**Edge** +### Edge ### In the mental picture of a graph: bubbles connected by lines ; the bubbles are nodes, the lines are edges. -In Dgraph terminology edges are `entity predicates`. +In Dgraph terminology edges are [relationships](#relationship) i.e an information about the relation between two nodes. -**GraphQL** is a declarative language for querying data used by application developers to get the data they need using GraphQL APIs. Dgraph supports the deployment of GraphQL data model (GraphQL schema) and automatically exposes a GraphQL API endpoint accepting GraphQL queries. +### Facet ### +A facet represent a property of a [relationship](#relationship). +### Graph ### +A graphs is a simple structure that maps relations between objects. In Dgraph terminology, the objects are [nodes](#node) and the connections between them are [relationships](#relationship). -**Group** +### GraphQL ### +GraphQL is a declarative language for querying data used by application developers to get the data they need using GraphQL APIs. Dgraph supports the deployment of GraphQL data model (GraphQL schema) and automatically exposes a GraphQL API endpoint accepting GraphQL queries. -**gRPC** +### gRPC ### +gRPC is a high performance Remote Procedure Call (RPC) framework used by Dgraph to interface with clients. Dgraph has official gRPC clients for go, C#, Java, JavaScript and Python. Applications written in those language can perform mutations and queries inside transactions using Dgraph clients. -**Lambda** Dgraph takes care of all the logic to execute GraphQL queries when a GraphQL data model is deployed. Lambda provides a way to extend this capability and to write your custom logic integrated with Dgraph execution model. +### Lambda ### +Dgraph takes care of all the logic to execute GraphQL queries when a GraphQL data model is deployed. Lambda provides a way to extend this capability and to write your custom logic integrated with Dgraph execution model. -**Mutation** A mutation is a request to modify server-side data. It is covering insert, update, or delete operations. +### Mutation ### +A mutation is a request to modify server-side data. It is covering insert, update, or delete operations. -**Node** -In the mental picture of a graph: bubbles connected by lines ; the bubbles are nodes, the lines are edges. -Dgraph terminology favors the term [Entity](#entity), but the two terms are used interchangeably in our documentation. +### Node ### +An node is "a thing" or an object of the business domain. For every node, Dgraph stores and maintains a universal identifier [UID](#uid), a list of properties and the [relationships](#relationship) this node has with other nodes. -Node is also used in software architecture to reference a physical computer or a virtual machine running a module of Dgraph in a cluster. E.g : 'our archictecture has 3 Alpha nodes'. +Node is also used in software architecture to reference a physical computer or a virtual machine running a module of Dgraph in a cluster. See for example [Aplha node](#alpha). -**Predicate** From [Cambridge Dictionary](https://dictionary.cambridge.org/us/dictionary/english/predicate) a predicate is *the part of a sentence that gives information about the subject*. In Dgraph, a predicate is the smallest piece of information about an [entity](#entity). A predicate can hold a literal value or can describe a relation to another entity : -- when we store that an entity name is "Alice". The predicate is ``name`` and predicate value is the string "Alice". We say that ``name`` is a **value predicate**. -- when we store that Alice knows Bob, we may use a predicate ``knows`` for the entity representing Alice. The value of this predicate would be the [uid](#uid) of the entity representing Bob. We say that ``knows`` is an **entity predicate** or a [relation](#relation). +### Predicate ### +In [RDF](#RDF) terminology, a predicate is the smallest piece of information about an object. A predicate can hold a literal value or can describe a relation to another entity : +- when we store that an entity name is "Alice". The predicate is ``name`` and predicate value is the string "Alice". It 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). -**RATEL** Ratel is a tool for data visualization and cluster management that’s designed to work with Dgraph and DQL. More at [Ratel User's guide](https://dgraph.io/docs/ratel/overview/). +### RATEL ### +Ratel is an open source tool for data visualization and cluster management that’s designed to work with Dgraph and DQL. More at [Ratel User's guide](https://dgraph.io/docs/ratel/overview/). -**RDF** RDF 1.1 is a Semantic Web Standards for data interchange. It allows us to make statements about resources. The format of these statements is simple and in the form of `> `. -Dgraph uses RDF format to create, import and export data. Note that Dgraph also supports JSON format. +### RDF ### +RDF 1.1 is a Semantic Web Standards for data interchange. It allows us to make statements about resources. The format of these statements is simple and in the form of `> `. +Dgraph supports RDF format to create, import and export data. Note that Dgraph also supports JSON format. -**Relation** A relation is a predicate which object is an entity. It's simply an information that an entity is related to another entity. See [predicate](#predicate). +### Relationship ### +A relationship is simply an information that a node is related to another node. A relationship is directed from one node to another and has a name. It may also have properties usually used to store quantitative information about the relation, such as weigh or cost. In Dgraph the properties of a relationship are [facets](#facets). -**Sharding** +### Sharding ### +Sharding is a database architecture pattern to achieve horizontal scaling allowing near-limitless scalability. This allows for data to be split and stored in multiple data nodes or servers and for nodes to be added when required to share the load. Dgraph colocates data per predicate, an approach referred to as 'predicate sharding'. -**Triple** Because RDF statements consist of three elements they are called triples. +### Triple ### +Because RDF statements consist of three elements they are called triples. -**UID** UID is the Universal Identifier of an entity. `uid` is a reserved predicate holding the UID value. UIDs are generated by Dgraph. +### UID ### +UID is the Universal Identifier of a node. `uid` is a reserved property holding the UID value. UIDs are generated by Dgraph when creating nodes. -**Upsert** +### Upsert ### +An upsert operation is an operation where an entity is searched for, and then +depending on if it is found or not, a new entity is created with associated predicates or the entity predicates are updated. Upsert operations are important to implement uniqueness of predicates. -**Zero** -Dgraph consists of different servers, zero and alpha. Zero servers control the Dgraph database cluster : assign Alpha servers to groups, re-balance data between groups, handle transaction timestamp and UID assignment. +### Zero ### +Dgraph consists of Zero and [Alpha](#alpha) nodes. Zero nodes control the Dgraph database cluster. It assigns Alpha nodes to groups, re-balances data between groups, handles transaction timestamp and UID assignment. + From a532dd099b886fcc6a53468b0fb3291ddba07e20 Mon Sep 17 00:00:00 2001 From: rderbier Date: Tue, 24 Jan 2023 20:00:28 -0800 Subject: [PATCH 7/8] add algolia plugin config --- netlify.toml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index 4b9bb164..a2fa5bb0 100644 --- a/netlify.toml +++ b/netlify.toml @@ -19,4 +19,12 @@ [context.branch-deploy.environment] HUGO_VERSION = "0.79.0" LOOP = "false" - HOST = "/" \ No newline at end of file + HOST = "/" +[[plugins]] + package = "@algolia/netlify-plugin-crawler" + [plugins.inputs] + branches = ['main'] + disabled = true + pathPrefix = "/docs" + customDomain = "dgraph.io" + renderJavaScript = true From 0d8660dcbb878a2bb1e9e1fc456246e292b1e33c Mon Sep 17 00:00:00 2001 From: rderbier Date: Tue, 24 Jan 2023 20:07:52 -0800 Subject: [PATCH 8/8] set algolia enabled --- netlify.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlify.toml b/netlify.toml index a2fa5bb0..5aeb0116 100644 --- a/netlify.toml +++ b/netlify.toml @@ -24,7 +24,7 @@ package = "@algolia/netlify-plugin-crawler" [plugins.inputs] branches = ['main'] - disabled = true + disabled = false pathPrefix = "/docs" customDomain = "dgraph.io" renderJavaScript = true