martedì 31 luglio 2012

Oracle UCM: Dashboard

Dashboard is an Oracle WebCenter Content feature that allow to display useful data in simple portlets that are displayed to users. Dashboards can be set as WebCenter Content users homepage, this means that when a user access UCM after login page instead of the generic search form will be redirected to these dashboards.

Dashboards are fully customizable by admins and by users and they are basically folio templates containing one or more items. Any of these item composing a Dashboard is an idoc page which performs some action like search for specific content, displays active workflows, etc.

To enable Dashboard you need to enable ContentFolios component. To enable it login to UCM, go to Administration -> Admin Server -> advanced component manager -> CHECK all Category Filters -> under Disabled Components select ContentFolios and click Enable button.

Restart UCM service, then go to Administration -> Configure Record Settings -> under Records Management Install Settings select Standalone and under Installation Levels choose at least Minimal. Minimal enables some new features, including Dashboards. If you have more specific needs you should consider a deeper level. Clicking to "info" icon near each level gives you infos about features enabled by each installation level.



After selection you will need to restart UCM service.



After service restart when logged in you will be prompted by following screen



Under Define Defaults click every item and choose default metadata that will be associated to every Audit Entries.



Do the same for Screenings Reports



Then CHECK all items and click Submit button to proceed.



Click Records -> Dashboards then you can go to User Dashaboard, Admin Dashboard or Create a new Dashboard.



By enabling Dashboards some new filea have been uloaded to your Content Server, if you perform a search you will find some new files and two Folios with following ID:
        
ADMIN_TASKPANELS
USER_TASKPANELS

which are admin and users Dashboards respectively. By editing these folios you will see all items composing a Dashboard. Here you can add new items or deleting existing ones. By clicking the green arrow you can search for all panels in Content Server.



Some have been previsouly created but you can add custom ones too. Custom panels are created using IDOC Scripts but I will return on this with more details in a further post ASAP.

Once Dashboard modifications are complete remember to save changes.

That's all!!

lunedì 30 luglio 2012

Oracle UCM: Performing basic tasks using HCST and IDOC scripts


In this post I will create a simple HCST page containing some IDOC scripts that allow to perform some basic actions like searching for specific content among WebCenter Content and change metadata values on link click.

If you are new to IDOC I suggest you to have a look at documentation:

Idoc Script Reference Guide

Another really precious resource for IDOC, HCST, HCSP, and UCM in general is Brian Huff's book "The Definitive Guide to Stellent Content Server Development".

We will create a HCST (Hypertext Content Server Template) page that will contain both HTML and IDOC Scripts.

The following code will perform a search of all documents in UCM with:

Security Group: Public
Document Type: Document
Custom Metadata: Pending

Likely you will change these according to your UCM configuration.

Copy/paste the following code to "test.hcst"

<html>
<head>
<title>Simple HCST Page</title>
</head>

<body>

<$QueryText="dSecurityGroup <matches> `Public` <AND> dDocType <matches> `Document` <AND> xCustom_Metadata <matches> `Pending`"$>
<$executeService("GET_SEARCH_RESULTS")$>

<table>
<tr>
<td>View Content</td><td>Content ID</td><td>Check-in Date</td><td>Custom Metadata</td><td>APPROVE</td><td>REJECT</td>
</tr>
<$loop SearchResults$>
<tr>
<td><a href="<$SearchResults.URL$>">VIEW CONTENT</a></td>
<td><$SearchResults.dDocTitle$></td>
<td><$SearchResults.dInDate$></td>
<td><$SearchResults.xStatus_Offerta$></td>
<td><a href="<$HttpCgiPath$>?IdcService=UPDATE_DOCINFO_BYFORM&coreContentOnly=1&dID=<$SearchResults.dID$>&dDocName=<$SearchResults.dDocName$>&dRevLabel=<$SearchResults.dRevLabel$>&dSecurityGroup=<$SearchResults.dSecurityGroup$>&dDocAccount=<$SearchResults.dDocAccount$>&xCustom_Metadata=Approved&IsSoap=1">CLICK HERE TO SET CUSTOM METADATA TO APPROVED</a></td>
<td><a href="<$HttpCgiPath$>?IdcService=UPDATE_DOCINFO_BYFORM&coreContentOnly=1&dID=<$SearchResults.dID$>&dDocName=<$SearchResults.dDocName$>&dRevLabel=<$SearchResults.dRevLabel$>&dSecurityGroup=<$SearchResults.dSecurityGroup$>&dDocAccount=<$SearchResults.dDocAccount$>&xCustom_Metadata=Rejected&IsSoap=1">CLICK HERE TO SET CUSTOM METADATA TO REJECTED</a></td>
</tr>
<$endloop$>
</table>

