29
uPortal 101 uPortal 101 JA-SIG Pre-conference JA-SIG Pre-conference Seminar Seminar Susan Bramhall & Andrew Susan Bramhall & Andrew Petro Petro Vancouver, BC, June 4, 2006 Vancouver, BC, June 4, 2006

UPortal 101 JA-SIG Pre-conference Seminar Susan Bramhall & Andrew Petro Vancouver, BC, June 4, 2006

Embed Size (px)

Citation preview

uPortal 101uPortal 101

JA-SIG Pre-conference SeminarJA-SIG Pre-conference Seminar

Susan Bramhall & Andrew PetroSusan Bramhall & Andrew Petro

Vancouver, BC, June 4, 2006Vancouver, BC, June 4, 2006

Who am I?Who am I?

Yale University Portal ImplementerYale University Portal Implementer Occasional contributor to uPortal Occasional contributor to uPortal Early adopter of Distributed Layout Early adopter of Distributed Layout

ManagerManager GrandmotherGrandmother

Our AgendaOur AgendaPlease follow along on the wiki:Please follow along on the wiki:

http://www.ja-ig.org/wiki/display/JCON/uPortal+101http://www.ja-ig.org/wiki/display/JCON/uPortal+101

1.1. Building uPortalBuilding uPortal2.2. LoggingLogging3.3. Configuration Flavors (properties, Spring, xml)Configuration Flavors (properties, Spring, xml)4.4. DatabaseDatabase5.5. Starting it up!Starting it up!6.6. AuthenticationAuthentication7.7. User Attributes, IPersonUser Attributes, IPerson8.8. GroupsGroups9.9. ChannelsChannels10.10. Layout Management (very brief)Layout Management (very brief)11.11. Stats RecordingStats Recording

Building uPortalBuilding uPortal

Details in the wiki at: Details in the wiki at: http://www.ja-ig.org/wiki/display/JCON/uPortal+101http://www.ja-ig.org/wiki/display/JCON/uPortal+101

1.1. Set up development environment in EclipseSet up development environment in Eclipse2.2. Create project containing uPortal 101 Vancouver Create project containing uPortal 101 Vancouver

branch from JA-SIG repositorybranch from JA-SIG repository3.3. Compile and deploy to Tomcat ServerCompile and deploy to Tomcat Server

We will use ant tasks to run other uPortal tools. We will use ant tasks to run other uPortal tools. – Source for tools in package org.jasig.portal.toolsSource for tools in package org.jasig.portal.tools

uPortal DatabaseuPortal Database

JNDI or JDBCJNDI or JDBC rdbm.properties vs container DAO rdbm.properties vs container DAO Tests by DatabaseMetaDataTests by DatabaseMetaData Pooling ConnectionsPooling Connections

JNDI or JDBC?JNDI or JDBC?

In portal.properties:In portal.properties:

RDBMServices.getDatasourceFromJndiRDBMServices.getDatasourceFromJndi– ““false” when no containerfalse” when no container– ““true” if container suppliedtrue” if container supplied

RDBMServices.jndiRetryDelayRDBMServices.jndiRetryDelay

RDBMServices.PortalDatasourceJndiNameRDBMServices.PortalDatasourceJndiName– The name used to request data source from The name used to request data source from

containercontainer

rdbm.propertiesrdbm.properties

rdbm.properties jdbc parameters:rdbm.properties jdbc parameters:

jdbcDriver=org.hsqldb.jdbcDriverjdbcDriver=org.hsqldb.jdbcDriver

jdbcUrl=jdbc:hsqldb:hsql://localhost:8887jdbcUrl=jdbc:hsqldb:hsql://localhost:8887

jdbcUser=sajdbcUser=sa

jdbcPassword=jdbcPassword= Also has pooling built in viaAlso has pooling built in via

jdbcUsePool=truejdbcUsePool=true

JNDIJNDI

Container supplies data sourceContainer supplies data source Well known implementationsWell known implementations Ant deploy target populates context Ant deploy target populates context

descriptor (uPortal.xml or descriptor (uPortal.xml or uPortal55.xml) from rdbm.propertiesuPortal55.xml) from rdbm.properties

RDBMServices.getDataSource(name) RDBMServices.getDataSource(name) – Will return any available jndi data Will return any available jndi data

source to a channelsource to a channel

Pooling Database ConnectionsPooling Database Connections

Definitely need to do this either Definitely need to do this either using RDBMServices or containerusing RDBMServices or container

See uPortal.xml and See uPortal.xml and uPortal55.xml for example uPortal55.xml for example configurationsconfigurations

RDBM Services MetadataRDBM Services Metadata

Attempts to do outer joins to Attempts to do outer joins to determine correct syntaxdetermine correct syntax

Join test failed: Errors in log are Join test failed: Errors in log are normal normal

uPortal Database in PracticeuPortal Database in Practice

For this seminar see wiki:For this seminar see wiki:

http://www.ja-sig.org/wiki/x/2Dshttp://www.ja-sig.org/wiki/x/2Ds Start hsqldbStart hsqldb Set up uPortal 101 project to point to Set up uPortal 101 project to point to

hsqldbhsqldb Verify using “ant dbtest”Verify using “ant dbtest”

Start uPortalStart uPortal

