If you learned something
today, please
1x

Thinking about Key Drivers to Architecture Approaches

June 21st, 2015
No Gravatar

For a solution architecture to be of utmost value it must address the target business capabilities in a manner that is maintainable, extensible and scalable. Solution Architectures follow unstated core drivers that influence the focus of the approach. The most common of these drivers are (in order): Initial Cost, Vendor Capability, Total Cost and Business Capabilities. These drivers are not mutually exclusive, and the key driver will be what each of the other drivers are weighed against in the solution. Each driver has value to the project and the enterprise as a whole.

In my opinion, Business Capabilities is the best key driver to have. Business Capabilities are what support growth and sustainability and contribute the most to the enterprise. The other drivers should not be completely sacrificed, but when they are given priority the result is frequently a gap between actual need and provided solution. They are driven by agendas that are secondary to the overall enterprise needs and better kept in the corresponding secondary priority.

This is not to say that every business capability requested by an individual or group is valuable to the enterprise as a whole. The business capabilities to focus energy and resources on needs to be carefully chosen by the business, and once identified as a core need of the enterprise should take its place as the key driver.

Compact Virtualbox VDI Image to Save Space

June 15th, 2015
No Gravatar

Takes me forever to find this StackExchange post every time I need it, so I’m copying it here for ease of reference:

  1. Run defrag in the guest (Windows only)
  2. Nullify free space:

    With a Linux Guest run this:

    sudo dd if=/dev/zero of=/bigemptyfile bs=4096k
    sudo rm -rf /bigemptyfile
    

    With a Windows Guest, download SDelete from Sysinternals and run this:

    sdelete –z
    
  3. Shutdown the guest VM
  4. Now run VBoxManage’s modifyhd command with the --compact option:

    With a Linux Host run this:

    vboxmanage modifyhd /path/to/thedisk.vdi --compact
    

    With a Windows Host run this:

    VBoxManage.exe modifyhd c:\path\to\thedisk.vdi --compact
    

    With a Mac Host run this:

    VBoxManage modifyhd /path/to/thedisk.vdi --compact
    

This reduces the vdi size.

Creating the WebCenter Sites User Account on Oracle XE

May 20th, 2015
No Gravatar

The documentation uses OEM to do this, something that Oracle XE does not have. Has a non-DBA, I find installing Oracle EE tedious. Thanks to waslleysouza.com.br, I was able to find the right script to execute with XE. For the DB-disabled like myself, here are the full steps to do this on a Linux host:

  1. login to linux as a member of the dba group or sudo as same
  2. # echo $ORACLE_SID
  3. # echo $ORACLE_HOME

if either is blank:

# set ORACLE_SID=XE (or your service id)
# set ORACLE_HOME= (Eg: C:\oraclexe\app\oracle\product\10.2.0\server)
  1. #locate sqlplus
  2. run [RESULT FOUND PATH]sqlplus / as sysdba

i.e.,
# /u01/app/oracle/product/11.2.0/xe/bin/sqlplus / as sysdba

  1. execute the following (replace values inside [brackets]):
CREATE USER [csuser] IDENTIFIED BY [password] DEFAULT TABLESPACE users TEMPORARY TABLESPACE temp;
GRANT CREATE session, CREATE table, CREATE view TO [csuser];
GRANT UNLIMITED TABLESPACE TO [csuser]; 
COMMIT;

Speeding Up JDeveloper 11gR1 on Windows

April 24th, 2015
No Gravatar

Here’s a tip sent to me by Songpol Siengvisuth:

By default JDeveloper was installed with Oracle Look and Feel and while it looks nice, a customized Look and Feel like that actually consumes more memory hence worse performance. We can switch to use a simpler Look and Feel like Windows Default by following these Steps:

  1. In JDeveloper, Go to Tools > Preferences
  2. Select “Environment” and Look for “Look and Feel” dropdown, you will find “Oracle” is selected
  3. Change to “Windows” and Click OK
  4. Restart JDeveloper to active the new Look and Feel
JDeveloper Prefrences

JDeveloper Prefrences

After the restart you will find JDeveloper look much plainer but the improved performance is noticeable.

SSH NodeManager Headache Solved

March 26th, 2015
No Gravatar

For the longest time I could not get the ssh NodeManager to work on my VirtualBox VM I use for proving out approaches. It was not a big problem to use the command line start, so I did, until recently I needed to precisely replicate the start up process used in production.

After much thumping of forehead on desk (and steering wheel, and pillow, and…) I found this nugget at http://www.pythian.com/blog/why-was-sshd-refusing-my-key/:

…In our environment, we are not using SELinux so we disabled it by setting SELINUX=disabled
in /etc/selinux/config and rebooted the system….

 

Customizing WebCenter Logging with WLST

January 17th, 2015
No Gravatar

Like many enterprises, the one I’m currently working with only provides developers with the Monitor role in production. This requires scripting tasks that are well-documented for manually performing but take some real thinking and testing to get right as a script.

One of my team members frequently says that code should be self-documenting, so rather a long blog entry I thought I would simply post the script along with some minimal comments and see if everyone finds that useful:

def configureAdfLogHandlers():
#The full script has multiple methods, so I print the currently running method to follow along
	print 'Start configureAdfLogHandlers()'
	managedServers=cmo.getServers()
	for managedServer in managedServers:
		sname=managedServer.getName()
		path = '/Servers/' + sname
		cd(path) 
		lh = listLogHandlers(returnMap='true')
		for l in lh:
			lname = l.get('name')
