Wednesday Jan 27, 2016

Install Oracle Fusion Middleware using Python

I am obsessed with Python! For the last few weeks, I have spent countless hours porting a lot of my scripts into Python. I have even re-written UNIX scripts in Python. I just can't get enough of it. I have come to love the way it manages my data structures: from sets, lists, dictionaries to even JSON. I would like to share a few scripts that can be used to install Fusion Middleware products and create and drop product schemas.You can also access my GitHub project here.

/usr/bin/python install_fmw.py [-?] -l installers_location -o oracle_home [-j jdk_home] [-f fmw_home] [--rsp_file install_response_file] [--tmp_loc tmp_location] [--os_install_group install_os_group] [wls] [bpm|soa] [wcc] [wcp] [wcs] [ohs]

/usr/bin/python create_schemas.py [-?] -f fmw_home -c db_connect_string -m db_prefix [-w password_file] [--dba_user db_admin_user] [--dba_password db_admin_password] [--dbs_password db_schema_password] [--soa_profile SMALL|MED|LARGE] [--analytics_with_partitioning N|Y] [em] [bpm|soa] [ucm] [capture] [wccadf] [portal] [pagelet portlet] [discussions] [analytics] [sites] [vs] [insights] [sc] [ss]

/usr/bin/python drop_schemas.py [-?] [--all] -f fmw_home -c db_connect_string -m db_prefix [-w password_file] [--dba_user db_admin_user] [--dba_password db_admin_password] [em] [bpm|soa] [ucm] [capture] [wccadf] [portal] [pagelet portlet] [discussions] [analytics] [sites] [vs] [insights] [sc] [ss]

NOTE: Please note that these code snippets should be used for development and testing purposes only, as such it is unsupported and should not be used on production environments.

Monday Dec 28, 2015

Docker Image for Oracle Fusion Middleware 12.2.1

This post shows you how to create a Docker Image with one or more components of Oracle Fusion Middleware 12.2.1 installed. Download the project directory from GitHub here.

I have written a Dockerfile to build an image with Oracle Fusion Middleware components. To use this Dockerfile, you will need to create the following directory structure.

mkdir ~/fmw
cd ~/fmw
mkdir installers

After the directories are setup, all the necessary installers should be downloaded. You may choose to skip the installer files for the products that you do not wish to install in your image; the Dockerfile will simply ignore the install instruction for that product.

./fmw
 - installers
  - silent.rsp (required)
  - jdk-8u66-linux-x64.gz (required)
  - fmw_12.2.1.0.0_infrastructure_Disk1_1of1.zip (required)
  - fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip (optional)
  - fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip (optional)
  - fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip (optional)
  - fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip (optional)
  - fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip (optional)
  - fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip (optional)
  - fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip (optional)
  - fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip (optional)
 - Dockerfile.12.2.1.0.0

Create or edit the Dockerfile in your context directory. For this post, the Dockerfile is named as Dockerfile.12.2.1.0.0.

FROM oraclelinux:7
MAINTAINER Justin Paul 

ENV _SCRATCH /tmp/scratch
ENV ORA_HOME /u01/app/oracle
ENV JDK_HOME ${ORA_HOME}/jdk
ENV FMW_HOME ${ORA_HOME}/middleware

COPY installers ${_SCRATCH}/

RUN yum update -y -q && \
 yum install -y -q binutils compat-libcap1 compat-libstdc++-33 \
 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc-devel glibc-devel.i686 \
 libaio libaio-devel libgcc libgcc.i686 libstdc++ libstdc++.i686 \
 libstdc++-devel libXext libXtst libXi openmotif openmotif22 redhat-lsb \
 sysstat zlib zlib.i686 libX11 libX11.i686 unzip xorg-x11-utils xorg-x11-xauth \
 unzip ksh make ocfs2-tools numactl numactl-devel motif motif-devel && \
 groupadd -g 1000 oinstall && \
 useradd -u 1000 -g 1000 -m oracle && \
 mkdir -p ${ORA_HOME} && \
 chown -R oracle:oinstall ${_SCRATCH} && \
 chown -R oracle:oinstall ${ORA_HOME}

