Turn off all the lights at night - Reducing costs by automatically pausing EBS@OCI instances

Turn off all the lights at night - Reducing costs by automatically pausing EBS@OCI instances

Johannes Michler PROMATIS Horus Oracle


Executive Vice President – Head of Platforms & Development


Costs Analysis dashboard in OCI

Running services on a public cloud platform, even when running the service 24/7, is often cheaper than running these services on premise regarding Total Cost of Ownership (TCO). Especially for development and testing instances, this cost advantages get even better when taking into consideration the following aspects:

  • The number of environments required is often volatile: There are phases when you need many environments with high performance (e.g. during a UAT of a major "new feature" or an "upgrade" implementation), but then there are many other months where a single "small" testing instance to troubleshoot issues might be enough.
  • Even during peak periods, such instances are often not needed 24/7 but only during usual business hours.

When running Oracle E-Business Suite on Oracle Cloud Infrastructure (OCI), this advantage is even more significant than with other cloud vendors: OCI allows to easily "rent" licenses for the database and application service required for E-Business Suite in a PaaS model "by the hour". This means: When reducing the average number of CPU cores used throughout the year (by one or both methods shown above), the cost savings can be very significant.

Let's have a look into the second aspect and see how we can easily shutdown E-Business Suite instances on OCI during night or weekend times.

Clean E-Business Suite shutdown

First of all, to automate pausing instances (and billing) during nighttime, you first have to cleanly shut down the E-Business Suite application server and middle tier. At least until today, there is no way of really "pausing" /"freezing" an instance without shutting down everything. Even though this is on the OCI roadmap, we will need to see if a complex environment such as an E-Business Suite will survive such a hibernate. I suggest the following stopEBS.sh script. You will obviously replace APPS_PWD and WEBLOGIC_PWD with your values:

source /u01/install/APPS/EBSapps.env run
adstpall.sh -mode=allnodes apps/APPS_PWD << EOF
WEBLOGIC_PWD
EOF

sh /home/oracle/stop_apex122.sh

echo -n "Waiting for Concurrent Manager to go down"

while true; do
$FND_TOP/bin/FNDSVCRG STATUS > /tmp/icmstatus2.txt
cat /tmp/icmstatus2.txt
if test `cat /tmp/icmstatus2.txt | grep "Internal Concurrent Manager is Active" | wc -l` -eq 0 ; then
echo
echo -n "Concurrent Manager is down now";
break;
fi
sleep 10;
done
ps -fu oracle
sleep 60
ps -fu oracle

Stopping of the OCI infrastructure (and billing)

With that, you can initiate the shutdown of the VMs (in this case with Base Database on VM and a single Apps Tier on Compute) using a script stopInstance.sh to which you need to pass the environment name:

COMPARTMENT_ID=ocid1.compartment.oc1..XXXXXXX
CONFIG_FILE=/u01/install/APPS/.oci/johannes.michler@promatis.de
ENV_NAME=$1

echo "Instance Name:"$ENV_NAME
HOST_APPS=${1,,}app01
IP_APPS=`dig +short ${HOST_APPS}.appssubnet.ebsnetwork.oraclevcn.com`
echo "IP Address Apps:"$IP_APPS
HOST_DB=${1,,}db
IP_DB=`dig +short ${HOST_DB}.dbsubnet.ebsnetwork.oraclevcn.com`
echo "IP Address DB:"$IP_DB

OCID_APPS=$(oci compute instance list --compartment-id $COMPARTMENT_ID --query "data [?\"display-name\" == '${ENV_NAME}app01'].id|join(',',@)" --config-file $CONFIG_FILE | tr -d '\"')
echo "OCID-APPS:"$OCID_APPS
OCID_DB_SYS=$(oci db system list --compartment-id $COMPARTMENT_ID --config-file $CONFIG_FILE --query "data [?\"display-name\" == '${ENV_NAME}'].id|join(',',@)"| tr -d '\"')
echo "OCI-DB-Sys:"$OCID_DB_SYS

OCID_DB_NODE=$(oci db node list --db-system-id $OCID_DB_SYS --config-file $CONFIG_FILE --compartment-id $COMPARTMENT_ID --query "data[].id|join(',',@)"| tr -d '\"')
echo "OCI-DB-Node:"$OCID_DB_NODE

echo Stopping apps tier
ssh $IP_APPS "./stopEBS.sh"
echo Stopping VM-DB
ssh $IP_DB "srvctl stop database -d \$ORACLE_UNQNAME -stopoption IMMEDIATE"
oci db node stop --config-file $CONFIG_FILE --db-node-id $OCID_DB_NODE

echo Now stopping Apps
oci --config-file $CONFIG_FILE compute instance action --action STOP --instance-id $OCID_APPS

The script makes use of the OCI Command Line Interface (CLI) to stop the database and the compute instance(s).

If you have the database on compute, you can use commands like the ones to stop the compute instance for the apps tier.

Keep in mind that you might need to disable advanced monitoring as well to stop billing of that OCI Database Management.

Bringing everything up again

Starting everything again works similar: I'm using a startInstance.sh script as follows:

echo "starting shutdown"
COMPARTMENT_ID=ocid1.compartment.oc1..XXXXX
CONFIG_FILE=/u01/install/APPS/.oci/johannes.michler@promatis.de
ENV_NAME=$1
echo "Instance Name:"$ENV_NAME
HOST_APPS=${1,,}app01
IP_APPS=`dig +short ${HOST_APPS}.appssubnet.ebsnetwork.oraclevcn.com`
echo "IP Address Apps:"$IP_APPS
HOST_DB=${1,,}db
IP_DB=`dig +short ${HOST_DB}.dbsubnet.ebsnetwork.oraclevcn.com`
echo "IP Address DB:"$IP_DB

OCID_APPS=$(oci compute instance list --compartment-id $COMPARTMENT_ID --query "data [?\"display-name\" == '${ENV_NAME}app01'].id|join(',',@)" --config-file $CONFIG_FILE | tr -d '\"')
echo "OCID-APPS:"$OCID_APPS
OCID_DB_SYS=$(oci db system list --compartment-id $COMPARTMENT_ID --config-file $CONFIG_FILE --query "data [?\"display-name\" == '${ENV_NAME}'].id|join(',',@)"| tr -d '\"')
echo "OCI-DB-Sys:"$OCID_DB_SYS

OCID_DB_NODE=$(oci db node list --db-system-id $OCID_DB_SYS --config-file $CONFIG_FILE --compartment-id $COMPARTMENT_ID --query "data[].id|join(',',@)"| tr -d '\"')
echo "OCI-DB-Node:"$OCID_DB_NODE

echo Starting DB
oci db node start --config-file $CONFIG_FILE --db-node-id $OCID_DB_NODE --wait-for-state AVAILABLE
echo Now Starting Apps
oci --config-file $CONFIG_FILE compute instance action --action START --instance-id $OCID_APPS --wait-for-state RUNNING &
wait
echo "started DB and Apps"
sleep 30
until ssh $IP_DB "echo da" 2> /dev/null
do
echo "not ready, waiting 5"
sleep 5
done
echo "sleeping another 30, dann start"
sleep 30

until ssh $IP_DB "srvctl start database -d \$ORACLE_UNQNAME"
do
echo "not ready, waiting 5"
sleep 5
done

until ssh $IP_APPS "echo da" 2> /dev/null
do
echo "not ready, waiting 5"
sleep 5
done
echo "sleeping another 30, dann start"
sleep 30
echo "Just in case the mountpoint is not yet there"
ssh opc@$IP_APPS sudo mount /u01

ssh $IP_APPS ./startEBS.sh

More fine-grained scaling - even without downtimes and maybe on PROD

Of course, the above approach can be down in less harsh manner. Instead of stopping the entire environment, you could, for example, simply stop some of the application tiers during nighttime; e.g. if you need 6 oacore servers to handle the daily work, but maybe only one during the night, then you can shut down five servers every night. And since in this way, the system stays available, you could even do so on production. OCI has dynamic scaling of CPU and memory on the roadmap, so maybe this gives even more flexibility in the future.

Summary

Using the above scripts and some crontab entries (e.g. on the E-Business Suite Cloud Manager machine) you can easily stop most of the costs for E-Business Suite Dev and Test Instances if they're not needed.
There are many reasons to run E-Business Suite on OCI as I've shown in previous blog posts. By dynamically scaling down the infrastructure during low or no-use periods costs can be dropped significantly! If you're interested to try it out, maybe look at the Free Trial for OCI and the E-Business Suite on OCI Hands On Lab - see my previous posts on things to consider while doing so with brand new tenancies.

