9.2. Creating and Starting Virtual Machine Instances

To deploy Red Hat JBoss BPM Suite to Amazon EC2, you must have a valid membership in the JBoss Cloud Access program. The program provides a number of supported AMIs created by Red Hat, while each of them has Red Hat Enterprise Linux 6 and Red Hat JBoss EAP 6 (together with other required software) pre-installed.

For further information about supported Amazon EC2 instance types, see the Deploy JBoss EAP 6 on Amazon EC2 chapter of Red Hat JBoss Enterprise Application Platform 6.4 Administration and Configuration Guide.

To create a virtual machine instance, do the following:

Creating Virtual Machine Instance

  1. In the main menu, click AMIs under the IMAGES drop-down menu.
  2. Choose one of the supported AMIs.

    For example RHEL-6.7_HVM_GA-JBEAP-6.4.7-20160421-x86_64-1-Access2-GP2 (ami-50bba23a).

  3. Click Launch.

    The Choose an Instance Type window opens. An instance type is a custom configuration of CPU, memory, storage, and networking capacity of your virtual machine instance.

  4. Choose one of the listed instance types.

    Instance type depends on the needs of your application. KIE Server and Business Central are usually two separated instances in AWS and each of them requires different settings. However, at least 2 vCPUs (the number of virtual CPUs) and 7.5 GiB of memory is recommended.

    It is possible to launch the instance directly from here by clicking Review and Launch. If you want to change additional settings, see the following steps.

  5. Click Next: Configure Instance Details.

    In this step, you can choose a number of launched instances, network (either EC2-Classic or VPC, the Amazon Virtual Private Cloud), or enable detailed monitoring. If you want to keep the default settings, continue to the next tab.

  6. Click Next: Add Storage.

    This screen allows you to add more Amazon Elastic Block Store (Amazon EBS) volumes and modify the settings of the root volume. The minimum recommended size of the root volume is 30 GiB.

    Important

    Make sure that the set volume size is greater than the size of the used snapshot.

  7. Click Next: Tag Instance and specify the tags for the instance that can help you search and filter the instances later. For example, the key Name can indicate a logical name of the instance in the instance list.
  8. Click Next: Configure Security Group.

    A security group is a virtual firewall containing a number of firewall rules that control the traffic for your instance. Each instance can have one or more security groups assigned and these groups can be modified at any time.

    You need to create a new security group in order to be able to deploy Red Hat JBoss BPM Suite:

    Creating New Security Group

    1. If not already selected, select the Create a new security group check box.
    2. Fill in the Security group name and Description.
    3. Keep the default SSH type TCP protocol rule.
    4. Define three new firewall rules by clicking Add Rule:

      • Default SSH access to Business Central:

        • Type: Custom TCP Rule
        • Protocol: TCP
        • Port Range: 8001
      • Default HTTP port of Red Hat JBoss EAP:

        • Type: Custom TCP Rule
        • Protocol: TCP
        • Port Range: 8080
      • Default Git port:

        • Type: Custom TCP Rule
        • Protocol: TCP
        • Port Range: 9418
      secgroup
    Warning

    All the configured ports must be allowed in the PORTS_ALLOWED property of user data. For more information, see Configuring User Data.

  9. Click Review and Launch.
  10. Review your instance details and if you want to launch the instance, click Launch.

A list of all created instances can be found under the Instances option in the main menu on the left. You can filter, search and launch the instances as well as view the instance description and edit the settings.

Figure 9.2. List of Instances Searched by Name

instancelist

In case you created a custom security group and defined new firewall rules with specific ports, you have to allow these ports in user data for the new virtual machine instance.

Configuring User Data

  1. In the main menu, go to INSTANCESInstances.
  2. In the list of instances, find and select the instance you want to configure.
  3. Click ActionsInstance SettingsView/Change User Data.

    viewuserdata
  4. In the View/Change User Data dialog window that opens, define the PORTS_ALLOWED property. For example:

    PORTS_ALLOWED="8001 8080 9418"
    ports allowed
  5. Click Save.

To start the created instance, do the following:

Starting Virtual Machine Instance

  1. In the main menu, go to INSTANCESInstances.
  2. Select the instance from the list and click ActionsInstance StateStart.

    startinginstance
  3. In the Start Instances dialog window that opens, click Yes, Start to confirm that you want to start the instance.
  4. Wait until the result of a status check changes to 2/2 checks passed.
Note

Do not forget to stop your instance after you no longer need it.