USER oracle

RUN mkdir -p ${JDK_HOME} ${FMW_HOME} && \
 echo "inventory_loc=${FMW_HOME}/oraInventory" > ${_SCRATCH}/oraInst.loc && \
 echo "inst_group=oinstall" >> ${_SCRATCH}/oraInst.loc && \
 tar xzf ${_SCRATCH}/jdk-8u66-linux-x64.gz -C ${JDK_HOME} --strip-components=1 && \
 rm -rf ${_SCRATCH}/jdk-8u66-linux-x64.gz && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_infrastructure_Disk1_1of1.zip -d ${_SCRATCH} && \
 ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_infrastructure.jar \
 -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \
 -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \
 INSTALL_TYPE="Fusion Middleware Infrastructure" && \
 rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_infrastructure_Disk1_1of1.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_infrastructure.jar

RUN [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip ]] && \
 [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip ]] && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip -d ${_SCRATCH} && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip -d ${_SCRATCH} && \
 ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_bpm_quickstart.jar \
 -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \
 -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} && \
 rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_1of2.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_bpmqs_Disk1_2of2.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_bpm_quickstart.jar \
 ${_SCRATCH}/fmw_12.2.1.0.0_bpm_quickstart2.jar && \
 export BPM_INSTALLED=1

RUN [[ -z ${BPM_INSTALLED} ]] && \
 [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip ]] && \
 [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip ]] && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip -d ${_SCRATCH} && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip -d ${_SCRATCH} && \
 ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_soa_quickstart.jar \
 -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \
 -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} && \
 rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_1of2.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_soaqs_Disk1_2of2.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_soa_quickstart.jar \
 ${_SCRATCH}/fmw_12.2.1.0.0_soa_quickstart2.jar

RUN [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip ]] && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip -d ${_SCRATCH} && \
 ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_generic.jar \
 -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \
 -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \
 INSTALL_TYPE="WebCenter Content" && \
 rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_Disk1_1of1.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_wccontent_generic.jar

RUN [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip ]] && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip -d ${_SCRATCH} && \
 ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_generic.jar \
 -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \
 -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \
 INSTALL_TYPE="WebCenter Portal" && \
 rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_Disk1_1of1.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_wcportal_generic.jar

RUN [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip ]] && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip -d ${_SCRATCH} && \
 ${JDK_HOME}/bin/java -jar ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_generic.jar \
 -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \
 -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \
 INSTALL_TYPE="WebCenter Sites" && \
 rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_Disk1_1of1.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_wcsites_generic.jar

RUN [[ -f ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip ]] && \
 unzip ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip -d ${_SCRATCH} && \
 ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64.bin -jreLoc ${JDK_HOME} \
 -novalidation -silent -responseFile ${_SCRATCH}/silent.rsp \
 -invPtrLoc ${_SCRATCH}/oraInst.loc ORACLE_HOME=${FMW_HOME} \
 INSTALL_TYPE="Colocated HTTP Server (Managed through WebLogic server)" && \
 rm -rf ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64_Disk1_1of1.zip \
 ${_SCRATCH}/fmw_12.2.1.0.0_ohs_linux64.bin

RUN rm -rf ${_SCRATCH}

CMD /bin/bash

Once you have your files ready, you can build your image using the command below. You will then have to create a domain manually and then start your managed servers [and optionally, nodemanagers] as separate containers.

cd ~/fmw
docker build -t oracle/fmw:12.2.1.0.0 -f ./Dockerfile.12.2.1.0.0 .

Oracle WebLogic is now certified to run on Docker Containers starting with version 12c (12.1.3.0.0) and you will like the way these Oracle products work with Docker now. There is also a white paper available which describes a WebLogic deployment. The concepts explained this is white paper can be applied to the SOA/BPM and WebCenter managed servers as well. You can read the white paper here.

