5.2. Installing in Domain Mode
The Domain mode is for multiple server instances. It requires load balancing capable for handling TCP for JDBC connections. (Apache will not work in this case.)
When you have more than one Red Hat JBoss EAP instance in your server farm and you start them all in domain mode, all of the configuration options for this server farm can be centrally managed. For example, you can deploy an artifact or create a data source across all the instances, with one single CLI-based call. Red Hat JBoss Data Virtualization extends this configuration concept to allow you to deploy your VDBs and translators across the whole server farm.
When domain mode is combined with the HA (high availability) profile, you can cluster the Red Hat JBoss Data Virtualization server instances that are deployed. (The HA profile is set as the default in the
domain.xml
file.) When you start the server using the domain.xml
file, the distributed caching that is used for ResultSet caching and Internal Materialized caching is automatically configured. You use the Admin API the same way in both the standalone mode and the domain mode.
When multiple Red Hat JBoss Data Virtualization instances are available in a cluster, you can make use load balancing and fail-over features.
You must create a server group, then create a server and then deploy all the available resources to the server group you have created.
The following instructions teach you how to install a systemd service on Linux. For other use cases, please refer to https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/6.4/html-single/administration_and_configuration_guide/index.
- To start the server in "Domain" mode, install Red Hat JBoss Data Virtualization on all the servers that are going to be part of the cluster. Select one of the servers as the "master" domain controller. (The rest of the servers will be slaves that connect to the "master" domain controller for all the administrative operations.)
- On the domain controller, copy the
domain-controller/init.d
directory toJBOSS_HOME/bin
. - On the host controller, copy the
host-controller/init.d
directory toJBOSS_HOME/bin
. - Prepare the directory structure:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the domain:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the host controller:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Add this Red Hat JBoss Data Virtualization script to systemd:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Configure the firewall ports on both hosts:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow firewall-cmd --zone=public --add-service=jboss-data-virtualization firewall-cmd --permanent --zone=public --add-service=jboss-data-virtualization firewall-cmd --zone=public --list-services firewall-cmd --permanent --zone=public --list-services
firewall-cmd --zone=public --add-service=jboss-data-virtualization firewall-cmd --permanent --zone=public --add-service=jboss-data-virtualization firewall-cmd --zone=public --list-services firewall-cmd --permanent --zone=public --list-services
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you are using port offsets, adjust the values by adding the offset. - Once you have configured all the servers, start the "master" node:
/bin/domain.sh
/bin/domain.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Start the "slave" nodes:
/bin/domain.sh
/bin/domain.sh
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The slave nodes fetch their domain configuration settings from the "master" node. - Once VDBs have been deployed, users can connect their JDBC applications to Red Hat JBoss Data Virtualization.
- You can enable Red Hat JBoss Data Virtualization as a service with the operating system, using this command:
systemctl enable jboss-data-virtualization
systemctl enable jboss-data-virtualization
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You can now start the service like this:systemctl start jdv
systemctl start jdv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To stop it, run this command:systemctl stop jdv
systemctl stop jdv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow To restart, run this command:systemctl restart jdv
systemctl restart jdv
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Note
Teiid Designer cannot connect to the Red Hat JBoss Data Virtualization Server in "domain" mode. Red Hat recommends using other types of deployment strategies (such as CLI or web-console) for deploying and testing, as it is expected you will be using domain mode in production environments. Teiid Designer is to aid development-time activities only and should only be used in testing environments.