</body>
</html>


Login to UCM and check-in test.hcst file. If you will publish hcst pages in a production environment I suggest to use Web Mapped Folders in order to have a more friendly URL.

Open page in a browser and you will see something like this.

giovedì 26 luglio 2012

Oracle UCM: Web Mapped Folders

Web Mapped Folders is a great feature of Oracle UCM that allow to access WebCenter Content folders and documents contained on them using an URL.

This feature is really useful when using Site Studio features because this allows your contents to be accessed in a friendly url like this:

http://YOUR_WEBCENTER_CONTENT_SERVER_IP_ADDRESS:16200/cs/Web/WEB_PAGE.HTML

instead of default content mapping that have a web location with an URL like this:

http://YOUR_WEBCENTER_CONTENT_SERVER_IP_ADDRESS:16200/cs/groups/public/documents/web/mdaw/mdaw/~edisp/WEB_PAGE.HTML

To enable Web Mapped Folders you need to enable "Folders_g" component. In case you have not activated it you can enable it login to Oracle UCM -> Administration -> Admin Server -> Component Manager -> click "advanced component manager" link -> on "Category Filters" CHECK all 3 items.

In "Disabled Components" list look for "Folders_g" and click Enable button, then perform a restart of UCM service.

When Folders_g is enabled go to Administration -> expand Folders Configuration -> click Web Url Mapped Folders.
Choose the folder you wish to map with a URL and it's URL Mapping then click Add button.



In this case I added a folder named "Web" and I choosed to leave the default mapping as "Web", this means this folder will be accessible at the following URL:

http://YOUR_WEBCENTER_CONTENT_SERVER_IP_ADDRESS:16200/cs/Web/

mercoledì 25 luglio 2012

Oracle VM: Using OVM Utils

OVM Utils are a set of utilities created by Wim Coekaerts (for further informations please read Wim's blog) and released on MOS that allow users to perform using Command Line Interface almost every task that can be performed using VM Manager web interface.

Installation is really simple, just download from http://support.oracle.com

Patch 13602094: ORACLE VM 3.0 UTILS RELEASE 0.4

It's a 2.9MB zip that will be installed on the same machine where Oracle VM Manager resides.

Once downloaded extract p13602094_30_Linux-x86-64.zip to

/u01/app/oracle/ovm-manager-3/


[root@vmm ovm-manager-3]# unzip p13602094_30_Linux-x86-64.zip

[root@vmm ovm-manager-3]# unzip ovm_utils_0.5.2.zip

[root@vmm ovm-manager-3]# cd ovm_utils


OVM Utils are 6 different executables:

ovm_managercontrol: Performs actions at VM Manager level such as configuring yum repos and create cpu compatibility group. This features is intresting since using this tool allows you to group to a single server pool server with different CPU family group.
Actions allowed are: yuminfo, yumsetup, addkeystore, keystoreinfo, createcpugroup, removecpugroup, addservertocpugroup, removeserverfromcpugroup, listcpugroups, getsessiontimeout,setsessiontimeout

ovm_poolcontrol: Performs actions at Pool level. Actions allowed are: status, info, events, refresh, list, addserver, removeserver

ovm_repocontrol: Performs actions at Repository level. Actions allowed are: list, status, info, refresh, fixup, create

ovm_servercontrol: Performs actions at Server level. Actions allowed are: start, stop, restart, kill, mainton, maintoff, status, info, lock, upgrade, events, refresh, discover, list, listnfsexports, createnfsexport, deletenfsexport

ovm_vmcontrol: Performs actions at Virtual Machine level. Actions allowed are: start, stop, suspend, resume, status, restart, kill, info, lock, list, migrate, events, vcpuset, vcpuget, gettags, settags, fixcfg, delete

ovm_vmdisks: Query the Virtual Disks associated with a Virtual Machine.

ovm_vmmessage: Allows the user to send a message to a Virtual Machine in the form of a key/value pair or send a query to see if a message with a key was set inside the Virtual Machine.


These utilities have to be called passing some parameters:

./ovm_UTILITYNAME -u ADMIN_USERNAME -p ADMIN_PASSWORD -h VMMANAGER_HOSTNAME -c COMMAND_TO_SEND [-OPTIONAL_PARAMETERS]


For example here are some commands:

1)Perform a server rediscovery. My server IP Address is 10.0.0.102