Sunday Dec 20, 2015

Implement Oracle WebCenter 11g as Docker Containers

This post shows you how to create Docker Images with Oracle WebCenter installed. Download the entire project directory from GitHub here.

Docker offers a container-based virtualization platform for applications and I have been playing with it for a few weeks now to see how I can create a base image with all the Oracle Software installed. Consequently, I wanted to port the WebLogic Admin Server and Managed Servers as Docker containers. As patches become available, I would then update my base image and distribute it. Once a new image is available, the idea is to create new containers for the WebLogic Admin Server and Managed Servers while retaining existing configuration and data. Here is how I did it.

I have used a Ubuntu 15.10 virtual machine for this exercise. You will need plenty of disk space on your virtual machine as Docker creates an intermediate image after every instruction. The instructions for setting up Docker can be found on their website here.

Once the environment is setup and ready to go, the next step is to identify a Docker build context directory and create the necessary folder structure. 

mkdir ~/webcenter
cd ~/webcenter
mkdir jdk wls rcu wcc wcp

After the directories are setup, all the necessary installers should be downloaded. The installers come as a ZIP archive and most of them will have to be extracted in those directories. If you have downloaded the project files from GitHub, you can find the instructions to download and extract the files under the respective directory. You can also click on a directory below to see the instructions. At the end you should have a directory structure shown below. 

./webcenter
 - Dockerfile.11.1.1.9.0
 - domain
  - docker_domain_admin.jar
 - jdk
  - jdk-7u91-linux-x64.tar.gz
 - rcu
  - rcuHome
  - readme_fmw_ps7.htm
 - scripts
  - add_server.py
  - start_server.sh
 - wcc
  - 22060967
  - Disk1
  - Disk2
  - ECM_22249978
  - readme_fmw_ps7.htm
 - wcp
  - 21950042
  - Disk1
  - Disk2
  - Disk3
  - Disk4
  - readme_fmw_ps7.htm
 - wls
  - p20780171_1036_Generic.zip
  - silent.xml
  - wls1036_generic.jar

Create or edit the Dockerfile in your context directory. For this post, the Dockerfile is named as Dockerfile.11.1.1.9.0. 

FROM oraclelinux:6
MAINTAINER Justin Paul

ENV _SCRATCH /tmp/scratch
ENV ORA_HOME /u01/app/oracle
ENV JDK_HOME ${ORA_HOME}/product/jdk
ENV FMW_HOME ${ORA_HOME}/product/fmw
ENV ADM_HOME ${ORA_HOME}/admin

COPY jdk ${_SCRATCH}/jdk/
COPY wls ${_SCRATCH}/wls/
COPY rcu ${_SCRATCH}/rcu/
COPY wcc ${_SCRATCH}/wcc/
COPY wcp ${_SCRATCH}/wcp/
COPY domain ${_SCRATCH}/domain/
COPY scripts ${_SCRATCH}/scripts/

RUN yum update -y -q && \
 yum install -y -q binutils compat-libcap1 compat-libstdc++-33 \
 compat-libstdc++-33.i686 gcc gcc-c++ glibc glibc-devel glibc-devel.i686 \
 libaio libaio-devel libgcc libgcc.i686 libstdc++ libstdc++.i686 \
 libstdc++-devel libXext libXtst libXi openmotif openmotif22 redhat-lsb \
 sysstat zlib zlib.i686 libX11 libX11.i686 unzip xorg-x11-utils xorg-x11-xauth && \
 groupadd -g 1000 oinstall && \
 useradd -u 1000 -g 1000 -m oracle && \
 mkdir -p ${ORA_HOME} && \
 chown -R oracle:oinstall ${_SCRATCH} && \
 chown -R oracle:oinstall ${ORA_HOME}

USER oracle

