Este conteúdo não está disponível no idioma selecionado.
Chapter 4. Launching non-clustered managed domain
4.1. Launch an Instance to Serve as a Domain Controller Copiar o linkLink copiado para a área de transferência!
This topic lists the steps to launch a non-clustered JBoss EAP managed domain on a Red Hat Amazon Machine Image (AMI).
Prerequisite
- A suitable Red Hat AMI. See Supported Red Hat AMIs for more information.
Launch a Non-Clustered JBoss EAP Instance
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 -
$ ssh -l ec2-user ${INSTANCE_PUBLIC_IP}
...
$ sudo su -
Launch the Red Hat AMI instance.
A non-clustered instance of JBoss EAP has been configured and launched on a Red Hat AMI.
To configure JBoss EAP, you can pass arguments to the service directly. Some arguments may not be handled in this way. The location of the service configuration files is:
-
RHEL 6:
/etc/sysconfig/eap7-domain -
RHEL 7:
/etc/opt/rh/eap7/wildfly/eap7-domain.conf
-
RHEL 6:
See System Paths for more details about system paths.
See Configuring JBoss EAP Subsystems to Work on Cloud Platforms for information about configuring JBoss EAP subsystems for Amazon EC2.
-
For complex configuration, you can either use the
domain.conffile in the JBoss EAPbindirectory:/opt/rh/eap7/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 thebindirectory. Then, reload the configuration. -
You must regularly run the
yum -y updateto apply security fixes and enhancements.
To start JBoss EAP on RHEL 6, run the following command:
service eap7-domain start
$ service eap7-domain startCopy to Clipboard Copied! Toggle word wrap Toggle overflow To start JBoss EAP on RHEL 7, run the following command:
systemctl start eap7-domain
$ systemctl start eap7-domainCopy to Clipboard Copied! Toggle word wrap Toggle overflow To stop JBoss EAP on RHEL 6, run the following command:
service eap7-domain stop
$ service eap7-domain stopCopy to Clipboard Copied! Toggle word wrap Toggle overflow To stop JBoss EAP on RHEL 7, run the following command:
systemctl stop eap7-domain
$ systemctl stop eap7-domainCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteThe
systemctlcommand is relevant to only RHEL 7.
If you want to bind JBoss EAP to a different IP address, add the following line in the /etc/opt/rh/eap7/wildfly/eap7-domain.conf file on RHEL 7. The internal IP address is translated into a public IP address by EC2.
WILDFLY_BIND=$YOUR_PRIVATE_IP_ADDRESS
WILDFLY_BIND=$YOUR_PRIVATE_IP_ADDRESS
4.2. Launch One or More Instances to Serve as Host Controllers Copiar o linkLink copiado para a área de transferência!
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.
See System Paths for more details about system paths.
See Configuring JBoss EAP Subsystems to Work on Cloud Platforms for information about configuring JBoss EAP subsystems for Amazon EC2.
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.
See Example User Data for Clustered JBoss EAP Instances for more information about sample script for user data.
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.-
Copy the
domain-ec2.xmlfile from/opt/rh/eap7/root/usr/share/wildfly/docs/examples/configsto the JBoss EAP configuration directory. Set the following variables in the appropriate service configuration file:
WILDFLY_SERVER_CONFIG=domain-ec2.xml WILDFLY_HOST_CONFIG=host-master.xml
WILDFLY_SERVER_CONFIG=domain-ec2.xml WILDFLY_HOST_CONFIG=host-master.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow Add the S3 domain controller discovery configuration to the
domain-ec2.xmlfile:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
-
Copy the