Oracle Recognized as a Leader in Human Capital Management by Independent Research Firm

Oracle has been recognized as a Leader in The Forrester Wave™: Human Capital Management, Q2 2023. The report, published by Forrester Research in May 2023, evaluated 11 vendors based on 28 criteria across three categories: current offering, strategy and market presence. Of the 11 cloud HCM providers recognized, Oracle Fusion Cloud Human Capital Management (HCM) was one of only three Leaders and received the highest score in the current offering category.

For more information on the achievement, read the full article here.

PROMATIS erhält Zertifikat: Expertise in Oracle E-Business Suite Applications to Oracle Cloud in Western Europe

PROMATIS erhält Zertifikat: Expertise in Oracle E-Business Suite Applications to Oracle Cloud in Western Europe

Wir freuen uns, Ihnen mitteilen zu können, dass wir die Service-Expertise für Oracle E-Business Suite Applications to Oracle Cloud in Westeuropa erhalten haben. Dies ist ein weiterer Beweis für unser Engagement, ganzheitliche und nahtlose Oracle Cloud-Implementierungen anzubieten.

Diese Auszeichnung zeugt nicht nur von unserem hohen Kompetenzniveau in Bezug auf Oracle E-Business Suite, sondern sie bestätigt auch die Zufriedenheit unserer Kundschaft.

Die Expertise Initiative wurde von Oracle ins Leben gerufen, um die speziellen Fähigkeiten von Oracle-Partnerunternehmen transparenter zu gestalten. Um die Zertifizierung zu erhalten, muss ein Oracle-Partnerunternehmen strenge Kriterien erfüllen: Die Anforderungen umfassen zum einen, dass genügend zertifizierte Consultants im Unternehmen zur Verfügung stehen, zum anderen müssen auch entsprechende Kundenreferenzen vorgelegt werden, welche die eigenen Projekterfolge für das jeweilige Fokusfeld bestätigen.

First impression on E-Business Suite Cloud Manager 23.1.1

First impression on E-Business Suite Cloud Manager 23.1.1

Johannes Michler PROMATIS Horus Oracle


Executive Vice President – Head of Platforms & Development

This week, the Oracle E-Business Suite on OCI team released the latest release 23.1.1 of E-Business Suite Cloud manager: “Getting Started with Oracle E-Business Suite on Oracle Cloud Infrastructure (Doc ID 2517025.1)”.

Let’s have a quick look at the new features.

New Compute and Database Shapes

Finally, E-Business Suite Cloud Manager is supporting the latest AMD E4.Flex and Intel E3.Flex shapes not only for running the application server or the database tier “on compute” but also with the PaaS service for the database. This is especially important in situations where no / not enough tech licenses for the Database EE are available.

While still with the database PaaS service it is not possible to flexibly scale up and down the available memory as those new shapes have way better performance/price ratio than the previous VM.Standard.2 shapes. Furthermore, typically there is a little bit more memory available which comes in handy especially for small dev/test environments.

For performance measurements on the relevant CPU cores, see the article  Benchmarking CPUs for Oracle E-Business Suite (Database).

The new shapes are nicely integrated into the provisioning flow:

Hopefully, in the future it will be possible to change the memory assigned flexibly there as well – this is something the Database team will need to implement first though.

Furthermore, the new release allows to use VM.Standard3.Flex for Compute instances (Apps- or Database tier). However I still think that E4.Flex provides the better performance/price ratio, so that is not so important for me and my customers so far.

More features

    Beside those new shapes, with the new release the regions Madrid and Chicago can be used.

    Finally, when running the database on Exadata Database Service Dedicated it is now possible to do cloning using snapshots.

    Summary

    Especially the new database service shapes come in very handy for some upcoming projects of ours. I’m looking forward to using those services and will blog again on some insights during that usage soon.

    From a stability point of view the 23.1.1 release luckily so far caused no new regression issues. ?

    Oracle recognized a Leader in 2023 Gartner® Magic Quadrant™ for Transportation Management Systems

    Oracle has been recognized as a Leader in the 2023 Gartner Magic Quadrant™ for Transportation Management Systems. Oracle is positioned the highest for “Ability to Execute”, and furthest overall for “Completeness of Vision”. This is the 16th time Oracle has been named a Leader in the Gartner Magic Quadrant™ for Transportation Management Systems™ report.

    Read the report here.