RUN mkdir -p ${JDK_HOME} && \
 tar xzf ${_SCRATCH}/jdk/jdk-7u91-linux-x64.tar.gz -C ${JDK_HOME} --strip-components=1 && \
 mkdir -p ${FMW_HOME} && \
 ${JDK_HOME}/bin/java -jar ${_SCRATCH}/wls/wls1036_generic.jar \
 -mode=silent -silent_xml=${_SCRATCH}/wls/silent.xml && \
 mv ${_SCRATCH}/rcu/rcuHome ${FMW_HOME}/ && \
 echo "inventory_loc=${FMW_HOME}/oraInventory" > ${_SCRATCH}/oraInst.loc && \
 echo "inst_group=oinstall" >> ${_SCRATCH}/oraInst.loc && \
 ${_SCRATCH}/wcp/Disk1/runInstaller -silent -invPtrLoc ${_SCRATCH}/oraInst.loc \
 -responseFile ${_SCRATCH}/wcp/Disk1/stage/Response/sampleResponse_wls.rsp \
 -jreLoc ${JDK_HOME} -waitforcompletion -force -novalidation \
 MIDDLEWARE_HOME=${FMW_HOME} ORACLE_HOME=${FMW_HOME}/Oracle_WC1 && \
 ${_SCRATCH}/wcc/Disk1/runInstaller -silent -invPtrLoc ${_SCRATCH}/oraInst.loc \
 -responseFile ${_SCRATCH}/wcc/Disk1/stage/Response/sampleResponse_wls.rsp \
 -jreLoc ${JDK_HOME} -waitforcompletion -force -novalidation \
 MIDDLEWARE_HOME=${FMW_HOME} ORACLE_HOME=${FMW_HOME}/Oracle_ECM1 && \
 mkdir -p ${ADM_HOME}/tools/templates && \
 mkdir -p ${ADM_HOME}/tools/scripts && \
 cp ${_SCRATCH}/domain/* ${ADM_HOME}/tools/templates && \
 cp -r ${_SCRATCH}/scripts/* ${ADM_HOME}/tools/scripts

RUN rm -rf ${_SCRATCH}

CMD /bin/bash

Run the following command to build your image. Use --no-cache=true if you do not want to cache intermediate images. 

cd ~/webcenter
docker build -t webcenter:11.1.1.9.0 -f ./Dockerfile.11.1.1.9.0 .

After the image(s) are built, we can start creating the containers. For the purpose of this post, we will keep the admin domain configuration on a shared volume. This volume will be mounted with RW permissions on the admin server container and with R permissions only on the managed server containers.

Run the following commands to create and start your admin server container. Use the -d flag instead of -i to force the container to run as a background process. 

mkdir -p ~/volume/aserver
docker run -i -P --name=adminserver \
-v ~/volume/aserver:/u01/app/oracle/admin/aserver:rw \
-t webcenter:11.1.1.9.0 /bin/sh /u01/app/oracle/admin/tools/scripts/start_server.sh \
adminserver

Find the IP Address of the newly created container using the docker inspect command. 

docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' adminserver

After the Admin Server is up and running, login to the Admin Console as weblogic [the password is welcome1]. Update the JDBC data sources for all services that you intend to use. They are setup with dummy values in the domain and these data sources should be configured before you can start and managed server. For example, if you intend to create the UCM managed server container, you must configure the CSDS data source to connect to a valid database.

After the Admin Server configuration is complete, start a managed server container using the following commands. Use the -d flag instead of -i to force the container to run as a background process. Replace abc.def.ghi.jkl with the IP Address of the Admin Server. 

docker run -i -P --name=ucm_mserver1 \
-v ~/volume/aserver:/u01/app/oracle/admin/aserver:ro \
-t webcenter:11.1.1.9.0 /bin/sh /u01/app/oracle/admin/tools/scripts/start_server.sh \
ucm t3://abc.def.ghi.jkl:7001

You can create containers for any managed servers supported by the domain. Replace SERVER_ID with one of [capture, ibr, ipm, irm, ssxa, ucm, urm, collaboration, portlet, spaces, utilities] to create a managed server container for that service. Also remember to replace abc.def.ghi.jkl with the IP Address of the Admin Server. 

docker run -d -P --name=SERVER_ID_1 \
-v ~/volume/aserver:/u01/app/oracle/admin/aserver:ro \
-t webcenter:11.1.1.9.0 /bin/sh /u01/app/oracle/admin/tools/scripts/start_server.sh \
SERVER_ID t3://abc.def.ghi.jkl:7001

If you wish to update the image with the latest patches, update the Dockerfile with the instructions to apply the patches and build the image again or create a new image. After the new image is created, recreate the admin server and managed server containers using the same commands as above. Make sure you use the right image, mount the correct shared volume and change the container names.

NOTE: Please note that these instructions should be used for development and evaluation purposes only, as such they are unsupported and should not be used on production environments.

Monday Jun 09, 2014

FrameworkFolders support for WebCenter Portal

Oracle WebCenter Content Server includes components that provide a hierarchical folder interface, similar to a conventional file system, for organizing and managing some or all of the content in the repository. We used Contribution Folders (folders_g) which is being replaced by the new Folders (FrameworkFolders) component. The newer FrameworkFolders component fixes a number of limitations that folders_g had and adds a ton of new features. If you have played with the WebCenter Content mobile app, you will notice that it uses FrameworkFolders too.

WebCenter Portal requires the use of the folders_g component. Given the fact that folders_g and FrameworkFolders component do not go well together and must never be enabled together on any system, you could never use the new features if you planned to use integrate Content with Portal. I still remember presenting a demo with a colleague for a client and he was showing off the mobile capabilities in Portal (which are pretty impressive by the way) and was getting all the glory; while I was sitting back wanting to show off the Content app but could not (no FrameworkFolders).

Not any more; Oracle has released bundle patches for both WebCenter Content and Portal in April 2014 which bring home the support for FrameworkFolders. These patches will bring these products to version 11.1.1.8.3.

You can enable support for FrameworkFolders on new Content and Portal installations where the folders_g component has never been enabled using the following patches:

  • Download and apply the WebCenter Content MLR05 patch 18448219.
  • Download and apply the WebCenter Portal BP3 patch 18085041.
  • Download and apply the WebCenterConfigure component patch 18387955. Before applying this patch on the Content Server ensure that WebCenter Content MLR03 patch 18448219 has already been applied.

You can find detailed instructions on how to enable FrameworkFolders support in the Oracle® Fusion Middleware Installation Guide for Oracle WebCenter Portal 11g Release 1 (11.1.1.8.3).

There may be another bundle patches release (version 11.1.1.8.4) for many FMW products (including WebCenter Portal) in July 2014 which could further enhance the FrameworkFolders support.

Wednesday May 21, 2014

WebCenter Portal .8: Extending portal functionality with ADF Taskflows

This post describes how to extend your portal application functionality using ADF Taskflow.[Read More]

Wednesday May 07, 2014

How to: Run Repository Creation Utility (RCU) on Solaris

Many of the Oracle Fusion Middleware components require the existence of schemas in a database prior to installation. These schemas are created and loaded in the database using the Repository Creation Utility (RCU). Repository Creation Utility is a graphical and CLI-based tool used to create and manage Oracle Fusion Middleware database schemas.

At this time, RCU is available for Windows and Linux platforms only.

If you want to run RCU on Solaris, edit the RCU executable, <RCU_HOME>/bin/rcu, and make the following changes:
  • Look for the “#Platform Checking” section, and comment out the "exit" statement
  • Look for the line which specifies the JRE_DIR and update it to point to a Solaris JRE or JDK
After making these changes, set the SQLPLUS_HOME variable to point to any ORACLE_HOME and export it before running RCU.

Now you will be able to run RCU on Solaris and create the database objects for Oracle Fusion Middleware.

NOTE: Please note that these instructions should be used for development and testing purposes only, as such it is unsupported and should not be used on production environments.
About

Welcome to my blog. I use this site to share my experience as well as tips and tricks on Oracle Fusion Middleware products.

Contributors

Search

Archives
« June 2016
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
       
Today