OCI: Automated setup of the eBS provisioning tool

This note is about OCI (baremetal) and is derived from this tutorial.

It is assumed that a temporary or an existing VM has already been provisioned to help with the automation proposed below. This VM must run on OCI.

Either one of the manual or automated method can be used.

The automated method will take care of both creating apps and db private subnets into each of the compartment availability domains (AD), and also create a dedicated VM for the eBS provisioning.

Proceed as follow:

Step 1: If none already exist, deploy a temporary VM on a standard1.1 shape.

 

Step 2: Prepare a public and private key in pem format for the OCI local user in charge of the provisioning. Warning: This key is different from the ssh key used to login to compute instances.

openssl genrsa -out user_key.pem 2048 
openssl rsa -pubout -in user_key.pem -out user_public.pem
openssl rsa -pubout -outform DER -in user_key.pem | openssl md5 -c >user_key_fingerprint.txt

 

Step 3: Copy the private key on the /u01/install/APPS/.oci directory on the provisioning VM.

 

Step 4: Login in the OCI console, add the public key in PEM format to the OCI user. Note down the fingerprint that should match with the number already computed in the step 1.

 

Step 5: Download, from edelivery, the Oracle E-Business Suite on Oracle Cloud Infrastructure Automation Archive (V975021-01.zip), and transfer the zip file on the VM.

 

Step 6: Run the ProvisionOCInfra script (login as oracle)

unzip V975021-01.zip 
tar -xvzf EBSCloudAdminTools_v18.1.1.tgz
cd EBSCloudAdminTools_v18.1.1/bin
perl provisionOCInfra.pl

After asking a few environment questions, the tool will run for 15 minutes, downloading and installing the necessary packages.

Program: ProvisionOCInfra.pl started at Wed Mar 21 14:10:14 2018 
Log File : /u01/EBSCloudAdminTools_v18.1.1/ProvisionOCInfra_Wed_Mar_21_14_10_14_2018.log

Enter tenancy ocid: ocid1.tenancy.oc1... . .
Enter compartment ocid: ocid1.compartment.oc1...
Enter user ocid: ocid1.user.oc1.....
Enter absolute path of private key of 'API signing key': <path>/.oci/user_key.pem
Enter passphrase for private key (press enter key for no passphrase): 
Enter fingerprint of the public key: d2:39:f8:fb:...
Enter region: eu-frankfurt-1

Downloading file ImageOCIDs.json as /u01/EBSCloudAdminTools_v18.1.1/ImageOCIDs.json.
Executing command: /u01/EBSCloudAdminTools_v18.1.1/tfdump/bin/terraform apply -target=baremetal_core_virtual_network.ebssandbox_vcn
Executing command: /u01/EBSCloudAdminTools_v18.1.1/tfdump/bin/terraform apply

Oracle E-Business Suite Sandbox network and Cloud Admin Tools VM created successfully

List of resources created:
ebssandbox_vcn
ebssandbox_provvm_vnics
ebssandbox_provvm_vnic
ebssandbox_provvm_subnet_ad1
ebssandbox_provvm_seclist
ebssandbox_provvm_routetable
ebssandbox_provvm
ebssandbox_lbaas_subnet_ad3
ebssandbox_lbaas_subnet_ad2
ebssandbox_lbaas_subnet_ad1
ebssandbox_lbaas_seclist
ebssandbox_lbaas_routetable
ebssandbox_internetgateway
ebssandbox_db_subnet_ad3
ebssandbox_db_subnet_ad2
ebssandbox_db_subnet_ad1
ebssandbox_db_seclist
ebssandbox_db_routetable
ebssandbox_dbbackup_subnet_ad3
ebssandbox_dbbackup_subnet_ad2
ebssandbox_dbbackup_subnet_ad1
ebssandbox_apps_subnet_ad3
ebssandbox_apps_subnet_ad2
ebssandbox_apps_subnet_ad1
ebssandbox_apps_seclist
ebssandbox_apps_routetable

EBS Cloud Admin Tools VM Public IP: x.x.x.x
Login to Cloud Admin Tools VM as: ssh opc@x.x.x.x

Program: ProvisionOCInfra.pl completed at Wed Mar 21 14:28:12 2018 
[oracle@provisioning bin]$

 

Step 7: Login to the Cloud admin VM to proceed further with the provisioning.

ssh opc@x.x.x.x

 

Step 8: Upgrade the EBS Cloud admin tool to the latest release:

ssh opc@x.x.x.x
sudo su - oracle
cd /u01/install/APPS/apps-unlimited-ebs/bin
perl selfUpdate.pl
Attempting to upgrade EBS Admin Tool to Version: 18.1.1.1 ..
Downloading the latest archive (EBSCloudAdminTools_v18.1.1.1.tgz)..
Extract latest archive file..
EBS Admin Tool Upgraded Successfully, Please restart the interview..

 

Step 9: (Optional) Configure other VMs to login to the Cloud Admin Tools VM.

The key to be propagated is the ~/.ssh/id_rsa key created by the provisioningOCInfra scripts in the oracle account.

 

Advertisements

