diff --git a/daprdocs/content/en/getting-started/install-dapr-selfhost.md b/daprdocs/content/en/getting-started/install-dapr-selfhost.md index b3b61be32..42dc4dfbe 100644 --- a/daprdocs/content/en/getting-started/install-dapr-selfhost.md +++ b/daprdocs/content/en/getting-started/install-dapr-selfhost.md @@ -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]({{}}) @@ -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 diff --git a/daprdocs/content/en/reference/cli/dapr-job.md b/daprdocs/content/en/reference/cli/dapr-job.md new file mode 100644 index 000000000..7f6c866b4 --- /dev/null +++ b/daprdocs/content/en/reference/cli/dapr-job.md @@ -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 +``` \ No newline at end of file