./ovm_servercontrol -u admin -p password -h localhost -c discover -s 10.0.0.102 -P server_password

2)List all VMs in the Pool

./ovm_vmcontrol -u admin -p password -h localhost -c list

This command produced, in my case, the following output:

VM name : 'Win7'
     uuid   : '0004fb00000600003ace83d53d5313b0'
     server : 'orclvmsrv1'
     pool   : 'CHP'
     status : 'Stopped'

VM name : 'EnterpriseManager'
     uuid   : '0004fb00000600005d4bfe48c8fe0cf9'
     server : 'orclvmsrv1'
     pool   : 'CHP'
     status : 'Running'

VM name : 'VMM'
     uuid   : '0004fb0000060000e0f49015b41ead02'
     server : 'orclvmsrv1'
     pool   : 'CHP'
     status : 'Running'


3)Stop a running VM

./ovm_vmcontrol -u admin -p password -h localhost -c stop -v EnterpriseManager


If you need more informations about OVM Utils you can just read the manual located at

/u01/app/oracle/ovm-manager-3/ovm_utils/man/man8

That's all!!

martedì 24 luglio 2012

Oracle Middleware: How to autostart Middleware services with NodeManager

This post explains how to configure NodeManager in order to perform services autostart in case of failure or manually via WebLogic Server web interface.

In order to configure NodeManager we need to create a configuration file, so login to your Oracle Middleware/WebLogic machine:

[oracle@orcl /]$ cd /home/oracle/Oracle/Middleware/wlserver_10.3/common/nodemanager

[oracle@orcl nodemanager]$ nano nodemanager.properties

Copy/paste the following configuration, changing "ListenAddress" and "ListenPort" according to your server configuration.

DomainsFile=/home/oracle/Oracle/Middleware/wlserver_10.3/common/nodemanager/nodemanager.domains
LogLimit=0
PropertiesVersion=10.3
DomainsDirRemoteSharingEnabled=false
javaHome=/home/oracle/Oracle/Middleware/jrockit_160_24_D1.1.2-4
AuthenticationEnabled=false
NodeManagerHome=/home/oracle/Oracle/Middleware/wlserver_10.3/common/nodemanager
JavaHome=/home/oracle/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre
LogLevel=INFO
DomainsFileEnabled=true
StartScriptName=startWebLogic.sh
ListenAddress=10.0.0.84
NativeVersionEnabled=true
ListenPort=5556
LogToStderr=true
SecureListener=false
LogCount=1
DomainRegistrationEnabled=false
StopScriptEnabled=false
QuitEnabled=false
LogAppend=true
StateCheckInterval=500
CrashRecoveryEnabled=true
StartScriptEnabled=true
LogFile=/home/oracle/Oracle/Middleware/wlserver_10.3/common/nodemanager/nodemanager.log
LogFormatter=weblogic.nodemanager.server.LogFormatter
ListenBacklog=50

Once this is done you can start Nodemanager:

[oracle@orcl nodemanager]$ /home/oracle/Oracle/Middleware/wlserver_10.3/server/bin/startNodeManager.sh

Now we need to configure WebLogic in order to make him communicate with NodeManager:

http://YOUR_MIDDLEWARE_SERVER_IP:7001/console

Click Machines -> Lock & Edit button -> New



Select a Name for Machine, set Unix and click Next button



Set "Type PLAIN" as we will not use SSL, "Listen Address" the IP address of your WLS machine and "Listen Port" the one configured in nodemanager.properties. Click Finish button then Activate Changes.



Click on the Machine you just created, in my case "Machine-0" then Configuration tab, Servers tab, Add button



Select an existing server to associate with NodeManager, click Finish button and then Activate Changes button.



Move to Servers tab, Control tab, select server and you will be able to control it from there.



In case of service failure it will be automatically restarted as long as Nodemanager and WebLogic Server are running.

I suggest you to add an autostart script for WebLogic and NodeManager in order to make them start automatically on boot.

lunedì 23 luglio 2012

Oracle Middleware: Authentication against Active Directory


I've to admit that user login based on Active Directory credentials for me was a painful process. It took me some weeks to figure out how this works since every tutorial I step into was giving me different interpretations. I had to implement user login based on Active Directory for Oracle UCM so I googled for some guides: some say you need to implement AD authentication both on WebLogic server and on Oracle UCM creating an AD Provider. After trial and error I figured out that the correct method is to enable AD just on WebLogic Server, no Provider or whatsoever is needed on Middleware side.

Please note that since WebLogic server is the webserver on which most (if not all) Oracle Middleware runs Active Directory authentication explained in this post works not just for Oracle UCM but for, I suppose, every other Oracle Middleware. I've successfully applied this to Oracle Business Intelligence too.

So, let's start configuring WebLogic Server. Login to your WLS console that usually is located at:

http://YOUR_MIDDLEWARE_SERVER_IP:7001/console

Go to Security Realms -> myrealm -> Providers -> click on Lock & Edit to enable WLS configuration modifications -> click New



Choose a name for AD provider and in the dropdown menu choose "ActiveDirectoryAuthenticator"



Once provider has been created it's time to edit according to your AD settings.
First click on DefaultAuthenticator and be sure that Control Flag is set to SUFFICIENT



Then click on your newly created ActiveDirectory provider and set Control Flag to SUFFICIENT.



Login to your AD server, you need some informations before continue:



As you can see in the figure above I've all AD users in a folder called Users.Right click on this folder, properties and here you can see the User Base DN.

Return to WebLogic Server and on ProviderSpecific tab set:

HOST: YOUR_ACTIVE_DIRECTORY_SERVER_IP
PORT: AD_PORT
PRINCIPAL: CN=administrator,CN=Users,DC=yourdomain,DC=yourdc
CREDENTIAL: administrator password



USER BASE DN: CN=Users,DC=yourdomain,DC=yourdc
ALL USERS FILTER: (objectclass=user)
User Name Attribute: sAMAccountName
User Object Class: user
Use Retrieved User Name as Principal: CHECK




GROUP BASE DN: CN=Users,DC=yourdomain,DC=yourdc
ALL GROUPS FILTER: (objectclass=group)
Group From Name Filter: (&(cn=%g)(objectclass=group))
Group Search Scope: subtree
Group Membership Searching: unlimited
Max Group Membership Search Level: 0
Ignore Duplicate Membership: UNCHECK
Use Token Groups For Group Membership Lookup: UNCHECK



Static Group Name Attribute: cn
Static Group Object Class: group
Static Member DN Attribute: member
Static Group DNs from Member DN Filter: (&(member=%M)(objectclass=group))