OCI: Manual setup of the eBS provisioning tool

This note is about OCI (baremetal) and is derived from this tutorial. The note for OCI-c is posted here.

Either one of this manual or automatic method can be used.

Proceed as follow:

 

Step 1: Deploy a provisioning VM with a standard1.1 shape.

 

Step 2: Download, from edelivery, the Oracle E-Business Suite on Oracle Cloud Infrastructure Automation Archive (V975021-01.zip), and transfer the zip file on the VM.

 

Step 3: Install the provisioning tool (login as root)

unzip V975021-01.zip
mkdir /u01
tar -xvzf EBSCloudAdminTools_v18.1.1.tgz -C /u01
cd /u01/EBSEBSCloudAdminTools_v18.1.1/bin
./setup.sh --provider=oci

The tool will run for 15 minutes, downloading and installing the necessary packages.

========================================================
Setting up Oracle EBS Cloud Admin Tool VM
Verify /u01/EBSCloudAdminTools_v18.1.1/setup.out for complete details.
========================================================
Installing required rpms from public yum repos
Installing oracle-ebs-server-R12-preinstall.x86_64 rpm from yum repo
Installing perl-JSON.noarch rpm from yum repo
Installing perl-JSON-PP.noarch rpm from yum repo
Installing libffi-devel rpm from yum repo
Installing python-devel rpm from yum repo
Installing openssl-devel rpm from yum repo
Installing ntp rpm from yum repo
Installing virtualenv
Performing yum update
Updating sudoers file
Installing ChefDK and Chef Server rpm
Installing /u01/EBSCloudAdminTools_v18.1.1/software/rpms/chefdk-1.0.3-1.el6.x86_64.rpm
Installing /u01/EBSCloudAdminTools_v18.1.1/software/rpms/chef-server-core-12.11.1-1.el6.x86_64.rpm
Creating directory /var/www/files
Creating directory /u01/install
Modifying oracle user home directory
Creating directory /u01/install/APPS/software
Creating directory /u01/install/APPS/.ssh
Creating directory /u01/install/APPS/.chef
Changing directory permissions
Extracting apps-unlimited-ebs.zip to /u01/install/APPS
Extracting RemoteClone.zip to /u01/install/APPS/apps-unlimited-ebs
Installing gem oraclebmc
Installing gem knife-oc
Installing gem knife-ebs
Installing gem knife-bmc
Installing gem ebsinfra
Configuring ntp
Redirecting to /bin/systemctl restart firewalld.service
28 Mar 13:09:02 ntpdate[3920]: adjust time server 169.254.169.254 offset 0.000061 sec
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/chronyd.service.
Installing BMC CLI
Configuring Terraform provider
Copying chef-12.16.42-1.el6.x86_64.rpm to /var/www/files
Copying jdk-8u111-linux-x64.rpm to /var/www/files
Generating ssh key for oracle user
Enabling https service
========================================================================
Oracle EBS Cloud Admin Tool VM is setup successfully
Version: 18.1.1
Mode: install
Verify /u01/EBSCloudAdminTools_v18.1.1/setup.out for complete details.
========================================================================

 

Step 4: Verify the installation

cat /etc/ebscm.conf|grep version

It should show 18.1.1

Warning: ALL further steps should be executed with the ‘oracle’ account.

 

OCI-c: eBS multi-node provisioning using the EBS Cloud admin tool

Here is the full tutorial note

Login to the eBS provisioning VM, setup as documented in this other note.

Then run the eBS provisioning tool first by navigating into the working directory, to avoid perl compilation error:

cd /u01/install/APPS/apps-unlimited-ebs
perl /u01/install/APPS/apps-unlimited-ebs/ProvisionEBS.pl

 

Here is the summary page, in the process to provision one fresh 12.2.6 enviromment setup on oci-c compute instances.

Oracle Cloud User                   : <user> 
Oracle Cloud Identity Domain        : <idcs id> 
Application Tier OS Image           : /Compute-<idcs id>/<user>/OPC_OL6_9_X86_64_EBS_OS_VM_02162018 
OTD OS Image                        : /Compute-<idcs_id>/<user>/OPC_OL6_9_X86_64_EBS_OS_VM_02162018 
Shape of Application Tier VM        : oc1m 
Shape of Fresh Install Database Tier: oc1m 
Shape of OTD VM                     : oc3 
Environment Name                    : env1226 
SSH Key Name                        : mykey 
Use Logical Hostname                : yes 
Application Tier Logical Hostsnames : app1.cloud.com 
Database Tier Logical Hostsnames    : db.cloud.com 
Database SID                        : env1226a 
Source DB Name                      : EBSDB 
OSS Backup Name                     : PRODEBS122612102 
IP-Reservation for Apps Tier        : /Compute-<idcs id>/<user>/app1  
IP-Reservation for OTD              : /Compute-<idcs id>/<user>/otd  
IP-Reservation for Database         : /Compute-<idcs id>/<user>/db 

Restore Flow                        : New Provisioning To Compute 
=============================================

 

The process will run for a few hours until the instance get ready:

https://oc-<ip-adress>.compute.oraclecloud.com:443
Summary : /u01/install/APPS/apps-unlimited-ebs/summary/installation-env1226a.info 

Exiting EBS Cloud Admin Tool...

Win10: VMWare & Disk expansion

Being stuck with a lack of free disk space in my Windows 10 VM running on VMWare workstation 12.0, with the need to move on with a Win10 build upgrade, I found the solution by using the EaseUS partition Manager free version.

https://www.easeus.com/partition-manager/epm-free.html

With drag&drop, once I could expand the VM by 5GB, then PartitionManager let me easily move the DataRecovery partition to the end of the newly allocated space, then merge the old C partition with the new space.

OCI-c DBaaS: Patching to 180116

Database Cloud Service patching, from 171×30 to 180116, may fail, resulting into all PDBs to restart in restricted session mode.

Running $ORACLE_HOME/OPatch/datapatch -verbose confirms an issue, while trying to rollback the patch 23026585:

Patch 23026585 rollback (pdb PDB$SEED): WITH ERRORS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/23026585/21186443/23026585_rollback_OSC_PDBSEED_2018Mar20_12_02_32.log (errors)
    Error at line 31: Warning: Package Body created with compilation errors.
Patch 23026585 rollback (pdb JCS): WITH ERRORS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/23026585/2118644/. . .
    Error at line 31: Warning: Package Body created with compilation errors.

 

The workaround is to update the file below to comment or remove the package body definition intended to be replaced:

?/sqlpatch/23026585/21186443/rollback_files/rdbms/admin/prvtrmns.plb

 

Then to reload the proper package body from the ORACLE_HOME:

sqlplus / as sysdba @?/rdbms/admin/prvtrmns.plb

 

Then start again the datapatch session:

$ORACLE_HOME/OPatch/datapatch -version

OCI-c DBcs: prereq check and patching

If a PSU patch prereq fails on Database Cloud Services, indicating that the dbaastools needs to be updated, do not download and install the rpm manually as being asked in the below error message:

Precheck failed for patch [26925311-EE]. Error [please upgrade to recommended dbaastools version from
https://storage.us2.oraclecloud.com/v1/dbcsswlibpusoracle29538/dbaas_patch/dbaastools.rpm

 

Instead, check the latest available patch

Example for 12.2

/var/opt/oracle/patch/dbpatchm -list_tools -cli

INFO: cdb is set to : yes 
INFO: dbversion detected : 12201 
INFO: patching type : psu
Patchid : 17.4.3.1.0_171129.0000
Patchid : 17.4.3.1.0_171213.0000
Patchid : 17.4.5.0.0_171120.1542
Patchid : 18.1.1.0.0_171130.0801
Patchid : 18.1.1.1.0_180122.0952
Patchid : 18.1.2.1.0_180215.0915
Patchid : 18.1.2.1.0_180228.1052
Patchid : 18.1.2.1.0_180301.0107
Patchid : 18.1.2.1.0_180309.0517
Patchid : 18.1.4.1.0_180309.0546
Patchid : 18.1.4.1.0_180312.1800

 

Example for 18c

Starting DBPATCHM

INFO: cdb is set to : yes 
INFO: dbversion detected : 18000 
INFO: patching type : psu
Patchid : 18.1.4.1.0_180309.0546
Patchid : 18.1.4.1.0_180312.1800
Patchid : 18.1.4.1.0_180406.2023
Patchid : 18.1.4.1.0DBCS_180412.0105
Patchid : 18.1.4.1.0DBCS_180418.0614
Patchid : 18.1.4.1.0_180420.0000
Patchid : 18.1.4.1.0_180425.0000

 

Then install the latest and relevant available package as follow

/var/opt/oracle/patch/dbpatchm -toolsinst -rpmversion=18.1.4.1.0DBCS_180418.0614

Starting DBPATCHM
Logfile is ...
WARN : Parameter toolsinst passed via cmdline is not a valid parameter. Please check the usage.
Config file is /var/opt/oracle/patch/dbpatchm.cfg
INFO: cdb is set to : yes 
INFO: dbversion detected : 18000 
INFO: patching type : psu
INFO: oss_container_url is not given, using the default
INFO: existing dbaastools version - dbaastools-1.0-1+18.1.4.0.0_180123.1336.x86_64
 Use of uninitialized value in concatenation (.) or string at /var/opt/oracle/patch/dbpatchm line 4737.
INFO: updated dbaastools rpm to - dbaastools-1.0-1+18.1.4.1.0DBCS_180418.0614.x86_64

Ignore possible warnings, related to unidentified variables.

Once completed, check again that no new rpms is now available. For example, the should return no applicable rpms:

 

/var/opt/oracle/patch/dbpatchm -list_tools -cli

 

OCI-c: OL7 and default cron shell

I had found out that, on some on my compute running OL7 on OCI-C, the cron job did not source the proper .bashrc environment file as I would have expected, where all ORACLE variables were set.

Workaround is to add the 1 or 2 last of the following lines into the cronjob:

CRON_TZ=Europe/London
SHELL=/bin/bash
BASH_ENV=/home/oracle/.bashrc