Aerospike

Detailed information on the Aerospike state store component

Component format

To setup Aerospike state store create a component of type state.Aerospike. See this guide on how to create and apply a state store configuration.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: <NAME>
  5. namespace: <NAMESPACE>
  6. spec:
  7. type: state.Aerospike
  8. version: v1
  9. metadata:
  10. - name: hosts
  11. value: <REPLACE-WITH-HOSTS> # Required. A comma delimited string of hosts. Example: "aerospike:3000,aerospike2:3000"
  12. - name: namespace
  13. value: <REPLACE-WITH-NAMESPACE> # Required. The aerospike namespace.
  14. - name: set
  15. value: <REPLACE-WITH-SET> # Optional

Warning

以上示例将 Secret 明文存储。 更推荐的方式是使用 Secret 组件, here

Spec metadata fields

字段RequiredDetailsExample
hostsYHost name/port of database server“localhost:3000”, “aerospike:3000,aerospike2:3000”
namespaceYThe Aerospike namespace“namespace”
setNThe setName in the database“myset”

Setup Aerospike

You can run Aerospike locally using Docker:

  1. docker run -d --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike

You can then interact with the server using localhost:3000.

The easiest way to install Aerospike on Kubernetes is by using the Helm chart:

  1. helm repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
  2. helm install --name my-aerospike --namespace aerospike stable/aerospike

This installs Aerospike into the aerospike namespace. To interact with Aerospike, find the service with: kubectl get svc aerospike -n aerospike.

For example, if installing using the example above, the Aerospike host address would be:

aerospike-my-aerospike.aerospike.svc.cluster.local:3000

相关链接

Last modified January 1, 0001