Showing posts with label wls. Show all posts
Showing posts with label wls. Show all posts

11 December 2014

Exploring DevOps with Chef and WebLogic Server

I'm about to embark on a journey that explores the use of WebLogic Server within a DevOps regime.  My first port of call for this journey will be using Chef.

A loose travel itinerary is:
  • Setting up an environment to explore the basic operations of Chef - using the Chef Development Kit (ChefDK)
  • Exploring the basics of how Chef works to install Java and WebLogic Server on a single node
  • Installing and examining some of the existing cookbooks that are available for Java and WebLogic Server
  • Extending the environment to provision multiple nodes to create a typical multiple machine clustered WebLogic Server environment
I've started working on the first task, where I've also explored using Docker to create an isolated, reusable and easily shareable environment that contains the ChefDK.

The Docker project is here on GitHub:
I also tried a quick experiment with using Oracle Linux as the base docker image:
The Dockerfile contains the set of instructions required to install the ChefDK and the necessary utilities into the docker image when it is built.

#
# Dockerfile for Chef 4 WLS Environment 
# 

FROM ubuntu

MAINTAINER Steve Button <>

ENV     DEBIAN_FRONTEND noninteractive

# Install Utilities
RUN apt-get update
RUN apt-get install -yq wget
RUN apt-get install -yq curl
RUN apt-get install -yq git

# Install Chef
RUN wget https://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chefdk_0.3.5-1_amd64.deb
RUN dpkg -i chefdk*.deb

# Verify and Setup Chef
RUN chef verify 
RUN echo 'eval "$(chef shell-init bash)"' << ~/.bashrc

...

CMD ["/bin/bash"]

With this Dockerfile a build operation can be performed that produces a docker image, which can then be run to provide an environment in which start exploring the Chef.

$ docker build -t buttso/chef4wls .

$ docker run -ti buttso/chef4wls

oracle@5481a3330f27:~$ which chef-client
/opt/chefdk/embedded/bin/chef-client

This is just a brief outline - I will describe this first task in more detail once I get a bit further along and can verify everything has been installed and works correctly.

04 June 2010

Running WLS on Mac OS X with Correct Memory Settings

The shell scripts that launch WLS on Mac OS X don't seem to set the JAVA_VENDOR to Apple, which means that the relevant USER_MEM_ARGS are not specified when the server is started.

To remedy this I've been setting JAVA_VENDOR="Apple" before starting my domain.

But occasionally I forget.  So to automate the setting, I udpated $DOMAIN_DIR/bin/setDomainEnv.sh as follows:

if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
    JAVA_HOME="${BEA_JAVA_HOME}"
    export JAVA_HOME
else
    if [ "${JAVA_VENDOR}" = "Sun" ] ; then
        JAVA_HOME="${SUN_JAVA_HOME}"
        export JAVA_HOME
    else
        if [ "`uname`" = "Darwin" ] ; then
            JAVA_VENDOR="Apple"
            export JAVA_VENDOR

            JAVA_HOME="/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home"
            export JAVA_HOME
    fi
    fi
fi

This then results in the relevant MEM_ARGS for Apple being set later in the script:

if [ "${JAVA_VENDOR}" = "Apple" ] ; then
    MEM_ARGS="${MEM_ARGS} ${MEM_MAX_PERM_SIZE}"
    export MEM_ARGS
fi
Now starting the domain on Mac OS X, the necessary memory arguments are set on the JVM and the server runs as expected.

$ startWebLogic.sh
          ....
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02-279-10M3065)
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01-279, mixed mode)
Starting WLS with line:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -client   -Xms512m -Xmx512m -XX:MaxPermSize=128m -Dweblogic.Name=myserver ...

26 May 2010

More on the WLS Zip Distribution

My colleague Prash has recently added a post to the official WebLogicServer blog discussing the new WLS zip file distribution.

http://blogs.oracle.com/WebLogicServer/2010/05/the_new_wls_zip_distribution_w.html

He has helpfully included the contents of the readme.txt that ships within the zip file, just click on the link towards the bottom of the page to see it.

06 May 2010

JSF 2.0 Support in WebLogic Server 10.3.3

With the release of WebLogic Server 10.3.3 (now available on OTN) we have added support for JSF 2.0 by providing a JSF 2.0 shared-library that can be deployed and used with WebLogic Server.

The new JSF 2.0 shared-library is located here in a WLS 10.3.3 installation:

>$WL_HOME/common/deployable-libraries/jsf-2.0.war.

The shared-library name and spec/implementation version details are listed in the documentation here:

http://download.oracle.com/docs/cd/E14571_01/web.1111/e13712/configurejsfandjtsl.htm#sthref43

The JSF 2.0 shared-library follows the same model as the previous JSF libraries shipped with WLS, where it needs to be deployed and referenced using a &gt;library-ref&lt; in a WLS deployment descriptor by applications that wish to use it.

The JSF 2.0 library supports Dependency Iinjection of Java EE resources and the use of the Java EE 5 lifecycle annotations in Managed Beans as described in the specification.  This is done through the inclusion of a WLS specific class that implements the com.sun.faces.spi.InjectionProvider interface provided in the WEB-INF/lib/wls.jsf.di.jar library within the jsf-2.0.war shared-library.

We also continue to provide support for earlier JSF 1.2 releases.

18 February 2009

WebLogic Server Domain Builder

Have had to spend some time with the Domain Builder / Config Wizard combination this week. It seems like they provide a pretty useful capacity to build out a domain, which you can then run the domain builder over to produce a template, which you can use as a cookie cutter to reproduce it when needed. I confess I've barely gone beyond snorkel depth with it, but it looks like it could be pretty handy to reproduce setups, deploy sets of applications, etc.

Anyone got any feedback on its use in the real world?