Setting up HVR Hub from CLI
This section describes the steps to set up a HVR Hub System from the Command Line Interface (CLI), which includes specifying the connection details for the repository database, adding the license, configuring the hub system encryption wallet, creating a hub, creating the user(s) for accessing and operating HVR. Alternatively, you can also perform the hub system setup from a browser (UI). For more information, see Setting up HVR Hub from Browser.
Prerequisites
Following are the prerequisites for setting up the HVR Hub System:
Create a repository database before proceeding with the hub system setup. For the list of DBMSs supported as repository database, see section Repository Database in Capabilities. For the access privileges, and other configuration required for using the supported DBMS as repository database, see section Hub Repository Database Requirements. For example, an Oracle database can serve as a repository database.
Sample SQL statements to create a repository database in Oracle.
create user fivetran_demo identified by fivetran default tablespace users temporary tablespace temp quota unlimited on users;
Configure the privileges for the Oracle repository:
grant create session to fivetran_demo; grant create table to fivetran_demo; grant create trigger to fivetran_demo; grant create procedure to fivetran_demo; grant execute on dbms_alert to fivetran_demo;
- One of the following:
- For registering the HVR Hub System with a Fivetran account (Consumption-based Pricing), the web browser must have access to fivetran.com (35.236.237.87). Only Fivetran accounts with the Account Administrator role can register a hub system.
- For adding the HVR license manually (Usage-based Subscription), the license file (.lic) must be available on your system.
Setting Up HVR Hub System
Perform the following steps to set up the HVR Hub System in CLI:
Configure the hub server properties by using the command hvrhubserverconfig. You need to specify the parameters required for connecting the HVR Hub System to the DBMS where the hub repository resides.
hvrhubserverconfig set_hub_server_properties
Example configuration for all supported hub repository databases
For safety reasons, it is recommended to use @prompt for supplying password on the command line.
Aurora MySQL
hvrhubserverconfig HTTP_Port=4340 Repository_Class=mysql Repository_Class_Flavor=aurora_my Database_Host=hvr6-instance-1.xyzabc5w.eu-central-1.rds.amazonaws.com Database_Port=3306 Database_Name=repository_db Database_User=repository_db_user Database_Password=@prompt
Aurora PostgreSQL
hvrhubserverconfig HTTP_Port=4340 Repository_Class=postgresql Repository_Class_Flavor=aurora_pq Database_Host=hvr6-instance-1.xyzabc5w.eu-central-1.rds.amazonaws.com Database_Port=5432 Database_Name=repository_db Database_User=repository_db_user Database_Password=@prompt
Azure SQL Database
hvrhubserverconfig HTTP_Port=4340 Repository_Class=sqlserver Repository_Class_Flavor=azure SqlServer_Server=reposserver.database.windows.net Database_Name=repository_db Database_User=repository_db_user Database_Password=@prompt ODBC_Driver=ODBC Driver 17 for SQL Server
Db2 for Linux, Unix, and Windows
hvrhubserverconfig HTTP_Port=4340 Repository_Class=db2 Db2_DB2INSTANCE=db2inst Db2_INSTHOME=/db2/105 Database_Name=repository_db Database_User=repository_db_user Database_Password=@prompt
MariaDB
hvrhubserverconfig HTTP_Port=4340 Repository_Class=mysql Repository_Class_Flavor=mariadb Database_Host=mariadbserver Database_Port=4104 Database_Name=repository_db Database_User=repository_db_user Database_Password=@prompt
MySQL
hvrhubserverconfig HTTP_Port=4340 Repository_Class=mysql Repository_Class_Flavor=mariadb Database_Host=mysqlserver Database_Port=4104 Database_Name=repository_db Database_User=repository_db_user Database_Password=@prompt
Oracle
hvrhubserverconfig HTTP_Port=4340 Repository_Class=oracle Oracle_Home=/oracle/1800 Oracle_SID=ORA1800 Database_User=repository_db_user Database_Password=@prompt
PostgreSQL
hvrhubserverconfig HTTP_Port=4340 Repository_Class=postgresql Database_Host=postgresserver Database_Port=5435 PostgreSQL_Pglib=/postgres/95/lib Database_Name=repository_db Database_User=repository_db_user Database_Password=@prompt
SQL Server
hvrhubserverconfig HTTP_Port=4340 Repository_Class=sqlserver SqlServer_Server=MYSERVER\FIVETRAN2016 Database_Name=repository_db Database_User=repository_db_user Database_Password=@prompt ODBC_Driver=ODBC Driver 17 for SQL Server
Create the repository tables by using the command hvrreposconfig:
hvrreposconfig -c
Supply the license by using the command hvrlicense. The license for HVR must be supplied either by registering the hub system with a Fivetran account (for consumption-based license) or by manually adding the license file (for subscription-based license). For more information on our licenses, see section Licensing.
Since v6.1.0/3
Run the command hvrlicense to register with Fivetran account:
hvrlicense -r
Sample output:
hvrlicense: Fivetran 6.1.0/21 (linux_glibc2.17-x64-64bit) To register this Hub System with a Fivetran Account open: https://fivetran.com/register-hvr?fingerprint=Z117171&port=4343&cli=1 Additional commands will be provided at the end of the registration.
Open the URL mentioned in the output of the above command in a web browser.
For registering the HVR Hub system with a Fivetran account, the web browser must have access to fivetran.com (35.236.237.87).
- If you already have a Fivetran account,
- Log in to Fivetran account using your Fivetran login credentials.
- In the Complete registration dialog, click Continue to HVR. You will be redirected back into the HVR Hub System setup dialog. The current hub system will get registered and Fivetran will send the license to the hub system.
- If you do not have a Fivetran account,
- Specify the user and company details in the registration form. All fields are mandatory.
- Click Sign up.
- You will receive an email from Fivetran to confirm your email address. In this verification email, click Verify your Account.
- In the Complete registration dialog, click Continue to HVR. The commands that needs to be executed next are displayed in the Complete registration dialog. Sample output:
- If you already have a Fivetran account,
Set the repository properties Account_Id, Registration_Id, and Registration_Access_Key by using the command hvrreposconfig:
hvrreposconfig Account_Id=account_id Registration_Id=registration_id Registration_Access_Key=access_key
You can copy-paste this command from the Complete registration dialog (in previous step).
Acquire/fetch the license for the hub system from Fivetran by using the command hvrlicense:
hvrlicense -A
Create a hub user to access and manage the HVR Hub System by using the command hvruserconfig:
hvruserconfig -c [-Aauth] user_name
Supply a password for the user when prompted.
The authentication method for the hub user can be defined using the option
-A
in command hvruserconfig. If option-A
is not supplied, the hub user will be created with the local authentication.The available authentication methods are:
- Local
- PAM
- Plugin
- Windows
Command syntax for defining the user authentication method
To create a hub user with Local authentication:
hvruserconfig -c -A local user_name
Supply a password for the hub user when prompted.
The minimum password length for Local user is 10 characters.
To create a hub user with PAM authentication:
hvruserconfig -c -A pam user_name
The
default
PAM authentication service used is login. To use a different PAM service, you must set the repository property PAM_Service using the command hvrreposconfig.hvrreposconfig PAM_Service=PAM_service_name
To create a hub user with Plugin authentication:
hvruserconfig -c -A plugin user_name
- To create a hub user with Windows authentication:
hvruserconfig -c -A windows user_name
Grant the required permission to the new user by using the command hvrreposconfig:
For example, to grant SysAdmin privilege to the new user myadminuser:
hvrreposconfig -A user:myadminuser=SysAdmin
Since 6.1.5/2, the following command should be used, as
-A
option is deprecated.hvrreposconfig User_Access.myadminuser.sysadmin=true
Configure the HVR Hub System encryption wallet. It is mandatory to configure one of the following:
Disabled wallet: Wallet/password encryption is disabled. When wallet is disabled, all user passwords in HVR are obfuscated using a password obfuscation method and stored in the repository database.
For this, configure a wallet with Type set to DISABLED by using the command hvrwalletconfig:hvrwalletconfig -c Type=DISABLED
Software wallet: Use Software wallet for password encryption. When Software wallet is used, all user passwords in HVR are encrypted using a random key and stored in the repository database.
For this, configure a wallet with Type set to SOFTWARE by using the command hvrwalletconfig:hvrwalletconfig -c -p Type=SOFTWARE Auto_Open=true
Create a hub (e.g. myhub) by using the command hvrhubconfig:
hvrhubconfig -c hubname Description="Hub for production"
Start the HVR Hub Server by using the command hvrhubserver:
hvrhubserver
Sample Output:
2021-03-23T11:22:16+01:00: hvrhubserver: Fivetran 6.1.0/21 (linux_glibc2.17-x64-64bit) 2021-03-23T11:22:16+01:00: hvrhubserver: Listening on http://mynode:4340/ 2021-03-23T11:22:16+01:00: hvrhubserver: Frontend on http://mynode:4340/#/hubs/myhub 2021-03-23T11:22:16+01:00: hvrhubserver: Connected to repository: Oracle SID 'ORA1800' with user 'hubuser'.
In the web browser, connect to the URL shown (e.g. http://mynode:4340/) in the output of the previous step. In the Login page, supply the username and password (created during setup).