1.1. Run “ant initportal”Run “ant initportal”

2.2. Start TomcatStart Tomcat

3.3. Browse to Browse to http://localhost:8080/uPortalhttp://localhost:8080/uPortal

Tah-Dah!

User Attributes / Person DirectoryUser Attributes / Person Directory

IPerson is the object containing IPerson is the object containing user attributesuser attributes

Attributes come from jdbc or Attributes come from jdbc or ldap ldap

Or a source you inventOr a source you invent

PersonDirectory.xmlPersonDirectory.xml

Legacy is PersonDirs.xmlLegacy is PersonDirs.xml– Jdbc and ldap parameters inlineJdbc and ldap parameters inline

API allows extensionAPI allows extensionSpring configurable beansSpring configurable beans

Spring BeansSpring Beans JNDI DAOsJNDI DAOs LDAP LDAP WrappersWrappers

– Merging, cachingMerging, caching

Example: Example:

http://www.ja-sig.org/wiki/x/Xjwhttp://www.ja-sig.org/wiki/x/Xjw

User ManagementUser Management

Q:Q: OK, I have configured the user object. OK, I have configured the user object. How do users get created?How do users get created?

A:A: It all happens at login It all happens at login– After Authentication succeeds…After Authentication succeeds…– Attributes are found via Person directory Attributes are found via Person directory

serviceservice– Layout is determined by layout manager based Layout is determined by layout manager based

on groups and user attributes.on groups and user attributes.– How? Come back after short break to get the How? Come back after short break to get the

rest of the storyrest of the story

Back After a Short Break…Back After a Short Break…

Groups ManagementGroups Management

See wiki:See wiki:http://www.ja-sig.org/wiki/display/UPC/http://www.ja-sig.org/wiki/display/UPC/

Composite+Group+Service+GuideComposite+Group+Service+Guide

Groups ServiceGroups Service– Extensible through APIExtensible through API– Configurable via XMLConfigurable via XML– Combine as many as needed into Combine as many as needed into

Composite Group ServiceComposite Group Service

compositeGroupServices.xml compositeGroupServices.xml

Starts with Local groups in Starts with Local groups in

uportal databaseuportal database Includes comments for Includes comments for

– LDAP group service (beware)LDAP group service (beware)– File System group serviceFile System group service– Person Attribute Group service Person Attribute Group service

(PAGS)(PAGS)

Local Groups in uPortal DatabaseLocal Groups in uPortal Database

Persisted in uPortal databasePersisted in uPortal database groups management channelgroups management channel Users are copied to the local groups Users are copied to the local groups

of assigned template on first loginof assigned template on first login Group membership does not change Group membership does not change

automatically after login automatically after login Appropriate for local portal Appropriate for local portal

permissionspermissions

Other Group StoresOther Group Stores

File System GroupsFile System Groups– Based on file system directory structureBased on file system directory structure

LDAP groupsLDAP groups

AndAnd

Person Attribute Group StorePerson Attribute Group Store– Based on attributes of IPersonBased on attributes of IPerson– Try out http://www.ja-sig.org/wiki/x/YjwTry out http://www.ja-sig.org/wiki/x/Yjw

Layout ManagementLayout Management

How does content How does content get into a user’s get into a user’s layout?layout?

SLM vs. ALM vs. DLMSLM vs. ALM vs. DLM

The LayoutThe LayoutAn xml tree of generic folders and channelsAn xml tree of generic folders and channels

folder (tab)

folder (column)

channelchannelchannel

folder (column)

folder (tab)

folder (column)

channelchannel

folder (column)

folder type=“root”

folder (tab)

folder (column)

channelchannel

Which Layout Manager?Which Layout Manager?

Simple Layout Manager (SLM)Simple Layout Manager (SLM)– uPortal 1.0 to presentuPortal 1.0 to present

Aggregated Layout Manager (ALM)Aggregated Layout Manager (ALM)– uPortal 2.0 to presentuPortal 2.0 to present

Distributed Layout Manager (DLM)Distributed Layout Manager (DLM)– uPortal 2.5 to presentuPortal 2.5 to present

Steps to Pushing DLM Steps to Pushing DLM FragmentFragment

1.1. Define the fragment in Define the fragment in dlm.xmldlm.xml

2.2. Login as the fragment owner Login as the fragment owner and set up the layoutand set up the layout

Exercising DLMExercising DLM

See Mark Boyd’s excellent See Mark Boyd’s excellent documentation DLM Administration documentation DLM Administration GuideGuide

An exercise if there is time:An exercise if there is time:

http://www.ja-sig.org/wiki/x/ajwhttp://www.ja-sig.org/wiki/x/ajw

There is lots more to learnThere is lots more to learn

For example:For example: Caching optionsCaching options Internationalization / localizationInternationalization / localization ssl issues, HttpProxyServletssl issues, HttpProxyServlet Using other containersUsing other containers Running unit testsRunning unit tests More extension pointsMore extension points

Good Luck!Good Luck!

Use the wiki and list archives for questions

Can’t find the answer? Ask the list.

Research and report bugs on JIRA

Lists: http://www.uportal.org/getinv.htmlWiki: http://www.ja-sig.org/wiki/display/UPC/HomeJIRA: http://www.ja-sig.org/issues