Skip to content

Commit

Permalink
Env variables inconsistency (#1835)
Browse files Browse the repository at this point in the history
* Remove uncessary env variables

ISSUE-1781

* Remove unnecessary env variables

ISSUE-1781

* Update env variables in other sections

- Remove outdated env variables
- Docs are re-formatted for readability

ISSUE-1781

* run command: remove arg placement-host-address

ISSUE-1781

* Env: rename `dapr runtime` into `dapr sidecar`

ISSUE-1781

* cli: resolve complains by MarkDown linter

* cli: smaller headers

* cli: remove verbose .lead element

* readme: fix styles

* Dapr Init: update examples to use latest version

* Dapr run: add example for Go

* Env: update components using APP_API_TOKEN

* env: update usage for APP_API_TOKEN

Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Mark Fussell <mfussell@microsoft.com>
  • Loading branch information
3 people committed Oct 20, 2021
1 parent 5fb93fd commit 9ddab5d
Show file tree
Hide file tree
Showing 23 changed files with 322 additions and 313 deletions.
23 changes: 18 additions & 5 deletions README.md
Expand Up @@ -12,10 +12,10 @@ The Dapr docs handles branching differently than most code repositories. Instead

The following branches are currently maintained:

| Branch | Website | Description |
|--------|---------|-------------|
| [v1.4](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here.
| [v1.5](https://github.com/dapr/docs/tree/v1.5) (pre-release) | https://v1-5.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.5+ go here.
| Branch | Website | Description |
| ------------------------------------------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------ |
| [v1.4](https://github.com/dapr/docs) (primary) | https://docs.dapr.io | Latest Dapr release documentation. Typo fixes, clarifications, and most documentation goes here. |
| [v1.5](https://github.com/dapr/docs/tree/v1.5) (pre-release) | https://v1-5.docs.dapr.io/ | Pre-release documentation. Doc updates that are only applicable to v1.5+ go here. |

For more information visit the [Dapr branch structure](https://docs.dapr.io/contributing/contributing-docs/#branch-guidance) document.

Expand All @@ -38,36 +38,49 @@ The [daprdocs](./daprdocs) directory contains the hugo project, markdown files,

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

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

3. Change to daprdocs directory:

```sh
cd ./docs/daprdocs
cd ./daprdocs
```

4. Update submodules:

```sh
git submodule update --init --recursive
```

5. Install npm packages:

```sh
npm install
```

## Run local server

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

```sh
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

## Code of Conduct

Please refer to our [Dapr community code of conduct](https://github.com/dapr/community/blob/master/CODE-OF-CONDUCT.md).
4 changes: 2 additions & 2 deletions daprdocs/content/en/reference/cli/cli-overview.md
Expand Up @@ -50,7 +50,7 @@ Flags:
Use "dapr [command] --help" for more information about a command.
```
## Command Reference
### Command Reference
You can learn more about each Dapr command from the links below.
Expand All @@ -72,6 +72,6 @@ You can learn more about each Dapr command from the links below.
- [`dapr uninstall`]({{< ref dapr-uninstall.md >}})
- [`dapr upgrade`]({{< ref dapr-upgrade.md >}})
## Environment Variables
### Environment Variables
Some Dapr flags can be set via environment variables (e.g. `DAPR_NETWORK` for the `--network` flag of the `dapr init` command). Note that specifying the flag on the command line overrides any set environment variable.
9 changes: 5 additions & 4 deletions daprdocs/content/en/reference/cli/dapr-build-info.md
Expand Up @@ -5,19 +5,20 @@ linkTitle: "build-info"
description: "Detailed build information on dapr-cli and daprd executables"
---

## Description
### Description

Get the version and git commit data for `dapr-cli` and `daprd` executables.

## Supported platforms
### Supported platforms

- [Self-Hosted]({{< ref self-hosted >}})

## Usage
### Usage

```bash
dapr build-info
```

## Related facts
### Related facts

You can get `daprd` build information directly by invoking `daprd --build-info` command.
38 changes: 25 additions & 13 deletions daprdocs/content/en/reference/cli/dapr-completion.md
Expand Up @@ -5,60 +5,68 @@ linkTitle: "completion"
description: "Detailed information on the completion CLI command"
---

## Description
### Description

Generates shell completion scripts

## Usage
### Usage

```bash
dapr completion [flags]
dapr completion [command]
```

## Flags
### Flags

| Name | Environment Variable | Default | Description |
|------|----------------------|---------|-------------|
| `--help`, `-h` | | | Prints this help message |
| Name | Environment Variable | Default | Description |
| -------------- | -------------------- | ------- | ------------------------ |
| `--help`, `-h` | | | Prints this help message |

## Examples
### Examples

### Installing bash completion on macOS using Homebrew
#### Installing bash completion on macOS using Homebrew

If running Bash 3.2 included with macOS:

```bash
brew install bash-completion
```

Or, if running Bash 4.1+:

```bash
brew install bash-completion@2
```

Add the completion to your completion directory:

```bash
dapr completion bash > $(brew --prefix)/etc/bash_completion.d/dapr
source ~/.bash_profile
```

### Installing bash completion on Linux
#### Installing bash completion on Linux

If bash-completion is not installed on Linux, please install the bash-completion' package via your distribution's package manager.

Load the dapr completion code for bash into the current shell:

```bash
source <(dapr completion bash)
```

Write bash completion code to a file and source if from .bash_profile:

```bash
dapr completion bash > ~/.dapr/completion.bash.inc
printf "source '$HOME/.dapr/completion.bash.inc'" >> $HOME/.bash_profile
source $HOME/.bash_profile
```

### Installing zsh completion on macOS using homebrew
#### Installing zsh completion on macOS using homebrew

If zsh-completion is not installed on macOS, please install the 'zsh-completion' package:

```bash
brew install zsh-completions
```
Expand All @@ -69,33 +77,37 @@ dapr completion zsh > "${fpath[1]}/_dapr"
source ~/.zshrc
```

### Installing zsh completion on Linux
#### Installing zsh completion on Linux

If zsh-completion is not installed on Linux, please install the 'zsh-completion' package via your distribution's package manager.

Load the dapr completion code for zsh into the current shell:

```bash
source <(dapr completion zsh)
```

Set the dapr completion code for zsh[1] to autoload on startup:

```bash
dapr completion zsh > "${fpath[1]}/_dapr"
```

### Installing Powershell completion on Windows
#### Installing Powershell completion on Windows

Create $PROFILE if it not exists:

```bash
if (!(Test-Path -Path $PROFILE )){ New-Item -Type File -Path $PROFILE -Force }
```
Add the completion to your profile:
```bash
dapr completion powershell >> $PROFILE
```
## Available Commands
### Available Commands
```txt
bash Generates bash completion scripts
Expand Down
20 changes: 10 additions & 10 deletions daprdocs/content/en/reference/cli/dapr-components.md
Expand Up @@ -5,30 +5,30 @@ linkTitle: "components"
description: "Detailed information on the components CLI command"
---

## Description
### Description

List all Dapr components.

## Supported platforms
### Supported platforms

- [Kubernetes]({{< ref kubernetes >}})

## Usage
### Usage

```bash
dapr components [flags]
```

## Flags
### Flags

| Name | Environment Variable | Default | Description
| --- | --- | --- | --- |
| `--help`, `-h` | | | Print this help message |
| `--kubernetes`, `-k` | | `false` | List all Dapr components in a Kubernetes cluster |
| Name | Environment Variable | Default | Description |
| -------------------- | -------------------- | ------- | ------------------------------------------------ |
| `--help`, `-h` | | | Print this help message |
| `--kubernetes`, `-k` | | `false` | List all Dapr components in a Kubernetes cluster |

## Examples
### Examples

### List Kubernetes components
```bash
# List Kubernetes components
dapr components -k
```
24 changes: 12 additions & 12 deletions daprdocs/content/en/reference/cli/dapr-configurations.md
Expand Up @@ -5,32 +5,32 @@ linkTitle: "configurations"
description: "Detailed information on the configurations CLI command"
---

## Description
### Description

List all Dapr configurations.

## Supported platforms
### Supported platforms

- [Kubernetes]({{< ref kubernetes >}})

## Usage
### Usage

```bash
dapr configurations [flags]
```

## Flags
### Flags

| Name | Environment Variable | Default | Description
| --- | --- | --- | --- |
| `--kubernetes`, `-k` | | `false` | List all Dapr configurations in a Kubernetes cluster
| `--name`, `-n` | | | The configuration name to be printed (optional)
| `--output`, `-o` | | `list`| Output format (options: json or yaml or list)
| `--help`, `-h` | | | Print this help message |
| Name | Environment Variable | Default | Description |
| -------------------- | -------------------- | ------- | ---------------------------------------------------- |
| `--kubernetes`, `-k` | | `false` | List all Dapr configurations in a Kubernetes cluster |
| `--name`, `-n` | | | The configuration name to be printed (optional) |
| `--output`, `-o` | | `list` | Output format (options: json or yaml or list) |
| `--help`, `-h` | | | Print this help message |

## Examples
### Examples

### List Kubernetes Dapr configurations
```bash
# List Kubernetes Dapr configurations
dapr configurations -k
```
45 changes: 19 additions & 26 deletions daprdocs/content/en/reference/cli/dapr-dashboard.md
Expand Up @@ -5,54 +5,47 @@ linkTitle: "dashboard"
description: "Detailed information on the dashboard CLI command"
---

## Description
### Description

Start [Dapr dashboard](https://github.com/dapr/dashboard).

## Supported platforms
### Supported platforms

- [Self-Hosted]({{< ref self-hosted >}})
- [Kubernetes]({{< ref kubernetes >}})

## Usage
### Usage

```bash
dapr dashboard [flags]
```

## Flags
### Flags

| Name | Environment Variable | Default | Description |
|------|----------------------|---------|-------------|
| `--address`, `-a` | | `localhost` | Address to listen on. Only accepts IP address or localhost as a value |
| `--help`, `-h` | | | Prints this help message |
| `--kubernetes`, `-k` | | `false` | Opens Dapr dashboard in local browser via local proxy to Kubernetes cluster |
| `--namespace`, `-n` | | `dapr-system` | The namespace where Dapr dashboard is running |
| `--port`, `-p` | | `8080` | The local port on which to serve Dapr dashboard |
| `--version`, `-v` | | `false` | Print the version for Dapr dashboard |
| Name | Environment Variable | Default | Description |
| -------------------- | -------------------- | ------------- | --------------------------------------------------------------------------- |
| `--address`, `-a` | | `localhost` | Address to listen on. Only accepts IP address or localhost as a value |
| `--help`, `-h` | | | Prints this help message |
| `--kubernetes`, `-k` | | `false` | Opens Dapr dashboard in local browser via local proxy to Kubernetes cluster |
| `--namespace`, `-n` | | `dapr-system` | The namespace where Dapr dashboard is running |
| `--port`, `-p` | | `8080` | The local port on which to serve Dapr dashboard |
| `--version`, `-v` | | `false` | Print the version for Dapr dashboard |

## Examples
### Examples

### Start dashboard locally
```bash
# Start dashboard locally
dapr dashboard
```

### Start dashboard service locally on a specified port
```bash
# Start dashboard service locally on a specified port
dapr dashboard -p 9999
```

### Port forward to dashboard service running in Kubernetes
```bash
# Port forward to dashboard service running in Kubernetes
dapr dashboard -k
```

### Port forward to dashboard service running in Kubernetes on all addresses on a specified port
```bash
# Port forward to dashboard service running in Kubernetes on all addresses on a specified port
dapr dashboard -k -p 9999 --address 0.0.0.0
```

### Port forward to dashboard service running in Kubernetes on a specified port
```bash
# Port forward to dashboard service running in Kubernetes on a specified port
dapr dashboard -k -p 9999
```

0 comments on commit 9ddab5d

Please sign in to comment.