Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 5. Launching non-clustered managed domain

download PDF

5.1. Launching a non-clustered instance to serve as a domain controller

This topic lists the steps to launch a non-clustered JBoss EAP managed domain on a Red Hat Amazon Machine Image (AMI) created through a private AMI or public Marketplace listing.

Prerequisite

Note

You can connect to an EC2 instance through ssh as the ec2-user user. If you need administrative privileges, you can change to root user later. For example,

$ ssh -l ec2-user ${INSTANCE_PUBLIC_IP}
...
$ sudo su -

Procedure

  1. Launch the Red Hat AMI instance.

    A non-clustered instance of JBoss EAP has been configured and launched on a Red Hat AMI.

Note
  • For complex configuration, you can either use the domain.conf file in the JBoss EAP bin directory: /opt/rh/eap8/root/usr/share/wildfly/bin/, or you can start the JBoss EAP service and configure the server using the management CLI. The script can be found in the bin directory. Then, reload the configuration.
  • You must regularly run the yum -y update to apply security fixes and enhancements.
  1. Start JBoss EAP using the following command:

    $ systemctl start eap8-domain
  2. Stop JBoss EAP using the following command:

    $ systemctl stop eap8-domain
    Note

    If you want to bind JBoss EAP to a different IP address, add the following line in the /etc/opt/rh/eap8/wildfly/eap8-domain.conf file on RHEL 9. The internal IP address is translated into a public IP address by EC2.

    WILDFLY_BIND=$YOUR_PRIVATE_IP_ADDRESS

5.2. Launch one or more instances to serve as host controllers

This topic lists the steps to launch one or more instances of JBoss EAP to serve as non-clustered host controllers on a Red Hat AMI.

Configure and launch the non-clustered domain controller. Refer to Launch an Instance to Serve as a Domain Controller.

For Domain Controller Instance

For a managed domain running on Amazon EC2, in addition to static domain controller discovery, host controllers can dynamically discover a domain controller using the Amazon Simple Storage (Amazon S3) system. In particular, host controllers and the domain controller can be configured with information needed to access an Amazon S3 bucket.

Using this configuration, when a domain controller is started, it writes its contact information to an S3 file in the bucket. Whenever a host controller attempts to contact the domain controller, it gets the domain controller’s contact information from the S3 file.

For example, it is common for an Amazon EC2 instance’s IP address to change when it is stopped and started. In this scenario, if the domain controller’s contact information changes, the host controllers need not be reconfigured. The host controllers are able to get the domain controller’s new contact information from the S3 file.

The manual domain controller discovery configuration is specified using the following properties:

  • access-key: The Amazon AWS user account access key.
  • secret-access-key: The Amazon AWS user account secret access key.
  • location: The Amazon S3 bucket to be used.

    1. Copy the domain-ec2.xml file from /opt/rh/eap8/root/usr/share/wildfly/docs/examples/configs to the JBoss EAP configuration directory.
    2. Set the following variables in the appropriate service configuration file:

      WILDFLY_SERVER_CONFIG=domain-ec2.xml
      WILDFLY_HOST_CONFIG=host-master.xml
    3. Add the S3 domain controller discovery configuration to the domain-ec2.xml file:

      <local>
          <discovery-options>
              <discovery-option name="s3-discovery" module="org.jboss.as.host-controller" code="org.jboss.as.host.controller.discovery.S3Discovery">
                  <property name="access-key" value="S3_ACCESS_KEY"/>
                  <property name="secret-access-key" value="S3_SECRET_ACCESS_KEY"/>
                  <property name="location" value="S3_BUCKET_NAME"/>
              </discovery-option>
          </discovery-options>
      </local>
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.