Skip to content

Commit

Permalink
Merge branch 'v1.13' into issue_3917
Browse files Browse the repository at this point in the history
  • Loading branch information
hhunter-ms authored Feb 1, 2024
2 parents 7ab506d + 59ed30e commit 0a61c36
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ APIs that generate random numbers, random UUIDs, or the current date are _non-de

For example, instead of this:

{{< tabs ".NET" Java >}}
{{< tabs ".NET" Java JavaScript >}}

{{% codetab %}}

Expand All @@ -186,11 +186,22 @@ string randomString = GetRandomString();

{{% /codetab %}}

{{% codetab %}}

```javascript
// DON'T DO THIS!
const currentTime = new Date();
const newIdentifier = uuidv4();
const randomString = getRandomString();
```

{{% /codetab %}}

{{< /tabs >}}

Do this:

{{< tabs ".NET" Java >}}
{{< tabs ".NET" Java JavaScript >}}

{{% codetab %}}

Expand All @@ -214,6 +225,16 @@ String randomString = context.callActivity(GetRandomString.class.getName(), Stri

{{% /codetab %}}

{{% codetab %}}

```javascript
// Do this!!
const currentTime = context.getCurrentUtcDateTime();
const randomString = yield context.callActivity(getRandomString);
```

{{% /codetab %}}

{{< /tabs >}}


Expand All @@ -224,7 +245,7 @@ Instead, workflows should interact with external state _indirectly_ using workfl

For example, instead of this:

{{< tabs ".NET" Java >}}
{{< tabs ".NET" Java JavaScript >}}

{{% codetab %}}

Expand All @@ -247,11 +268,31 @@ HttpResponse<String> response = HttpClient.newBuilder().build().send(request, Ht

{{% /codetab %}}

{{% codetab %}}

```javascript
// DON'T DO THIS!
// Accessing an Environment Variable (Node.js)
const configuration = process.env.MY_CONFIGURATION;

fetch('https://postman-echo.com/get')
.then(response => response.text())
.then(data => {
console.log(data);
})
.catch(error => {
console.error('Error:', error);
});

```

{{% /codetab %}}

{{< /tabs >}}

Do this:

{{< tabs ".NET" Java >}}
{{< tabs ".NET" Java JavaScript >}}

{{% codetab %}}

Expand All @@ -273,6 +314,16 @@ String data = ctx.callActivity(MakeHttpCall.class, "https://example.com/api/data

{{% /codetab %}}

{{% codetab %}}

```javascript
// Do this!!
const configuation = workflowInput.getConfiguration(); // imaginary workflow input argument
const data = yield ctx.callActivity(makeHttpCall, "https://example.com/api/data");
```

{{% /codetab %}}

{{< /tabs >}}


Expand Down
27 changes: 25 additions & 2 deletions daprdocs/content/en/getting-started/install-dapr-selfhost.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ Dapr initialization includes:
1. Running a **Dapr placement service container instance** for local actor support.

{{% alert title="Docker" color="primary" %}}
The recommended development environment requires [Docker](https://docs.docker.com/install/). While you can [initialize Dapr without a dependency on Docker]({{<ref self-hosted-no-docker.md>}})), the next steps in this guide assume the recommended Docker development environment.
The recommended development environment requires [Docker](https://docs.docker.com/install/). While you can [initialize Dapr without a dependency on Docker]({{< ref self-hosted-no-docker.md >}})), the next steps in this guide assume the recommended Docker development environment.

You can also install [Podman](https://podman.io/) in place of Docker. Read more about [initializing Dapr using Podman]({{<ref dapr-init.md>}}).
You can also install [Podman](https://podman.io/) in place of Docker. Read more about [initializing Dapr using Podman]({{< ref dapr-init.md >}}).
{{% /alert %}}

### Step 1: Open an elevated terminal
Expand Down Expand Up @@ -54,12 +54,35 @@ Run Windows Terminal or command prompt as administrator.

### Step 2: Run the init CLI command

{{< tabs "Linux/MacOS" "Windows">}}

{{% codetab %}}

Install the latest Dapr runtime binaries:

```bash
dapr init
```

**If you are installing on Mac OS Silicon with Docker,** you may need to perform the following workaround to enable `dapr init` to talk to Docker without using Kubernetes.
1. Navigate to **Docker Desktop** > **Settings** > **Advanced**.
1. Select the **Enable default Docker socket** checkbox.

{{% /codetab %}}

{{% codetab %}}

Install the latest Dapr runtime binaries:

```bash
dapr init
```

{{% /codetab %}}

{{< /tabs >}}


### Step 3: Verify Dapr version

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/python/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./checkout
pip3 install -r requirements.txt
cd ..
cd ./order-processor
pip3 install -r requirements.txt
cd ..
cd ./order-processor-fastapi
pip3 install -r requirements.txt
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -215,6 +229,17 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/javascript/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
npm install
cd ..
cd ./checkout
npm install
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -352,6 +377,18 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/csharp/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
dotnet restore
dotnet build
cd ../checkout
dotnet restore
dotnet build
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -497,6 +534,17 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/java/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
mvn clean install
cd ..
cd ./checkout
mvn clean install
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -647,6 +695,16 @@ From the root of the Quickstarts directory, navigate into the pub/sub directory:
cd pub_sub/go/sdk
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
go build .
cd ../checkout
go build .
cd ..
```

### Step 3: Run the publisher and subscriber

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/python/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
pip3 install -r requirements.txt
cd ../checkout
pip3 install -r requirements.txt
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -184,6 +194,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/javascript/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
npm install
cd ../checkout
npm install
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -314,6 +334,18 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/csharp/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
dotnet restore
dotnet build
cd ../checkout
dotnet restore
dotnet build
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -448,6 +480,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/java/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
mvn clean install
cd ../checkout
mvn clean install
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down Expand Up @@ -577,6 +619,16 @@ From the root of the Quickstart clone directory, navigate to the quickstart dire
cd service_invocation/go/http
```

Install the dependencies for the `order-processor` and `checkout` apps:

```bash
cd ./order-processor
go build .
cd ../checkout
go build .
cd ..
```

### Step 3: Run the `order-processor` and `checkout` services

With the following command, simultaneously run the following services alongside their own Dapr sidecars:
Expand Down
Loading

0 comments on commit 0a61c36

Please sign in to comment.