Connecting all your data sources to a central DataVirtuality instance can be challenging when your infrastructure is distributed across multiple networks. Your data sources might not be reachable if you host your DataVirtuality instance in another network. A common practice is to create an SSH tunnel through a bastion host that enables connecting to internal hosts.
Until now, you needed to maintain this tunnel on the DataVirtuality server's operating system level using tools such as autossh. We now implemented support for SSH tunnels directly in DataVirtuality for both Windows and Linux servers making additional tools obsolete.
Let's look at an example for implementing the scenario pictured above. Using plain SSH you might have used a command similar to
autossh -M 0 -N firstname.lastname@example.org -L 3306:internal-dbms:3306 for creating a tunnel. The same tunnel can be created in DataVirtuality using plain SQL:
CALL "SYSADMIN_VDB.createSSHTunnel"( "name" => 'unique_name_of_your_tunnel', "localHost" => 'localhost', "localPort" => 3306, "remoteHost" => 'internal-dbms', "remotePort" => 3306, "host" => 'email@example.com', "sshPort" => 22, "privateKeyPath" => '/home/datavirtuality/.ssh/private.key' );;
Now you can connect to the tunneled MySQL data source by connecting to
localhost:3306 when creating a new data source in DataVirtuality.
To monitor the state of your SSH tunnel you may query
This feature is available since DataVirtuality 2.0.37.
Please sign in to leave a comment.