mirror of https://github.com/dapr/docs.git
add cli doc
Signed-off-by: Hannah Hunter <hannahhunter@microsoft.com>
This commit is contained in:
parent
9c07cfdc88
commit
a371daed98
|
@ -21,6 +21,7 @@ Dapr initialization includes:
|
|||
1. Running a **Zipkin container instance** for observability.
|
||||
1. Creating a **default components folder** with component definitions for the above.
|
||||
1. Running a **Dapr placement service container instance** for local actor support.
|
||||
1. Running a **Dapr scheduler service container instance** for job orchestration.
|
||||
|
||||
{{% alert title="Kubernetes Development Environment" color="primary" %}}
|
||||
To initialize Dapr in your local or remote **Kubernetes** cluster for development (including the Redis and Zipkin containers listed above), see [how to initialize Dapr for development on Kubernetes]({{<ref "kubernetes-deploy.md#install-dapr-from-the-official-dapr-helm-chart-with-development-flag">}})
|
||||
|
@ -68,7 +69,13 @@ Install the latest Dapr runtime binaries:
|
|||
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.
|
||||
If you run your Docker cmds with sudo, you need to use:
|
||||
|
||||
```bash
|
||||
sudo 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 **Allow the default Docker socket to be used (requires password)** checkbox.
|
||||
|
||||
|
@ -86,8 +93,30 @@ dapr init
|
|||
|
||||
{{< /tabs >}}
|
||||
|
||||
**Expected output:**
|
||||
|
||||
```
|
||||
⌛ Making the jump to hyperspace...
|
||||
✅ Downloaded binaries and completed components set up.
|
||||
ℹ️ daprd binary has been installed to $HOME/.dapr/bin.
|
||||
ℹ️ dapr_placement container is running.
|
||||
ℹ️ dapr_scheduler container is running.
|
||||
ℹ️ dapr_redis container is running.
|
||||
ℹ️ dapr_zipkin container is running.
|
||||
ℹ️ Use `docker ps` to check running containers.
|
||||
✅ Success! Dapr is up and running. To get started, go here: https://aka.ms/dapr-getting-started
|
||||
```
|
||||
|
||||
[See the troubleshooting guide if you encounter any error messages regarding Docker not being installed or running.]({{< ref "common_issues.md#dapr-cant-connect-to-docker-when-installing-the-dapr-cli" >}})
|
||||
|
||||
#### Slim init
|
||||
|
||||
To install the CLI without any default configuration files or Docker containers, use the `--slim` flag. [Learn more about the `init` command and its flags.]({{< ref dapr-init.md >}})
|
||||
|
||||
```bash
|
||||
dapr init --slim
|
||||
```
|
||||
|
||||
### Step 3: Verify Dapr version
|
||||
|
||||
```bash
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
type: docs
|
||||
title: "job CLI command reference"
|
||||
linkTitle: "job"
|
||||
description: "Detailed information on the job CLI command"
|
||||
---
|
||||
|
||||
### Description
|
||||
|
||||
Schedule jobs on a given Dapr application.
|
||||
|
||||
### Supported platforms
|
||||
|
||||
- [Self-Hosted]({{< ref self-hosted >}})
|
||||
- [Kubernetes]({{< ref kubernetes >}})
|
||||
|
||||
### Usage
|
||||
|
||||
```bash
|
||||
dapr job [command] [flags]
|
||||
```
|
||||
|
||||
### Commands
|
||||
|
||||
| Name | Description |
|
||||
| ------------------- | ----------------------------------------------------- |
|
||||
| `schedule` | Schedule job in your application |
|
||||
| `get` | Get scheduled job |
|
||||
| `delete` | Delete the scheduled job |
|
||||
|
||||
|
||||
### Flags
|
||||
|
||||
| Name | Environment Variable | Default | Description |
|
||||
| ------------------- | -------------------- | ------- | ----------------------------------------------------- |
|
||||
| `--app-id`, `-i` | `APP_ID` | | The application id on which to schedule jobs |
|
||||
| `--name`, `-n` | | | Name of the job |
|
||||
| `--schedule`, `-s` | | | Interval schedule for the job |
|
||||
| `--data`, `-d` | | | The JSON serialized data string (optional) |
|
||||
| `--repeats`, `-r` | | | If the job is scheduled as recurring and how often it repeats (optional) |
|
||||
|
||||
### Examples
|
||||
|
||||
```bash
|
||||
# Schedule a job on an hourly interval that repeats once
|
||||
dapr job schedule --name myjob --app-id myapp --schedule "@hourly" --data '{"key":"value"}' --repeats 1
|
||||
|
||||
# Get information on the scheduled job
|
||||
dapr job get --name myjob --app-id myapp
|
||||
|
||||
# Delete job
|
||||
dapr job delete --name myjob --app-id myapp
|
||||
```
|
Loading…
Reference in New Issue