Skip to main content

Creating a hub

Compute and state storage is deployed in your own Azure Subscription. This section will guide you to setup a Taskurai Hub.

Registering a new hub

Solution file

The first step is to deploy a new hub to the Taskurai instance. In the sample configuration file, a hub named DefaultHub is already defined by default:

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
environment:
- name: accountName
secretReference:
value: default
- name: storageTier
secretReference:
value: Standard_LRS
- name: containerName
secretReference:
value: default
hub: DefaultHub

Deploying the hub configuration

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

taskurai hub deploy
info

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

The result of this operation will return information that is needed in the next step:

DefaultHub                
└── General hub DefaultHub
└── ╭─────────────┬───────────────────────────────╮
│ Setting │ Value │
├─────────────┼───────────────────────────────┤
│ Name │ DefaultHub │
│ Description │ Default Compute and State Hub │
│ Type │ External │
│ Kind │ AzureManagedHub │
╰─────────────┴───────────────────────────────╯


Hub not paired yet, please install a new Taskurai Hub in your Azure Subscription using the following pairing data:

Account Id:
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Instance Id:
XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

Hub Name:
DefaultHub

Pairing Code:
Yzk2MzNmSTktOGMmMi00YTBlLThhYzkgMTM5MGIwNjEwNmQ4NTQyNjc

Deployment

The Taskurai Hub application can be deployed in your own subscription of choice. Updates and patches are automatically applied to the installed resources in your subscriptions.

Prerequisites

To proceed with the Taskurai Hub setup, you will need the following:

  • An active Azure account with an active subscription. If you don't have one, you can create an account.
  • Azure CLI
  • Ensure that the required Resource Providers are registered.

Overview of required Resource Providers

  • Microsoft.App
  • Microsoft.Authorization
  • Microsoft.ContainerService
  • Microsoft.DocumentDB
  • Microsoft.Insights
  • Microsoft.KeyVault
  • Microsoft.Network
  • Microsoft.OperationalInsights
  • Microsoft.Resources
  • Microsoft.Solutions
  • Microsoft.Storage

To register the required resource providers, run the following steps using Azure CLI:

  1. Sign in to Azure
az login
  1. If you have more than one subscription, set the active subscription:
az account set --subscription XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  1. To see a list of installed resource providers, run the az provider list command:
az provider list --query "sort_by([?registrationState=='Registered'].{Provider:namespace, Status:registrationState}, &Provider)" --out table
  1. Run the az provider register command for each missing resource provider:
az provider register --namespace Microsoft.App

Creating a Taskurai Hub

warning

Please note that the Hub region should be the same as the Taskurai Instance region.

  1. Install a Taskurai Hub resource:
  2. Create a new resource group, e.g.: rg-taskurai
  3. Select the region where the Taskurai Hub resource should be deployed, e.g.: West Europe
  4. Choose an application name, e.g.: TaskuraiHub
  5. Enter the account id, instance id, hub name and pairing code from the previous step.
  6. Confirm settings and create the resource.
  7. You will be notified by e-mail, once the Hub is deployed and successfully paired with the Taskurai instance.
info

An installation of Taskurai takes an average of 5 to 30 minutes.

Testing your setup

To verify that the hub has been successfully paired with your Taskurai instance, use the following command:

taskurai hub show --name DefaultHub

When the deployment and pairing is successful, you should see output similar to the following:

# Signed into Taskurai

DefaultHub
└── General
└── ╭──────────────┬─────────────────────────────────────────────────────────╮
│ Setting │ Value │
├──────────────┼─────────────────────────────────────────────────────────┤
│ Account Id │ XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX │
│ Instance Id │ XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX │
│ Name │ DefaultHub │
│ Description │ Default Compute and State Hub │
│ Type │ External │
│ Kind │ AzureManagedHub │
│ Paired │ true
│ Pairing Code │ Yzk2MzNmSTktOGMmMi00YTBlLThhYzkgMTM5MGIwNjEwNmQ4NTQyNjc │
╰──────────────┴─────────────────────────────────────────────────────────╯