#Even with this script, the odl logs are quite verbose and we run an automated arciving process. 
#To simplify the process, we just put the logs in the archive path since the odl log handlers don't provide an archive location option
			odlfile = '${domain.home}/logs/LOGS/${weblogic.Name}-' + lname + '.log'
			print '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
			print '   Setting log handler configuration for ' + lname
			print '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
#The custom code rarely uses any levels between debug and warning, and the notice level for Oracle code is too verbose for most trouble-shooting needs
			configureLogHandler(target=sname,name=lname,path=odlfile,rotationFrequency='daily',retentionPeriod='day',maxLogSize='1g',maxFileSize='100m',level='WARNING:7')
		print '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
		print '   Setting logger configuration for ' + sname
		print '%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%'
#The custom code used by the application sets of warnings in these packages that are not issues for the application, so we set the level to ERROR here
		setLogLevel(logger='oracle.webcenter.page',level='ERROR:1',target=sname,persist='1',addLogger='1')
		setLogLevel(logger='oracle.webcenter.framework.service.Utility',level='ERROR:1',target=sname,persist='1',addLogger='1')
		setLogLevel(logger='org.apache.myfaces.trinidadinternal.skin.SkinCSSDocumentHandler',level='ERROR:1',target=sname,persist='1',addLogger='1')

connect(os.getenv('WLS_USER'),os.getenv('WLS_PW'),os.getenv('ADMIN_T3'))
configureAdfLogHandlers()
disconnect()
exit()

 

Speeding Up WebLogic Server Console First Access on Linux

October 20th, 2014
No Gravatar

It has been posted many times, but since I ran across it again and it made a significant improvement, I’ll repeat it for others.

Add the following to your WLS start up arguements:

-Djava.security.egd=file:/dev/./urandom

If you are interested in details, see https://bugs.openjdk.java.net/browse/JDK-6202721

Fixing Silent Domain Builds with WebCenter Portal

October 12th, 2014
No Gravatar

Automating domain creation is important for enterprises to minimize maintenance cost and be prepared for efficient disaster recovery. One enterprise I worked with was struggling with the domains they were building through scripts as the Enterprise Manager was not working properly in the completed domains and the managed servers would come up in Admin mode.

After comparing the scripted domain to a manually created domain that worked correctly it was found that the paths for the libraries did not match. The paths in config.xml were missing the beginning of the path where the libraries were actually located. While the installation paths chosen were not the default paths, this did not entirely explain the issue, and internal processes made the custom paths highly desirable.

The correction for this issue was to add a function to the offline WLST script run on completion of the domain creation to correct the library paths:

def fixApplicationSourcePaths():
  appPathPrefix = os.getenv('DOMAIN_HOME')+'/applications/'
  cd('/AppDeployments/')
  deployed_apps = ls(returnMap='true')
  for app in deployed_apps:
    cd('/AppDeployments/'+app)
    apppath = get('SourcePath')
    if apppath.find('/app/')!=0:
      apppath = apppath.split('/')
      apppath = apppath[-1]
      set('SourcePath',appPathPrefix+apppath)
  cd('/Libraries/')
  deployed_libs = ls(returnMap='true')
  for lib in deployed_libs:
    cd('/Libraries/'+lib)
    apppath = get('SourcePath')
    if apppath.find('/app/')!=0:
      set('SourcePath',appPathPrefix+apppath)

With this change, domains were created consistently as desired.

Correcting WLS Console Hang with SSH Node Manager Environment

October 4th, 2014
No Gravatar

I was having a frustrating situation yesterday where the WLS console would just hang after clicking the Servers link. Naturally I go to the Unix console to tail the logs and see what’s what, and these prompts for a password keep popping up. Entering the admin password is no help.

So I went to the next natural step of rebuilding the domain (the build is scripted, and yes, I backed up the domain first) and the problem is still there!

An email to a colleague more steeped in the dark arts of server administration than I results in the suggestion that this is due to a problem with SSH (the domain uses SSH Node Manager) and tells me test it with:

ssh username@hostname

to confirm connectivity and permissions.  What I get back is:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Permissions 0755 for '/app/home/username/.ssh/id_rsa' are too open.

It is required that your private key files are NOT accessible by others.

This private key will be ignored.

bad permissions: ignore key: /app/home/username/.ssh/id_rsa

Password:

With this new detail in mind, I went to an environment that was working, found it had the file permission set at 600, and preforming

chmod 600 /app/home/username/.ssh/id_rsa

Got me up and running again

For Those That Don’t Get Git

September 15th, 2014
No Gravatar

I do appreciate why developers like Git, with the low overhead and distributed repository.

As someone who is tasked with code reviewing in addition to writing code and managing builds and releases, I find it difficult to get behind Git because of the lack of tools for performing these tasks. Until I work on a project where it can be taken for granted that everyone wrote perfect code, I need something to help locate newly checked in files and allows for manual merging.

Until then, I have found Git Extensions is at least a good start. The diff and blame views make for easier code reviewing. It still lacks an easy way of locating updates by date for an entire repository, but it is a start to getting by with Git.

If anyone has found better tools for reviewing code in a Git repository, please post your comments!