Autoscaling Oracle E-Business Suite Application Servers

March 2, 2020 | 6 minute read
Rishi Mahajan
Consulting Solutions Architect
Text Size 100%:

Many Oracle E-Business Suite customers have chosen Oracle Cloud Infrastructure to deploy their demanding enterprise applications, and the number of deployments is growing daily. E-Business Suite customers choose Oracle Cloud Infrastructure because of its enterprise-class design, lower costs to deploy and operate, performance, scalability, security, and high availability of the environment.

In many of these deployments, resource requirements might vary from day to day. During slow days of the month, you might require only two application servers to process your workloads, but at the busier end of the month or end of the year, you might need three or four application servers to process additional workload (such as additional reports). You can combine the flexibility offered by Oracle Cloud Infrastructure Compute autoscaling with the E-Business Suite addnode functionality to right-size the resources deployed in your E-Business Suite environment. You can save infrastructure costs with on-demand scaling of instances, instead of preprovisioning instances for peak demand.

This post shows an example of how you can use autoscaling, in conjunction with cloud-init, Ansible, and E-Business Suite addnode functionality, to add application tiers on demand to service your peak workloads.

Setting Up the Environment

Let's start by setting up a multinode, highly available E-Business Suite 12.2 installation, as shown in the following diagram:

We used the Terraform templates provided on GitHub to provision infrastructure for this environment. After the infrastructure was created, we manually installed and configured Oracle E-Business Suite 12.2.7 (with Oracle Database 12.1.0.2). It's also possible to configure autoscaling in an existing E-Business Suite deployment.

For this deployment, we created a shared APPL_TOP directory using the Oracle Cloud Infrastructure File Storage service and mounted it as /u01/install/APPS on the application tier compute nodes.

The application node (App Server 1) was created outside the instance pool and is running the WebLogic admin server for E-Business Suite. All additional application tier nodes (App Server 2 and App Server 3) are running inside the instance pool.

After the E-Business Suite environment is up and running, all the required autoscaling scripts (shell scripts and Ansible playbooks) to add an E-Business Suite application tier node to the configuration are copied in the /u01/install/APPS/scripts directory. We can add the additional application node (App Server 2) by editing the number of instances for instance_pool to 1.

Configuring the Instance and Instance Pool

We set up an instance configuration named ebsappash_inst_config_as with an Oracle provided OS image and Oracle Linux 7.6. In the following screenshot, the bottom section displays the instance pools in this configuration.

Clicking the ebsappash_inst_pool_as instance pool link displays its configuration details. This instance pool contains two of the existing application servers, and its has a load balancer, ebs-lb-as, attached to it. During autoscaling, the newly added application node is automatically added into the backend set of the load balancer.

Clicking the auto-scaling-config-20190218-2300 autoscaling configuration link displays the autoscaling configuration details. The autoscaling configuration specifies a cooldown period of 300 seconds for the ebsappash_inst_pool_as instance pool.

Clicking the Edit button displays the details of the auto-scaling-policy-20190218-2300 autoscaling policy. This autoscaling policy is based on the CPU Utilization performance metric. The minimum number of instances is set to 2, the maximum is set to 3, and the initial number of instances is set to 2. The scaling rule is configured so that when the CPU utilization goes over 60 percent, one node is added to the instance pool. At the moment, scale down is disabled (by setting the scale-in threshold percentage to be < 0).

The instances that are part of the instance pool are also the instances that are part of the backend set of the load balancer.

The E-Business Suite Application Manager shows that there are currently three application servers in the E-Business Suite configuration.

 

Autoscaling a New Node

With the preceding configuration, the environment is set up in such a way that when the sustained average CPU utilization on the two compute nodes in the instance pool exceeds 60 percent, autoscaling will add a new compute node to the instance pool.

 

After autoscaling adds the node, the following scripts are executed and the node is added into the E-Business Suite configuration:

  1. Cloud-init is invoked and performs the following actions:
    • Installs packages: oracle-ebs-server-R12-preinstall, Ansible, and so on.
    • Mounts the shared application file system (File Storage) as /u01/install/APPS on the new node.
    • Open ports 7001-7002, 7201-7202, 7401-7402, 7601-7602, and 8000 in the host firewall.
    • Invokes the /u01/install/APPS/ansible/addsharednode.sh script.
  2. The addsharednode.sh script calls the addsharednode.yml Ansible playbook.
  3. The addsharednode.yml playbook calls the following Ansible playbooks, which perform the actions listed:
    1. pre_addnode_local.yml: Runs on the new local node and calls the /u01/install/APPS/ansible/files/hosts.sh script, which performs the following actions:
      • Adds the new node to the /u01/install/APPS/scripts/hosts.orig file.
      • Copies the updated /u01/install/APPS/scripts/hosts.orig file to /etc/hosts on the new local node.
      • Updates /etc/oci-hostname.conf to set PRESERVE_HOSTINFO=2.
    2. pre_addnode_global.yml: Runs on all nodes in the inventory file and copies /u01/install/APPS/scripts/hosts.orig to /etc/hosts on all the application nodes.
    3. pre_addnode_master.yml: Runs on the master node and performs the following actions:
      • Checks the Adminserver status on the master node RUN file system and starts it if it's down.
      • Checks the Adminserver status on the master node PATCH file system and starts it if it's down.
    4. addnode.yml: Runs on new local node and performs the following actions:
      • Determines whether the source pairs file required for the addnode operation exists.
      • Deletes the secondary node pairs file if it exists.
      • Creates the secondary node pairs file by using the /u01/install/APPS/scripst/genpairs.sh script.
      • Determines whether secondary pairs file was created by the previous step.
      • Runs the addnode operation to add a node in the E-Business Suite configuration.
      • If the addnode operation is successful, starts the service on the new node. The new node is ready to accept traffic now.
      • Checks Nodemanager on the PATCH file system and shuts it down if it is running.
    5. post_addnode_master.yml: Runs on the master node and performs the following actions:
      • Checks the Adminserver status on the master node PATCH file system and shuts it down if it's running.
      • Checks the Nodemanager status on the master node PATCH file system and shuts it down if it's running.

Note: The master node is the E-Business Suite application node (App Server 1) running the WebLogic admin server.

As soon as the new node is added into the backend set and the E-Business Suite application is configured, the Backend Health Status for the node changes to the OK state. The instance pool now has three application servers in it.

The E-Business Suite Application Manager shows that the new application server has been added to the E-Business Suite configuration. Transactions are now load balanced to all four application servers in the configuration.

Conclusion

This post describes how to use the Oracle Cloud Infrastructure autoscaling functionality to add capacity to your E-Business Suite environment as your processing requirements increase.

Disclaimer: You can download the scripts referred to in the post. Be aware, however, that the scripts are provided are for educational purposes only. Oracle Corporation doesn't provide any guarantee that these scripts work accurately, and doesn't support the scripts.

Rishi Mahajan

Consulting Solutions Architect


Previous Post

Manual fail-over is the past (Traffic Management Steering Policies)

Kiran Thakkar | 6 min read

Next Post


AWS S3 to OCI access best practices

Mithun Devkate | 4 min read