mirror of https://github.com/dapr/docs.git
Merge branch 'v1.3' into v1.4
This commit is contained in:
commit
07369c3813
|
@ -10,10 +10,6 @@ aliases:
|
|||
|
||||
[GitHub Codespaces](https://github.com/features/codespaces) are the easiest way to get up and running for contributing to a Dapr repo. In as little as a single click, you can have an environment with all of the prerequisites ready to go in your browser.
|
||||
|
||||
{{% alert title="Private Beta" color="warning" %}}
|
||||
GitHub Codespaces is currently in a private beta. Sign up [here](https://github.com/features/codespaces/signup).
|
||||
{{% /alert %}}
|
||||
|
||||
## Features
|
||||
|
||||
- **Click and Run**: Get a dedicated and sandboxed environment with all of the required frameworks and packages ready to go.
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
type: docs
|
||||
weight: 10000
|
||||
title: "Use the Dapr CLI in a GitHub Actions workflow"
|
||||
linkTitle: "GitHub Actions"
|
||||
description: "Learn how to add the Dapr CLI to your GitHub Actions to deploy and manage Dapr in your environments."
|
||||
---
|
||||
|
||||
Dapr can be integrated with GitHub Actions via the [Dapr tool installer](https://github.com/marketplace/actions/dapr-tool-installer) available in the GitHub Marketplace. This installer adds the Dapr CLI to your workflow, allowing you to deploy, manage, and upgrade Dapr across your environments.
|
||||
|
||||
## Overview
|
||||
|
||||
The `dapr/setup-dapr` action will install the specified version of the Dapr CLI on macOS, Linux and Windows runners. Once installed, you can run any [Dapr CLI command]({{< ref cli >}}) to manage your Dapr environments.
|
||||
|
||||
## Example
|
||||
|
||||
```yaml
|
||||
- name: Install Dapr
|
||||
uses: dapr/setup-dapr@v1
|
||||
with:
|
||||
version: '1.4.0'
|
||||
|
||||
- name: Initialize Dapr
|
||||
shell: pwsh
|
||||
run: |
|
||||
# Get the credentials to K8s to use with dapr init
|
||||
az aks get-credentials --resource-group ${{ env.RG_NAME }} --name "${{ steps.azure-deployment.outputs.aksName }}"
|
||||
|
||||
# Initialize Dapr
|
||||
# Group the Dapr init logs so these lines can be collapsed.
|
||||
Write-Output "::group::Initialize Dapr"
|
||||
dapr init --kubernetes --wait --runtime-version ${{ env.DAPR_VERSION }}
|
||||
Write-Output "::endgroup::"
|
||||
|
||||
dapr status --kubernetes
|
||||
working-directory: ./twitter-sentiment-processor/demos/demo3
|
||||
```
|
|
@ -263,9 +263,9 @@ The following steps run the Sentry service locally with mTLS enabled, set up nec
|
|||
|
||||
{{% codetab %}}
|
||||
```powershell
|
||||
$env:DAPR_TRUST_ANCHORS=$(Get-Content $env:USERPROFILE\.dapr\certs\ca.crt)
|
||||
$env:DAPR_CERT_CHAIN=$(Get-Content $env:USERPROFILE\.dapr\certs\issuer.crt)
|
||||
$env:DAPR_CERT_KEY=$(Get-Content $env:USERPROFILE\.dapr\certs\issuer.key)
|
||||
$env:DAPR_TRUST_ANCHORS=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\ca.crt)
|
||||
$env:DAPR_CERT_CHAIN=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\issuer.crt)
|
||||
$env:DAPR_CERT_KEY=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\issuer.key)
|
||||
$env:NAMESPACE="default"
|
||||
```
|
||||
|
||||
|
@ -300,9 +300,9 @@ The following steps run the Sentry service locally with mTLS enabled, set up nec
|
|||
|
||||
{{% codetab %}}
|
||||
```powershell
|
||||
$env:DAPR_TRUST_ANCHORS=$(Get-Content $env:USERPROFILE\.dapr\certs\ca.crt)
|
||||
$env:DAPR_CERT_CHAIN=$(Get-Content $env:USERPROFILE\.dapr\certs\issuer.crt)
|
||||
$env:DAPR_CERT_KEY=$(Get-Content $env:USERPROFILE\.dapr\certs\issuer.key)
|
||||
$env:DAPR_TRUST_ANCHORS=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\ca.crt)
|
||||
$env:DAPR_CERT_CHAIN=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\issuer.crt)
|
||||
$env:DAPR_CERT_KEY=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\issuer.key)
|
||||
$env:NAMESPACE="default"
|
||||
```
|
||||
{{% /codetab %}}
|
||||
|
@ -356,4 +356,4 @@ spec:
|
|||
containers:
|
||||
- name: python
|
||||
image: dapriosamples/hello-k8s-python:edge
|
||||
```
|
||||
```
|
||||
|
|
|
@ -122,7 +122,7 @@ The latest Dapr helm chart no longer supports Helm v2. Please migrate from Helm
|
|||
|
||||
```bash
|
||||
helm upgrade --install dapr dapr/dapr \
|
||||
--version=1.2 \
|
||||
--version=1.4 \
|
||||
--namespace dapr-system \
|
||||
--create-namespace \
|
||||
--wait
|
||||
|
@ -132,7 +132,7 @@ The latest Dapr helm chart no longer supports Helm v2. Please migrate from Helm
|
|||
|
||||
```bash
|
||||
helm upgrade --install dapr dapr/dapr \
|
||||
--version=1.2 \
|
||||
--version=1.4 \
|
||||
--namespace dapr-system \
|
||||
--create-namespace \
|
||||
--set global.ha.enabled=true \
|
||||
|
|
|
@ -217,6 +217,32 @@ spec:
|
|||
enabled: true
|
||||
```
|
||||
|
||||
In addition to the Dapr configuration, you will also need to provide the TLS certificates to each Dapr sidecar instance. You can do so by setting the following environment variables before running the Dapr instance:
|
||||
|
||||
{{< tabs "Linux/MacOS" Windows >}}
|
||||
|
||||
{{% codetab %}}
|
||||
```bash
|
||||
export DAPR_TRUST_ANCHORS=`cat $HOME/.dapr/certs/ca.crt`
|
||||
export DAPR_CERT_CHAIN=`cat $HOME/.dapr/certs/issuer.crt`
|
||||
export DAPR_CERT_KEY=`cat $HOME/.dapr/certs/issuer.key`
|
||||
export NAMESPACE=default
|
||||
```
|
||||
|
||||
{{% /codetab %}}
|
||||
|
||||
{{% codetab %}}
|
||||
```powershell
|
||||
$env:DAPR_TRUST_ANCHORS=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\ca.crt)
|
||||
$env:DAPR_CERT_CHAIN=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\issuer.crt)
|
||||
$env:DAPR_CERT_KEY=$(Get-Content -raw $env:USERPROFILE\.dapr\certs\issuer.key)
|
||||
$env:NAMESPACE="default"
|
||||
```
|
||||
|
||||
{{% /codetab %}}
|
||||
|
||||
{{< /tabs >}}
|
||||
|
||||
If using the Dapr CLI, point Dapr to the config file above to run the Dapr instance with mTLS enabled:
|
||||
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue