Deploying state stores
In this section, you'll learn how to set up an internal state store.
Prerequisites
- A Taskurai installation (Taskurai instance, Taskurai CLI, ...). See Taskurai Setup.
Setup the configuration file
- Navigate to the folder containing the taskurai.yaml configuration file or create a new file using the
taskuraiCLI command:
taskurai
- Copy the installation information from your Taskurai setup to the solution file:
options:
taskurai:
accountId: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
instanceId: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
deployment:
deploySecrets: false
state:
defaultStateStore: DefaultStateStore
hubs:
DefaultHub:
description: Default Compute and State Hub
type: External
kind: AzureManagedHub
stateStores:
DefaultStateStore:
type: DefaultStateStore
kind: Dedicated
hub: DefaultHub
environment:
- name: accountName
secretReference:
value: default
- name: storageTier
secretReference:
value: Standard_LRS
- name: containerName
secretReference:
value: default
Deploy state store to Taskurai
Next, deploy the state store to Taskurai using the CLI:
taskurai statestore deploy
The number and kind of supported state stores is depending on your Taskurai plan.
Testing your setup
To verify that the state store has been successfully deployed to Taskurai, use the following command:
taskurai statestores show --name DefaultStateStore
When the deployment is successful, you should see output similar to the following:
# Signed into Taskurai
DefaultStateStore
├── General
│ └── ╭────────────────────┬───────────────────╮
│ │ Setting │ Value │
│ ├────────────────────┼───────────────────┤
│ │ Name │ DefaultStateStore │
│ │ Type │ DefaultStateStore │
│ │ Kind │ Dedicated │
│ │ Provisioning State │ Succeeded │
│ │ Hub │ DefaultHub │
│ ╰────────────────────┴───────────────────╯
├── Secrets
│ └── ╭─────────╮
│ │ Secrets │
│ ╰─────────╯
├── Environment
│ └── ╭───────────────┬─────────────────┬──────────────╮
│ │ Name │ SecretReference │ Value │
│ ├───────────────┼─────────────────┼──────────────┤
│ │ accountName │ null │ default │
│ │ storageTier │ null │ Standard_LRS │
│ │ containerName │ null │ default │
│ ╰───────────────┴─────────────────┴──────────────╯
└── Scopes
└── ╭────────╮
│ Scopes │
╰────────╯
That's it! You have successfully deployed a state store to Taskurai.
Advanced setup
Dedicated states store can be configured to either share or have dedicated database and storage accounts. Dedicated state stores support standard or premium storage accounts.
In this example, the first two state store share a database and storage account:
ConfigState: Shared standard storage accountcustomwith tierStandard_LRS. The nameconfigstateis used for the database and storage container name.TranscriptionsState: Shared standard storage accountcustomwith tierStandard_LRS. The nametranscriptionsstateis used for the database and storage container name.
The last two state stores have a dedicated database and premium storage account:
AudioState: Premium storage accountpremiumawith tierPremium_ZRS. The namepremiumaudiois used for the database and storage container name.VideoState: Shared standard storage accountpremiumvwith tierPremium_ZRS. The namepremiumvideois used for the database and storage container name.
stateStores:
ConfigState:
type: DefaultStateStore
kind: Dedicated
hub: DefaultHub
environment:
- name: accountName
value: custom
- name: storageTier
value: Standard_LRS
- name: containerName
value: configstate
TranscriptionsState:
type: DefaultStateStore
kind: Dedicated
hub: DefaultHub
environment:
- name: accountName
value: custom
- name: storageTier
value: Standard_LRS
- name: containerName
value: transcriptionsstate
AudioState:
type: DefaultStateStore
kind: Dedicated
hub: DefaultHub
environment:
- name: accountName
value: premiuma
- name: storageTier
value: Premium_ZRS
- name: containerName
value: premiumaudio
VideoState:
type: DefaultStateStore
kind: Dedicated
hub: DefaultHub
environment:
- name: accountName
value: premiumv
- name: storageTier
value: Premium_ZRS
- name: containerName
value: premiumvideo
More information
Read the section State store configuration to learn more about the configuration options.