Multiple TM1Web URLs or instances

Post Reply
User avatar
vovanenok
Posts: 88
Joined: Mon Jun 23, 2014 4:54 pm
OLAP Product: TM1
Version: 2.0.9
Excel Version: Office 365
Location: Toronto, Canada
Contact:

Multiple TM1Web URLs or instances

Post by vovanenok »

Hi all

I have a few TM1 model servers and would like users to access them through TM1Web using different URLs. I don't want to show the server selection dropdown (leaving "TM1ServerName" parameter empty in "tm1web_config.xml") simply because:
1). I don't want an extra step when logging in to TM1Web
2). I don't want my web users to know about all the TM1 model servers (and ask me questions later).

My environment consist from the next severs:
Server 1: TM1 Admin Host and all TM1 servers
Server 2: TM1Web
Server 3: Cognos BI

TM1 version is 10.2. I have configured CAM authentication through Cognos BI. I'm using IIS as a web server
I remember in previous versions I could copy TM1Web folder and configure multiple virtual directories. But as I see it has changed in 10.2, virtual directories are not used anymore.
I tried to play with URL and parameters, I configured IIS to redirect URLs like "http://tm1webhost.com/tm1servername" to "http://tm1webhost.com:9510/tm1web?tm1servername"
Then I was setting a cookie for "tm1servername". But the problem is that cookie is not visible in "tm1web.html" as it is located on Cognos BI server (which is a different domain for TM1Web page).

I cannot add additional machines with TM1Web instances. I tried to install the second TM1Web instance on the Server 2 (TM1Web), but the installation wizard does not allow me to modify the installation directory (I run it as admin), I suppose because it detects the existing installation.

Anyway, I would appreciate any ideas how to solve my issue.
Thanks in advance!
----------
TeamOne Google Sheets add-on for IBM Planning Analytics
Let's connect on LinkedIn
lotsaram
MVP
Posts: 3652
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Multiple TM1Web URLs or instances

Post by lotsaram »

Have you tried a search for "setting up multiple tomcat instances on a single server"?

It is different to IIS but quite well documented.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
vovanenok
Posts: 88
Joined: Mon Jun 23, 2014 4:54 pm
OLAP Product: TM1
Version: 2.0.9
Excel Version: Office 365
Location: Toronto, Canada
Contact:

Re: Multiple TM1Web URLs or instances

Post by vovanenok »

lotsaram wrote:Have you tried a search for "setting up multiple tomcat instances on a single server"?

It is different to IIS but quite well documented.
Well, I was hoping for some easier solution :)
Will try to follow your suggestion, thanks lotsaram
----------
TeamOne Google Sheets add-on for IBM Planning Analytics
Let's connect on LinkedIn
User avatar
vovanenok
Posts: 88
Joined: Mon Jun 23, 2014 4:54 pm
OLAP Product: TM1
Version: 2.0.9
Excel Version: Office 365
Location: Toronto, Canada
Contact:

Re: Multiple TM1Web URLs or instances

Post by vovanenok »

Finally found the easier way.

In tm1_64\webapps\tm1web\scripts\tm1web\standalone\TM1WebApp.js there is a piece of code which generates URL for CAM server:

Code: Select all

window.location.href=_a576+"?b_action=xts.run&m=portal/bridge.xts&c_env=portal/variables_TM1.xml&c_cmd=../tm1/web/tm1web.html&ps="+_a578+"&pg="+"applications.jsp"+"&host="+this.host+"&server="+this.serverName;}
Using the URL rewrite I implemented on IIS side (transform "http://tm1webhost.com/tm1servername" to "http://tm1webhost.com:9510/tm1web?tm1servername"), I can retrieve required server name from the current URL:

Code: Select all

var sTM1SERVER = this.serverName;
if(location.href.indexOf("?")>0) {
    sTM1SERVER = location.href.substring(location.href.indexOf("?")+1,location.href.length);
}
Then everything is simple, we use it in the URL:

Code: Select all

window.location.href=_a576+"?b_action=xts.run&m=portal/bridge.xts&c_env=portal/variables_TM1.xml&c_cmd=../tm1/web/tm1web.html&ps="+_a578+"&pg="+"applications.jsp"+"&host="+this.host+"&server="+sTM1SERVER;}
The only thing, we still need to specify "TM1ServerName" parameter in "tm1web_config.xml" in order to avoid displaying the server selection page. Also that parameter will be used if users access the default TM1Web url http://tm1webhost.com:9510/tm1web, not using http://tm1webhost.com/tm1servername

The only improvement I'm planning to add is to validate "tm1servername" provided in the URL http://tm1webhost.com/tm1servername
----------
TeamOne Google Sheets add-on for IBM Planning Analytics
Let's connect on LinkedIn
Post Reply