The "REST" HQS Tasks Backend
The REST backend will execute tasks in the cloud. The client will communicate with HQS Core hosted in the HQS Cloud, and tasks are running on machines provisioned on demand.
Prerequisites
To authenticate with the cloud, the client needs credentials. These are pulled from your HQStage configuration. For that, you need to have HQStage installed and initialized with a token with appropriate permissions.
If you are new to HQStage, please continue reading the following three steps.
If you already have HQStage set up, please repeat the steps 1 and 3 (create a new token with the additional permissions and re-initialize HQStage with that new token).
1. Account and Token on HQS Cloud
Before visiting the linked documentation, please be aware that we need different permissions than described in the linked article.
Create an account on HQS Cloud. Then, create a token as described in the "Account and Token" page of the HQStage main documentation. However, the token also needs the read and write permissions for the task_execution resource, besides the read permission for license.
2. Install HQStage
To install the HQStage tooling, we refer to the HQStage installation guide.
3. Initialize HQStage
Then, run hqstage init as described in the Basic usage guide and provide the above created token when being asked for it.
Configuration
To use this backend, add the following basic configuration to your client script.
from hqs_tasks_execution.config import global_config, BackendConfigurationREST
global_config.backend = BackendConfigurationREST()
This tells the HQS Tasks execution client to
- use the REST backend, and
- use the default settings provided by the HQStage configuration (technically, you can specify sub-parameters in the constructor call, but none of these are intended to be set by end-users and therefore are currently not documented here).
Cloud Database
This backend not only provides you with the power of running tasks on a variety of hardware machines utilizing the AWS cloud, but will also keep a copy of all tasks (inputs, outputs, state, etc.) in a cloud database.
Of course, all data is scoped to the user, so you can only access your own data, and no other user will be able to access it.
For end-users, we have created two ways for accessing the database:
- In the HQS Cloud web UI, available in the menu as Tasks Dashboard.
- A Python client which is currently under development and not released yet.