Create a DW Service Unit
This topic describes how to create a DW service unit on the Relyt global console or by using a Terraform script.
Creating a DW service unit also requires creating its default Hybrid DPS cluster.
Use the Relyt global console to create a DW service unit
The following procedure describes how to create a DW service unit and its default Hybrid DPS cluster on Relyt global console.
-
Sign in to your data cloud as a cloud account with the
SYSTEMADMIN
system role.If you sign in as the main account, click the role next to your account name, and switch the system role from
ACCOUNTADMIN
toSYSTEMADMIN
. This is because onlySYSTEMADMIN
has the privileges to create DW service units. For details about system roles, see Introduction to Cloud Accounts and System Roles. -
Choose DW Service Units from the top navigation bar, and click + Service Unit.
-
On the Create Service Unit page, select the edition, cloud provider, and region for the DW service unit, and then click Continue.
The following table describes the related parameters.
Parameter Required Description Edition Yes It is fixed to Standard. Cloud Provider Yes The cloud provider that provides the cloud computing resources to power the DW service unit. Region Yes The region to which the DW service unit will be deployed.
-
Set the domain name and alias for the DW service unit, and click Continue.
The following table describes the related parameters.
Parameter Required Description Domain Name Yes The custom part in the complete domain name of the DW service unit.
A complete domain name is in the<Custom Part>
.data.cloud format. The custom part must be 4 to 32 characters in length, start with a letter, and contain only letters, digits, and hyphens (-).Alias No The alias of the DW service unit. It should be short and distinguishable.
-
Create the default Hybrid DPS cluster for the DW service unit.
The following table describes the related parameters.
Parameter Required Description Name Yes The name of the Hybrid DPS cluster. It must start with a letter, and can contain only letters, digits, and hyphens (-). It must be 4 to 32 characters in length. Size Yes The size of the Hybrid DPS cluster. Description No The description of the Hybrid DPS cluster.
-
Click Finish.
Use a Terraform script to create a DW service unit
This section describes how to run a Terraform script to automatically create a DW service unit and its default Hybrid DPS cluster. To use the script, ensure you have obtained the API key that allows you to call Relyt Open API operations.
To obtain an API key, sign in to your Relyt console, choose API Keys from the top navigation bar, and click + API Key to create one.
-
Download the latest Terraform script.
Following is a code snippet example from the module for creating DW service units. Configure the parameters according to your needs.
terraform {
required_providers {
relyt = {
source = "relytcloud/relyt"
}
}
}
provider "relyt" {
role = "SYSTEMADMIN"
# resource_check_timeout = 30
}
resource "relyt_dwsu" "dwsu" {
cloud = "<cloud_provider>"
region = "<region_name>"
domain = "<dwsu_domain>"
alias = "<dwsu_alias>"
default_dps = {
name = "<hdps_name>"
description = "<hdps_description>"
engine = "hybrid"
size = "<hdps_size>"
}
}Field description:
Field Description source
The name of the Relyt plugin. It is fixed to relytcloud/relyt
.role
The system role of your Relyt cloud account. It is fixed to SYSTEMADMIN
.cloud
The name of the cloud provider. Set it to aws
.region
The region where the DW service unit will be deployed. domain
The domain name of the DW service unit. alias
The alias of the DW service unit. name
The name of the default Hybrid DPS cluster in the DW service unit. description
The description of the default Hybrid DPS cluster in the DW service unit. It is optional. engine
The engine type of the Hybrid DPS cluster. It is fixed to hybrid
.size
The size of the Hybrid DPS cluster. Possible values are S
,S.1
,M
, and2XL
.
-
Run the following command to export the auth key.
export RELYT_AUTH_KEY="<api_key>"
Replace
<api_key>
with the API key you have obtained. -
Run the following command to initialize the Terraform working directory.
terraform init
The operation is successful when similar information appears as shown in the following picture.
-
Run the following command to apply the module.
terraform apply --target=module.dwsu
-
When information similar to the following is displayed, enter
yes
.
After the DW service unit and the Hybrid DPS cluster are created, you can check them on the Relyt console.