Skip to content

Commit

Permalink
Merge branch 'mikeee-init-docs' of github.com:mikeee/dapr_docs into m…
Browse files Browse the repository at this point in the history
…ikeee-init-docs
  • Loading branch information
mikeee committed Feb 7, 2024
2 parents 470ae2b + 74d26e6 commit e9e6774
Show file tree
Hide file tree
Showing 97 changed files with 1,283 additions and 379 deletions.
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/go:1": {
"version": "latest"
},
"ghcr.io/devcontainers/features/hugo:1": {
"extended": true,
"version": "latest"
},
"ghcr.io/devcontainers/features/node:1": {
"nodeGypDependencies": true,
"version": "lts",
"nvmVersion": "latest"
}
},
"customizations": {
"vscode": {
"extensions": [
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"davidanson.vscode-markdownlint",
"budparr.language-hugo-vscode"
],
"settings": {
"git.alwaysSignOff": true
}
}
},
"forwardPorts": [1313],
"postAttachCommand": "bash scripts/init-container.sh"
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* text=auto eol=lf
*.{cmd,[cC][mM][dD]} text eol=crlf
*.{bat,[bB][aA][tT]} text eol=crlf
52 changes: 37 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,44 @@ The Dapr docs are built using [Hugo](https://gohugo.io/) with the [Docsy](https:

The [daprdocs](./daprdocs) directory contains the hugo project, markdown files, and theme configurations.

## Pre-requisites
## Setup with a devcontainer

- [Hugo extended version](https://gohugo.io/getting-started/installing)
- [Node.js](https://nodejs.org/en/)
This repository comes with a [devcontainer](/.devcontainer/devcontainer.json) configuration that automatically installs all the required dependencies and VSCode extensions to build and run the docs.

This devcontainer can be used to develop locally with VSCode or via GitHub Codespaces completely in the browser. Other IDEs that support [devcontainers](https://containers.dev/) can be used but won't have the extensions preconfigured and will likely have different performance characteristics.

### Pre-requisites

## Environment setup
- [Docker Desktop](https://www.docker.com/products/docker-desktop)
- [VSCode](https://code.visualstudio.com/download)

1. Ensure pre-requisites are installed
2. Clone this repository
### Environment setup

1. [Fork](https://github.com/dapr/docs/fork) and clone this repository.

1. Open the forked repository in VS Code

```sh
git clone https://github.com/dapr/docs.git
code .
```

3. Change to daprdocs directory:
1. When prompted, click "Reopen in Container" to open the repository in the devcontainer.

Continue with the [Run local server](#run-local-server) steps.

## Setup without a devcontainer

### Pre-requisites

- [Hugo extended version](https://gohugo.io/getting-started/installing)
- [Node.js](https://nodejs.org/en/)

### Environment setup

1. Ensure pre-requisites are installed.
1. [Fork](https://github.com/dapr/docs/fork) and clone this repository.

1. Change to daprdocs directory:

```sh
cd ./daprdocs
Expand All @@ -63,7 +86,7 @@ npm install

## Run local server

1. Make sure you're still in the `daprdocs` directory
1. Make sure you're in the `daprdocs` directory
2. Run

```sh
Expand All @@ -72,14 +95,13 @@ hugo server

3. Navigate to `http://localhost:1313/`


## Update docs

1. Fork repo into your account
1. Create new branch
1. Commit and push changes to forked branch
1. Submit pull request from downstream branch to the upstream branch for the correct version you are targeting
1. Staging site will automatically get created and linked to PR to review and test
1. Ensure you are in your forked repo
2. Create new branch
3. Commit and push changes to forked branch
4. Submit pull request from downstream branch to the upstream branch for the correct version you are targeting
5. Staging site will automatically get created and linked to PR to review and test

## Code of Conduct

Expand Down
24 changes: 12 additions & 12 deletions daprdocs/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,18 @@ id = "G-60C6Q1ETC1"
source = "../translations/docs-zh/content/sdks_dotnet"
target = "content/developing-applications/sdks/dotnet"
lang = "zh-hans"
[[module.mounts]]
source = "../translations/docs-zh/content/sdks_java"
target = "content/developing-applications/sdks/java"
lang = "zh-hans"
[[module.mounts]]
source = "../translations/docs-zh/content/sdks_go"
target = "content/developing-applications/sdks/go"
lang = "zh-hans"
[[module.mounts]]
source = "../translations/docs-zh/content/sdks_js"
target = "content/developing-applications/sdks/js"
lang = "zh-hans"

# Markdown Engine - Allow inline html
[markup]
Expand Down Expand Up @@ -197,18 +209,6 @@ url_latest_version = "https://docs.dapr.io"
[[params.versions]]
version = "v1.7"
url = "https://v1-7.docs.dapr.io"
[[params.versions]]
version = "v1.6"
url = "https://v1-6.docs.dapr.io"
[[params.versions]]
version = "v1.5"
url = "https://v1-5.docs.dapr.io"
[[params.versions]]
version = "v1.4"
url = "https://v1-4.docs.dapr.io"
[[params.versions]]
version = "v1.3"
url = "https://v1-3.docs.dapr.io"

# UI Customization
[params.ui]
Expand Down
2 changes: 1 addition & 1 deletion daprdocs/content/en/concepts/security-concept.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ The diagram below shows how the Sentry system service issues certificates for ap

### Preventing IP addresses on Dapr

To prevent Dapr sidecars from being called on any IP address (especially in production environments such as Kubernetes), Dapr restricts its listening IP addresses only to `localhost`. Use the [dapr-listen-addresses]({{<ref arguments-annotations-overview>}}) setting you need to enable other addresses.
To prevent Dapr sidecars from being called on any IP address (especially in production environments such as Kubernetes), Dapr restricts its listening IP addresses to `localhost`. Use the [dapr-listen-addresses]({{<ref arguments-annotations-overview>}}) setting if you need to enable access from external addresses.

## Secure Dapr to application communication

Expand Down
1 change: 1 addition & 0 deletions daprdocs/content/en/contributing/codespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ If you haven't already forked the repo, creating the Codespace will also create
- [dapr/dapr](https://github.com/dapr/dapr)
- [dapr/components-contrib](https://github.com/dapr/components-contrib)
- [dapr/cli](https://github.com/dapr/cli)
- [dapr/docs](https://github.com/dapr/docs)
- [dapr/python-sdk](https://github.com/dapr/python-sdk)

## Developing Dapr Components in a Codespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ description: Get started with contributing to the Dapr docs

In this guide, you'll learn how to contribute to the [Dapr docs repository](https://github.com/dapr/docs). Since Dapr docs are published to [docs.dapr.io](https://docs.dapr.io), you must make sure your contributions compile and publish correctly.

<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/uPYuXcaEs-c" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

## Prerequisites

Before contributing to the Dapr docs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ Now that you've learned about the [actor building block]({{< ref "actors-overvie

Dapr actors are virtual, meaning that their lifetime is not tied to their in-memory representation. As a result, they do not need to be explicitly created or destroyed. The Dapr actor runtime automatically activates an actor the first time it receives a request for that actor ID. If an actor is not used for a period of time, the Dapr actor runtime garbage-collects the in-memory object. It will also maintain knowledge of the actor's existence should it need to be reactivated later.

Invocation of actor methods and reminders reset the idle time, e.g. reminder firing will keep the actor active. Actor reminders fire whether an actor is active or inactive, if fired for inactive actor, it will activate the actor first. Actor timers do not reset the idle time, so timer firing will not keep the actor active. Timers only fire while the actor is active.
Invocation of actor methods, timers, and reminders reset the actor idle time. For example, a reminder firing keeps the actor active.
- Actor reminders fire whether an actor is active or inactive. If fired for an inactive actor, it activates the actor first.
- Actor timers firing reset the idle time; however, timers only fire while the actor is active.

The idle timeout and scan interval Dapr runtime uses to see if an actor can be garbage-collected is configurable. This information can be passed when Dapr runtime calls into the actor service to get supported actor types.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddSingleton<BankService>();
}
```
[See the .NET SDK documentation on registring actors]({{< ref "dotnet-actors-usage.md#registring-actors" >}}).
[See the .NET SDK documentation on registering actors]({{< ref "dotnet-actors-usage.md#registring-actors" >}}).

{{% /codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void ConfigureServices(IServiceCollection services)
}
```

[See the .NET SDK documentation on registring actors]({{< ref "dotnet-actors-usage.md#registring-actors" >}}).
[See the .NET SDK documentation on registering actors]({{< ref "dotnet-actors-usage.md#registring-actors" >}}).

{{% /codetab %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Alternatively, you can use [Dapr SDKs to use actors]({{< ref "developing-applica

## Save state with actors

You can interact with Dapr via HTTP/gRPC endpoints to save state reliably using the Dapr actor state mangement capabaility.
You can interact with Dapr via HTTP/gRPC endpoints to save state reliably using the Dapr actor state management capabaility.

To use actors, your state store must support multi-item transactions. This means your state store component must implement the `TransactionalStore` interface.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async function start() {
}
});
await server.binding.receive('checkout', async (orderId) => console.log(`Received Message: ${JSON.stringify(orderId)}`));
await server.startServer();
await server.start();
}

```
Expand Down Expand Up @@ -292,4 +292,4 @@ Event delivery guarantees are controlled by the binding implementation. Dependin
- [Bindings building block]({{< ref bindings >}})
- [Bindings API]({{< ref bindings_api.md >}})
- [Components concept]({{< ref components-concept.md >}})
- [Supported bindings]({{< ref supported-bindings >}})
- [Supported bindings]({{< ref supported-bindings >}})
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ While both HTTP and gRPC are supported in the alpha release, using the gRPC APIs

### Cryptographic components

The Dapr cryptography building block incldues two kinds of components:
The Dapr cryptography building block includes two kinds of components:

- **Components that allow interacting with management services or vaults ("key vaults").**
Similar to how Dapr offers an "abstraction layer" on top of various secret stores or state stores, these components allow interacting with various key vaults such as Azure Key Vault (with more coming in future Dapr releases). With these components, cryptographic operations on the private keys are performed within the vaults and Dapr never sees your private keys.
Expand Down Expand Up @@ -85,4 +85,5 @@ Watch this [demo video of the Cryptography API from the Dapr Community Call #83]

## Related links
- [Cryptography overview]({{< ref cryptography-overview.md >}})
- [Cryptography component specs]({{< ref supported-cryptography >}})
- [Cryptography component specs]({{< ref supported-cryptography >}})
- [Cryptography API reference doc]({{< ref cryptography_api >}})
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ The JSON payload then reflects the new `source` and `id` values:
```

{{% alert title="Important" color="warning" %}}
While you can replace `traceid`/`traceparent` and `tracestate`, doing this may interfere with tracing events and report inconsistent results in tracing tools. It's recommended to use Open Telementry for distributed traces. [Learn more about distributed tracing.]({{< ref tracing-overview.md >}})
While you can replace `traceid`/`traceparent` and `tracestate`, doing this may interfere with tracing events and report inconsistent results in tracing tools. It's recommended to use Open Telemetry for distributed traces. [Learn more about distributed tracing.]({{< ref tracing-overview.md >}})

{{% /alert %}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ All Dapr pub/sub components support the at-least-once guarantee.

### Consumer groups and competing consumers pattern

Dapr handles the burden of dealing with consumer groups and the competing consumers pattern. In the competing consumers pattern, multiple application instances using a single consumer group compete for the message. Dapr enforces the competing consumer pattern when replicas use the same `app-id` without explict consumer group overrides.
Dapr handles the burden of dealing with consumer groups and the competing consumers pattern. In the competing consumers pattern, multiple application instances using a single consumer group compete for the message. Dapr enforces the competing consumer pattern when replicas use the same `app-id` without explicit consumer group overrides.

When multiple instances of the same application (with same `app-id`) subscribe to a topic, Dapr delivers each message to *only one instance of **that** application*. This concept is illustrated in the diagram below.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,14 @@ The `filter` specifies the query conditions in the form of a tree, where each no

The following operations are supported:

| Operator | Operands | Description |
|----------|-------------|--------------|
| `EQ` | key:value | key == value |
| Operator | Operands | Description |
|----------|-------------|--------------------------------------------------------------|
| `EQ` | key:value | key == value |
| `NEQ` | key:value | key != value |
| `GT` | key:value | key > value |
| `GTE` | key:value | key >= value |
| `LT` | key:value | key < value |
| `LTE` | key:value | key <= value |
| `IN` | key:[]value | key == value[0] OR key == value[1] OR ... OR key == value[n] |
| `AND` | []operation | operation[0] AND operation[1] AND ... AND operation[n] |
| `OR` | []operation | operation[0] OR operation[1] OR ... OR operation[n] |
Expand Down
Loading

0 comments on commit e9e6774

Please sign in to comment.