Skip to main content

Create a solution

For easy setup and maintenance of a Taskurai resource, a solution file is created. This file can be maintained in source control and can be reapplied to update an existing resource or setup new resources.

Create your first solution file

When the Taskurai CLI is first started, an empty solution file is created in the current directory.

mkdir taskurai-tasks-sample
cd taskurai-tasks-sample
taskurai

Sample solution file:

taskurai-tasks-sample/Taskurai.yaml
options:
taskurai:
accountId: <account-id>
instanceId: <instance-id>
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

Next copy the installation information (account id and instance id) from your Taskurai setup in the solution file:

taskurai-tasks-sample/Taskurai.yaml
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

Testing your setup

To test if the setup of the solution is successful, try listing the current workers:

taskurai worker list
info

You need to use the Entra credentials, used to purchase the Taskurai subscription.

When the test is successful, you should see output similar to the following:

# Signed into Taskurai

Taskurai workers
└── Worker information
└── ╭────────┬────────────────────────┬──────────┬─────────────────╮
│ Worker │ Auto register Commands │ Commands │ Container image │
╰────────┴────────────────────────┴──────────┴─────────────────╯

Getting to know the CLI

To explore the usage of the Taskurai CLI and view the available commands and options, you can run the following statement:

taskurai --help

This will provide you with an overview of the CLI's capabilities and help you get started with using Taskurai effectively.