Connection Pool Size: 6
Connect Timeout: 0
Parallel Connect Delay: 0
Results Time Limit: 0
Keep Alive Enabled: UNCHECK
Follow Referrals: CHECK
Bind Anonymously On Referrals: UNCHECK
Propagate Cause For Login Exception: CHECK
Cache Enabled: CHECK
Cache Size: 32
Cache TTL: 60
GUID Attribute: objectguid



Then press Save -> Release Configuration button and perform a WLS restart.

If everything went fine on WLS restart you should be able to login to your Middleware using AD credentials. If at this point you still can't login using AD please verify that your USER BASE DN and GROUP BASE DN are set correctly according to your AD settings.

That's all!!

venerdì 20 luglio 2012

Oracle VM: Upgrade VM Manager to 3.1.1-365

This post is related to a recent patch released by Oracle with improves and corrects some issues affecting VM Manager 3.1.1.

To apply this patch first you need to download it from MOS:

Download Patch 14227416

When downloaded burn .iso file to a cd and mount it to your VM Manager Linux

[root@vmm /]# mount /dev/cdrom /mnt/cdrom
[root@vmm /]# cd /mnt/cdrom

Or if you like you can mount the .iso directly

[root@vmm /]# mount -o loop ovmm-3.1.1-upgrade-b365.iso /mnt/cdrom
[root@vmm /]# cd /mnt/cdrom

Start installation process by simply running

[root@vmm /]# ./runUpgrader.sh

Please note that you should perform a full backup of VM Manager database in case something goes wrong during installation process.

Here is the output produced during patch apply:


Stating OVM Manager upgrade on Thu Jul 19 11:15:58 CEST 2012

Oracle VM Manager 3.1.1.365 upgrade utility
Upgrade logfile : /tmp/upgrade-2012-07-19-15.log


It is highly recommended to do a full database repository backup prior to upgrading Oracle VM Manager ...

Press any key to continue ...


Oracle VM Manager is running ...
Verifying installation status ...
Read Oracle VM Manager config file ...
Skipping database upgrade for the same product version (3.1.1 to 3.1.1)
Found Oracle VM Manager install files ...
Found Oracle VM Manager upgrader ...
Found Oracle WebLogic Server ...
Found Java ...
Using the following information :
  Database Host          : 10.0.0.74
  Database SID           : ORCL
  Database LSNR          : 1521
  Oracle VM Schema       : ovs
  Oracle VM Manager UUID : 0004fb0000010000aef89d7d546a0d5e
  Current Build ID       : 3.1.1.305
  Upgrade from version   : 3.1.1
  Upgrade to version     : 3.1.1
Using /tmp/workdir.RnNTi2YzKa for backup and export location.
Using /tmp/patchdir.5j35ZzYWj for patching.
Undeploying previous version of Oracle VM Manager application ...
Undeploying Oracle VM Manager help ...
Undeploying Oracle VM Manager console ...
Undeploying Oracle VM Manager core ...
Waiting for Oracle VM Manager core to fully undeploy...
Waiting...
Finished undeploying previous version ...
Upgrading Oracle VM Manager ...
Backing up old files to /tmp/ovm-manager-3-backup-2012-07-19-111726...
Removing old files ...
Unpacking Oracle VM Manager 3.1.1.365
Refresh system-jazn-data.xml file ...
Redeploying Oracle VM Manager core container ...
Redeploying Oracle VM Manager console ...
Redeploying Oracle VM Manager help ...
Unpacking Oracle VM Manager OVM CLI Tool
Completed upgrade to 3.1.1.365 ...
Writing updated config in /u01/app/oracle/ovm-manager-3/.config
Restart WebLogic ...
Stopping Oracle VM Manager                                 [  OK  ]
Starting Oracle VM Managernohup: ignoring input and redirecting stderr to stdout
                                                           [  OK  ]

OVM Manager upgrade finished on Thu Jul 19 11:18:57 CEST 2012


Once installation is completed login to your VM Manager and everything should be back as normal and if you go to Help -> About you will see:


Oracle VM Manager
Version: 3.1.1.365
Build: 20120615_365

That's all!!