diff --git a/howto/configure-redis/README.md b/howto/configure-redis/README.md index 30148a50c..612dafb2c 100644 --- a/howto/configure-redis/README.md +++ b/howto/configure-redis/README.md @@ -126,4 +126,5 @@ kubectl apply -f redis-pubsub.yaml ### Standalone -By default the Dapr CLI creates a local Redis instance when you run `dapr init`. However, if you want to configure a different Redis instance, create a directory named `components` in the root path of your Dapr binary and then copy your `redis.yaml` into that directory. +By default the Dapr CLI creates a local Redis instance when you run `dapr init`. However, if you want to configure a different Redis instance, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. + diff --git a/howto/consume-topic/README.md b/howto/consume-topic/README.md index 88c06d692..089d074bc 100644 --- a/howto/consume-topic/README.md +++ b/howto/consume-topic/README.md @@ -11,7 +11,7 @@ Dapr provides different implementation of the underlying system, and allows oper The first step is to setup the Pub/Sub component. For this guide, we'll use Redis Streams, which is also installed by default on a local machine when running `dapr init`. -*Note: When running Dapr locally, a pub/sub component YAML will automatically be created if it doesn't exist in a directory called `components` in your current working directory.* +*Note: When running Dapr locally, a pub/sub component YAML is automatically created for you locally. To override, create a `components` directory containing the file and use the flag `--components-path` with the `dapr run` CLI command.* ```yaml apiVersion: dapr.io/v1alpha1 diff --git a/howto/publish-topic/README.md b/howto/publish-topic/README.md index 65be101f8..44531141c 100644 --- a/howto/publish-topic/README.md +++ b/howto/publish-topic/README.md @@ -11,7 +11,7 @@ Dapr provides different implementation of the underlying system, and allows oper The first step is to setup the Pub/Sub component. For this guide, we'll use Redis Streams, which is also installed by default on a local machine when running `dapr init`. -*Note: When running Dapr locally, a pub/sub component YAML will automatically be created if it doesn't exist in a directory called `components` in your current working directory.* +*Note: When running Dapr locally, a pub/sub component YAML is automatically created for you locally. To override, create a `components` directory containing the file and use the flag `--components-path` with the `dapr run` CLI command.* ```yaml apiVersion: dapr.io/v1alpha1 diff --git a/howto/send-events-with-output-bindings/README.md b/howto/send-events-with-output-bindings/README.md index b40474ab0..6762634b6 100644 --- a/howto/send-events-with-output-bindings/README.md +++ b/howto/send-events-with-output-bindings/README.md @@ -9,7 +9,8 @@ An output binding represents a resource that Dapr will use invoke and send messa For the purpose of this guide, we'll use a Kafka binding. You can find a list of the different binding specs [here](../../concepts/bindings/README.md). -Create the following YAML file, named binding.yaml, and save this to the /components sub-folder in your application directory. +Create the following YAML file, named binding.yaml, and save this to a `components` sub-folder in your application directory. +(Use the `--components-path` flag with `dapr run` to point to your custom components dir) *Note: When running in Kubernetes, apply this file to your cluster using `kubectl apply -f binding.yaml`* diff --git a/howto/setup-pub-sub-message-broker/setup-azure-eventhubs.md b/howto/setup-pub-sub-message-broker/setup-azure-eventhubs.md index e72ea081f..d50a8a537 100644 --- a/howto/setup-pub-sub-message-broker/setup-azure-eventhubs.md +++ b/howto/setup-pub-sub-message-broker/setup-azure-eventhubs.md @@ -42,5 +42,4 @@ kubectl apply -f eventhubs.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Azure Event Hubs, replace the contents of `pubsub.yaml` (or `messagebus.yaml` for Dapr < 0.6.0) file with the contents of `eventhubs.yaml` above (Don't change the filename). +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-pub-sub-message-broker/setup-azure-servicebus.md b/howto/setup-pub-sub-message-broker/setup-azure-servicebus.md index 02992f2d6..b57469b61 100644 --- a/howto/setup-pub-sub-message-broker/setup-azure-servicebus.md +++ b/howto/setup-pub-sub-message-broker/setup-azure-servicebus.md @@ -47,5 +47,4 @@ kubectl apply -f azuresb.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Azure Service Bus, replace the contents of `pubsub.yaml` (or `messagebus.yaml` for Dapr < 0.6.0) file with the contents of `azuresb.yaml` above (Don't change the filename). +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-pub-sub-message-broker/setup-gcp.md b/howto/setup-pub-sub-message-broker/setup-gcp.md index 4d4714e11..63d71f3f0 100644 --- a/howto/setup-pub-sub-message-broker/setup-gcp.md +++ b/howto/setup-pub-sub-message-broker/setup-gcp.md @@ -70,4 +70,4 @@ kubectl apply -f messagebus.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory. To use Cloud Pubsub, replace the contents of `pubsub.yaml` (or `messagebus.yaml` for Dapr < 0.6.0) file with the contents of yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-pub-sub-message-broker/setup-hazelcast.md b/howto/setup-pub-sub-message-broker/setup-hazelcast.md index cde13ab52..caffe918a 100644 --- a/howto/setup-pub-sub-message-broker/setup-hazelcast.md +++ b/howto/setup-pub-sub-message-broker/setup-hazelcast.md @@ -48,5 +48,4 @@ kubectl apply -f hazelcast.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Hazelcast, replace the `pubsub.yaml` (or `messagebus.yaml` for Dapr < 0.6.0) file with the hazelcast.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-pub-sub-message-broker/setup-kafka.md b/howto/setup-pub-sub-message-broker/setup-kafka.md index fa3029e31..89386130d 100644 --- a/howto/setup-pub-sub-message-broker/setup-kafka.md +++ b/howto/setup-pub-sub-message-broker/setup-kafka.md @@ -53,5 +53,4 @@ kubectl apply -f kafka.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Kafka, replace the `pubsub.yaml` (or `messagebus.yaml` for Dapr < 0.6.0) file with the kafka.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-pub-sub-message-broker/setup-mqtt.md b/howto/setup-pub-sub-message-broker/setup-mqtt.md index 78979edb5..00be9f808 100644 --- a/howto/setup-pub-sub-message-broker/setup-mqtt.md +++ b/howto/setup-pub-sub-message-broker/setup-mqtt.md @@ -109,6 +109,5 @@ kubectl apply -f mqtt.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. -To use MQTT, replace the contents of `pubsub.yaml` file with the contents of `mqtt.yaml` above (Don't change the filename). diff --git a/howto/setup-pub-sub-message-broker/setup-nats.md b/howto/setup-pub-sub-message-broker/setup-nats.md index e21353070..0b4672cdf 100644 --- a/howto/setup-pub-sub-message-broker/setup-nats.md +++ b/howto/setup-pub-sub-message-broker/setup-nats.md @@ -58,5 +58,4 @@ kubectl apply -f nats.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use NATS, replace the contents of `pubsub.yaml` (or `messagebus.yaml` for Dapr < 0.6.0) file with the contents of `nats.yaml` above (Don't change the filename). +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-pub-sub-message-broker/setup-pulsar.md b/howto/setup-pub-sub-message-broker/setup-pulsar.md index d1d3b896d..9076819db 100644 --- a/howto/setup-pub-sub-message-broker/setup-pulsar.md +++ b/howto/setup-pub-sub-message-broker/setup-pulsar.md @@ -45,4 +45,5 @@ To apply the Pulsar pub/sub to Kubernetes, use the kubectl CLI: `` kubectl apply -f pulsar.yaml `` ### Running locally ### -The Dapr CLI will automatically create a directory named components in your current working directory with a Redis component. To use Pulsar, replace the pubsub.yaml (or messagebus.yaml for Dapr < 0.6.0) file with the pulsar.yaml above. + +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-pub-sub-message-broker/setup-rabbitmq.md b/howto/setup-pub-sub-message-broker/setup-rabbitmq.md index f3f97f1ed..84e911ea7 100644 --- a/howto/setup-pub-sub-message-broker/setup-rabbitmq.md +++ b/howto/setup-pub-sub-message-broker/setup-rabbitmq.md @@ -72,5 +72,4 @@ kubectl apply -f rabbitmq.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use RabbitMQ, replace the contents of `pubsub.yaml` (or `messagebus.yaml` for Dapr < 0.6.0) file with the contents of `rabbitmq.yaml` above (Don't change the filename). +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-pub-sub-message-broker/setup-redis.md b/howto/setup-pub-sub-message-broker/setup-redis.md index 9c043aef1..07ddbaa4c 100644 --- a/howto/setup-pub-sub-message-broker/setup-redis.md +++ b/howto/setup-pub-sub-message-broker/setup-redis.md @@ -6,8 +6,8 @@ Dapr can use any Redis instance - containerized, running on your local dev machi ### Running locally -The Dapr CLI will automatically create and setup a Redis Streams instance for you when you. -The Redis instance will be installed via Docker when you run `dapr init`, and the component file will be setup with `dapr run`. +The Dapr CLI will automatically create and setup a Redis Streams instance for you. +The Redis instance will be installed via Docker when you run `dapr init`, and the component file will be created in default directory. (`$HOME/.dapr/components` directory (Mac/Linux) or `%USERPROFILE%\.dapr\components` on Windows). ### Creating a Redis instance in your Kubernetes Cluster using Helm @@ -82,4 +82,4 @@ kubectl apply -f pubsub.yaml ### Standalone -By default the Dapr CLI creates a local Redis instance when you run `dapr init`. When you run an app using `dapr run`, the component file will automatically be created for you in a `components` dir in your current working directory. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-secret-store/aws-secret-manager.md b/howto/setup-secret-store/aws-secret-manager.md index 87d42d92a..52173ae2a 100644 --- a/howto/setup-secret-store/aws-secret-manager.md +++ b/howto/setup-secret-store/aws-secret-manager.md @@ -33,7 +33,7 @@ To deploy in Kubernetes, save the file above to `aws_secret_manager.yaml` and th kubectl apply -f aws_secret_manager.yaml ``` -When running in self hosted mode, place this file in a `components` directory under the Dapr working directory. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. ## AWS Secret Manager reference example diff --git a/howto/setup-secret-store/azure-keyvault.md b/howto/setup-secret-store/azure-keyvault.md index 91ef8d9d5..7050d19f3 100644 --- a/howto/setup-secret-store/azure-keyvault.md +++ b/howto/setup-secret-store/azure-keyvault.md @@ -98,8 +98,6 @@ This section walks you through how to enable an Azure Key Vault secret store to 1. Create a components directory in your application root -All Dapr components are stored in a directory called 'components' below at application root. Create this directory. - ```bash mkdir components ``` @@ -129,6 +127,8 @@ spec: value : "[pfx_certificate_file_local_path]" ``` +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. + 4. Store redisPassword secret to keyvault ```bash diff --git a/howto/setup-secret-store/gcp-secret-manager.md b/howto/setup-secret-store/gcp-secret-manager.md index c2172fafe..6ca95bfe9 100644 --- a/howto/setup-secret-store/gcp-secret-manager.md +++ b/howto/setup-secret-store/gcp-secret-manager.md @@ -45,7 +45,7 @@ To deploy in Kubernetes, save the file above to `gcp_secret_manager.yaml` and th kubectl apply -f gcp_secret_manager.yaml ``` -When running in self hosted mode, place this file in a `components` directory under the Dapr working directory. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. ## GCP Secret Manager reference example diff --git a/howto/setup-secret-store/hashicorp-vault.md b/howto/setup-secret-store/hashicorp-vault.md index 86e4fa663..15f782862 100644 --- a/howto/setup-secret-store/hashicorp-vault.md +++ b/howto/setup-secret-store/hashicorp-vault.md @@ -43,7 +43,7 @@ To deploy in Kubernetes, save the file above to `vault.yaml` and then run: kubectl apply -f vault.yaml ``` -When running in self hosted mode, place this file in a `components` directory from the Dapr working directory. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. ## Vault reference example diff --git a/howto/setup-state-store/setup-aerospike.md b/howto/setup-state-store/setup-aerospike.md index fa423c6e8..224e6c273 100644 --- a/howto/setup-state-store/setup-aerospike.md +++ b/howto/setup-state-store/setup-aerospike.md @@ -64,5 +64,4 @@ kubectl apply -f aerospike.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Aerospike, replace the redis.yaml file with the aerospike.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-azure-cosmosdb.md b/howto/setup-state-store/setup-azure-cosmosdb.md index 071c013d2..23e465f23 100644 --- a/howto/setup-state-store/setup-azure-cosmosdb.md +++ b/howto/setup-state-store/setup-azure-cosmosdb.md @@ -75,8 +75,7 @@ kubectl apply -f cosmos.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use CosmosDB, replace the redis.yaml file with cosmos.yaml file above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. ## Partition keys diff --git a/howto/setup-state-store/setup-azure-tablestorage.md b/howto/setup-state-store/setup-azure-tablestorage.md index f8b91bf1c..983040e4d 100644 --- a/howto/setup-state-store/setup-azure-tablestorage.md +++ b/howto/setup-state-store/setup-azure-tablestorage.md @@ -70,8 +70,7 @@ kubectl apply -f azuretable.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Azure Table Storage, replace the redis.yaml file with azuretable.yaml file above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. ## Partitioning diff --git a/howto/setup-state-store/setup-cassandra.md b/howto/setup-state-store/setup-cassandra.md index 0cd4372dc..3c84d04e1 100644 --- a/howto/setup-state-store/setup-cassandra.md +++ b/howto/setup-state-store/setup-cassandra.md @@ -97,5 +97,4 @@ kubectl apply -f cassandra.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Cassandra, replace the redis.yaml file with the cassandra.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-consul.md b/howto/setup-state-store/setup-consul.md index d7c51b2a7..4f8089fe6 100644 --- a/howto/setup-state-store/setup-consul.md +++ b/howto/setup-state-store/setup-consul.md @@ -88,5 +88,4 @@ kubectl apply -f consul.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Consul, replace the redis.yaml file with the consul.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-couchbase.md b/howto/setup-state-store/setup-couchbase.md index 1647b3a07..91108cc2f 100644 --- a/howto/setup-state-store/setup-couchbase.md +++ b/howto/setup-state-store/setup-couchbase.md @@ -60,5 +60,4 @@ kubectl apply -f couchbase.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Couchbase, replace the redis.yaml file with the couchbase.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-etcd.md b/howto/setup-state-store/setup-etcd.md index 51a4e4406..29e81f3ab 100644 --- a/howto/setup-state-store/setup-etcd.md +++ b/howto/setup-state-store/setup-etcd.md @@ -64,5 +64,4 @@ kubectl apply -f etcd.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use etcd, replace the redis.yaml file with the etcd.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-firestore.md b/howto/setup-state-store/setup-firestore.md index 3eda9f46d..7334f15d8 100644 --- a/howto/setup-state-store/setup-firestore.md +++ b/howto/setup-state-store/setup-firestore.md @@ -64,5 +64,4 @@ kubectl apply -f firestore.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Firestore, replace the redis.yaml file with firestore.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-hazelcast.md b/howto/setup-state-store/setup-hazelcast.md index a25bfe28b..390e840b5 100644 --- a/howto/setup-state-store/setup-hazelcast.md +++ b/howto/setup-state-store/setup-hazelcast.md @@ -50,5 +50,4 @@ kubectl apply -f hazelcast.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Hazelcast, replace the redis.yaml file with the hazelcast.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-memcached.md b/howto/setup-state-store/setup-memcached.md index 7667150a4..4ace58ede 100644 --- a/howto/setup-state-store/setup-memcached.md +++ b/howto/setup-state-store/setup-memcached.md @@ -63,5 +63,4 @@ kubectl apply -f memcached.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Memcached, replace the redis.yaml file with the memcached.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-mongodb.md b/howto/setup-state-store/setup-mongodb.md index 4d29e0860..05fde1c91 100644 --- a/howto/setup-state-store/setup-mongodb.md +++ b/howto/setup-state-store/setup-mongodb.md @@ -101,5 +101,4 @@ kubectl apply -f mongodb.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use MongoDB, replace the redis.yaml file with the mongodb.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-redis.md b/howto/setup-state-store/setup-redis.md index b748de8a5..046cd5bc6 100644 --- a/howto/setup-state-store/setup-redis.md +++ b/howto/setup-state-store/setup-redis.md @@ -90,4 +90,4 @@ kubectl apply -f redis.yaml ### Standalone -By default the Dapr CLI creates a local Redis instance when you run `dapr init`. When you run an app using `dapr run`, the component file will automatically be created for you in a `components` dir in your current working directory. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-sqlserver.md b/howto/setup-state-store/setup-sqlserver.md index ff226293d..f71aae7c7 100644 --- a/howto/setup-state-store/setup-sqlserver.md +++ b/howto/setup-state-store/setup-sqlserver.md @@ -76,5 +76,4 @@ kubectl apply -f sqlserver.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use SQL Server, replace the redis.yaml file with sqlserver.yaml file above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/setup-state-store/setup-zookeeper.md b/howto/setup-state-store/setup-zookeeper.md index fb44ed7ec..4e6ca70b8 100644 --- a/howto/setup-state-store/setup-zookeeper.md +++ b/howto/setup-state-store/setup-zookeeper.md @@ -68,5 +68,4 @@ kubectl apply -f zookeeper.yaml ### Running locally -The Dapr CLI will automatically create a directory named `components` in your current working directory with a Redis component. -To use Zookeeper, replace the redis.yaml file with the zookeeper.yaml above. +To run locally, create a `components` dir containing the YAML file and provide the path to the `dapr run` command with the flag `--components-path`. diff --git a/howto/trigger-app-with-input-binding/README.md b/howto/trigger-app-with-input-binding/README.md index 7085d87a5..c66946975 100644 --- a/howto/trigger-app-with-input-binding/README.md +++ b/howto/trigger-app-with-input-binding/README.md @@ -20,7 +20,8 @@ An input binding represents an event resource that Dapr uses to read events from For the purpose of this HowTo, we'll use a Kafka binding. You can find a list of the different binding specs [here](../../reference/specs/bindings/README.md). -Create the following YAML file, named binding.yaml, and save this to the /components sub-folder in your application directory: +Create the following YAML file, named binding.yaml, and save this to a `components` sub-folder in your application directory. +(Use the `--components-path` flag with `dapr run` to point to your custom components dir) *Note: When running in Kubernetes, apply this file to your cluster using `kubectl apply -f binding.yaml`* diff --git a/overview/README.md b/overview/README.md index be79c185d..c1f0188c6 100644 --- a/overview/README.md +++ b/overview/README.md @@ -80,7 +80,8 @@ Furthermore, Dapr can be integrated with any developer framework. For example, i Dapr can be configured to run on your local developer machine in [self hosted mode](../getting-started). Each running service has a Dapr runtime process (or sidecar) which is configured to use state stores, pub/sub, binding components and the other building blocks. -In self hosted mode, Redis running locally in a container, is installed as the both a default a state store and pub/sub message bus components. See the local Components folder for the yaml files. +In self hosted mode, Redis is running locally in a container and is configured to server as both the default state store and pub/sub. +After running `dapr init`, see the `$HOME/.dapr/components` directory (Mac/Linux) or `%USERPROFILE%\.dapr\components` on Windows. The `dapr-placement` service is responsible for managing the actor distribution scheme and key range settings. This service is only required if you are using Dapr actors. For more information on the actor `Placement` service read [actor overview](../concepts/actors). diff --git a/walkthroughs/daprrun.md b/walkthroughs/daprrun.md index 5c6bb3620..f42772942 100644 --- a/walkthroughs/daprrun.md +++ b/walkthroughs/daprrun.md @@ -7,7 +7,7 @@ Terminology used below: - Dapr CLI - the Dapr command line tool. The binary name is dapr (dapr.exe on Windows) - Dapr runtime - this runs alongside each app. The binary name is daprd (daprd.exe on Windows) -In self hosting mode, running `dapr init` copies the Dapr runtime onto your box and starts the placement service (used for actors) and Redis in containers. These must be present before running `dapr run`. The Dapr CLI also creates the default components directory which for Linux/MacOS is: `$HOME\.dapr\components` and for Windows: %USERPROFILE%\.dapr\components if it does not already exist. +In self hosting mode, running `dapr init` copies the Dapr runtime onto your box and starts the placement service (used for actors) and Redis in containers. These must be present before running `dapr run`. The Dapr CLI also creates the default components directory which for Linux/MacOS is: `$HOME/.dapr/components` and for Windows: `%USERPROFILE%\.dapr\components` if it does not already exist. What happens when `dapr run` is executed? @@ -15,11 +15,12 @@ What happens when `dapr run` is executed? dapr run --app-id nodeapp --app-port 3000 --port 3500 node app.js ``` -First, the Dapr CLI uses the default components directory to write two component files representing the default state store and the default pub/sub bus: `statestore.yaml` and `pubsub.yaml`, respectively. [Code](https://github.com/dapr/cli/blob/51b99a988c4d1545fdc04909d6308be121a7fe0c/pkg/standalone/run.go#L196-L266). +First, the Dapr CLI loads the components from the default directory (specified above) for the state store and pub/sub: `statestore.yaml` and `pubsub.yaml`, respectively. [Code](https://github.com/dapr/cli/blob/51b99a988c4d1545fdc04909d6308be121a7fe0c/pkg/standalone/run.go#L196-L266). -*Note as of this writing (Dec 2019) the names have been changed to `statestore.yaml` and `messagebus.yaml` in the master branch, but this change is not in the latest release, 0.3.0*. +You can either add components to the default directory or create your own `components` directory and provide the path to the CLI using the `--components-path` flag. -yaml files in components directory contains configuration for various Dapr components (e.g. statestore, pubsub, bindings etc.). The components must be created prior to using them with Dapr, for example, redis is launched as a container when running dapr init. If these component files already exist, they are not overwritten. This means you could overwrite `statestore.yaml`, which by default uses Redis, with a content for a different statestore (e.g. Mongo) and the latter would be what gets used. If you did this and ran `dapr run` again, the Dapr runtime would use the specified Mongo state store. +In order to switch components, simply replace or add the YAML files in the components directory and run `dapr run` again. +For example, by default Dapr will use the Redis state store in the default components dir. You can either override it with a different YAML, or supply your own components path. Then, the Dapr CLI will [launch](https://github.com/dapr/cli/blob/d585612185a4a525c05fb62b86e288ccad510006/pkg/standalone/run.go#L290) two proceses: the Dapr runtime and your app (in this sample `node app.js`).