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.
  1. 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.)
  2. On the domain controller, copy the domain-controller/init.d directory to JBOSS_HOME/bin.
  3. On the host controller, copy the host-controller/init.d directory to JBOSS_HOME/bin.
  4. Prepare the directory structure:
    adduser jboss
    mkdir /opt/jdv
    mkdir /etc/jboss-as
    mkdir /var/log/jboss
    mkdir /var/run/jboss
    chown -R jboss: /opt/jdv
    chown -R jboss: /etc/jboss-as
    chown -R jboss: /var/log/jboss
    chown -R jboss: /var/run/jboss
    
  5. Configure the domain:
    cat > /etc/jboss-as/jboss-as.conf <<EOF
    JBOSS_HOME=/opt/jdv/jboss-data-virtualization
    JBOSS_PIDFILE=/var/run/jboss/jboss-as-domain.pid
    JBOSS_HOST_CONFIG=host.xml
    JBOSS_ADDRESS_MANAGEMENT=10.255.0.82
    JBOSS_USER=jboss
    JBOSS_CONSOLE_LOG=/var/log/jboss/console.log
    EOF
    
  6. Configure the host controller:
    cat > /etc/jboss-as/jboss-as.conf <<EOF
    JBOSS_HOME=/opt/jdv/jboss-data-virtualization
    JBOSS_PIDFILE=/var/run/jboss/jboss-as-domain.pid
    JBOSS_HOST_CONFIG=host-slave.xml
    JBOSS_MASTER_ADDRESS=10.255.0.82
    JBOSS_PUBLIC_ADDRESS=10.255.0.83
    JBOSS_USER=jboss
    JBOSS_CONSOLE_LOG=/var/log/jboss/console.log
    EOF
    
  7. Add this Red Hat JBoss Data Virtualization script to systemd:
    JBOSS_HOME=/opt/jdv/jboss-data-virtualization
    cat > /tmp/teste <<EOF
    [Unit]
    Description=JBoss Data Virtualization Systemctl script
    After=NetworkManager.service
    [Service]
    Type=forking
    ExecStart=$JBOSS_HOME/bin/init.d/jboss-as-domain.sh start
    ExecStop=$JBOSS_HOME/bin/init.d/jboss-as-domain.sh stop
    ExecReload=$JBOSS_HOME/bin/init.d/jboss-as-domain.sh restart
    PIDFile=/var/run/jboss/jboss-as-domain.pid
    [Install]
    WantedBy=multi-user.target
    EOF
    
  8. Configure the firewall ports on both hosts:
    cat > /etc/firewalld/services/jboss-data-virtualization.xml
    <?xml version="1.0" encoding="utf-8"?>
    <service version="1.0">
        <short>jboss-data-virtualization</short>
        <port port="31000" protocol="tcp"/>
        <port port="8080" protocol="tcp"/>
        <port port="8443" protocol="udp"/>
        <port port="8009" protocol="tcp"/>
        <port port="4447" protocol="tcp"/>
        <port port="9990" protocol="udp"/>
        <port port="9999" protocol="tcp"/>
    </service>
    EOF
    
    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
    
    If you are using port offsets, adjust the values by adding the offset.
  9. Once you have configured all the servers, start the "master" node:
    /bin/domain.sh
  10. Start the "slave" nodes:
    /bin/domain.sh
    The slave nodes fetch their domain configuration settings from the "master" node.
  11. Once VDBs have been deployed, users can connect their JDBC applications to Red Hat JBoss Data Virtualization.
  12. You can enable Red Hat JBoss Data Virtualization as a service with the operating system, using this command:
    systemctl enable jboss-data-virtualization
    
    You can now start the service like this:
    systemctl start jdv
    
    To stop it, run this command:
    systemctl stop jdv
    
    To restart, run this command:
    systemctl restart jdv
    

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.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.