Skip to content
Oct 6 / Administrator

PA/TM1 Git Integration

1.     Introduction to Integration with Git

Git repositories can now be used to store PA objects in a standard JSON format. Since PA also allows to pull the changes from this JSON format, you can now use a Git repository to migrate changes from one environment (e.g. Dev) to another (e.g. Prod).

Also, since the JSON format is well described and standard, you can potentially create applications to update a TM1/PA server objects in real time using PA ReST API and Git integration.

PA provides a set of ReST API functions to interact with Git. However, before you could connect to Git there are few things that you need to do. This guide provides step by step instructions to setup and then connect to a Git repository.

The guide uses Github, but the steps could be used for any other Git provider.

 

2.     Create a new Git Repository

You can go to github.com, sign-up/sign-in, and then create a new Git repository that you want to use for storing TM1 object sources. Once you’ve created the repository, keep the repo URL. We’d use it in next steps.

 

3.     Export Git Server Certificate

Open the github.com (or any other git provider that you want to use) in a browser window.

When you click on the certificate option, the certificate will be opened in a new window.

The certificate window will show total 3 certificates.

You need to import all 3.

Click on the first one, then click on View certificate button below, and export it.

Similarly, click on the second one, and then export it to a file. You can export the third one (github.com) from the “first” window that you had opened.

Exporting 3 files will give you 3 (*.cer) files that you need to import into PA certificate store.

 

4.     Import Git Server Certificates

Copy the 3 certificate files that you exported into the following directory:

C:\Program Files\ibm\cognos\tm1_64\bin64\ssl

NOTE: You don’t necessarily need to copy the certificates to this directory specifically, you can choose any other directory, just remember to use the corresponding path in the certificate import command.

Launch command prompt in the administrator mode and run following commands to import the certificates:

  • "C:\Program Files\ibm\cognos\tm1_64\bin64\gsk8capicmd_64.exe"
-cert -add -db "C:\Program Files\ibm\cognos\tm1_64\bin64\ssl\ibmtm1.kdb"

-file "C:\Program Files\ibm\cognos\tm1_64\bin64\ssl\github.cer"

-label github -stashed -format ascii -trust enable

  • "C:\Program Files\ibm\cognos\tm1_64\bin64\gsk8capicmd_64.exe"
-cert -add -db "C:\Program Files\ibm\cognos\tm1_64\bin64\ssl\ibmtm1.kdb"

-file "C:\Program Files\ibm\cognos\tm1_64\bin64\ssl\git2.cer"

-label github2 -stashed -format ascii -trust enable

  • "C:\Program Files\ibm\cognos\tm1_64\bin64\gsk8capicmd_64.exe"
-cert -add -db "C:\Program Files\ibm\cognos\tm1_64\bin64\ssl\ibmtm1.kdb"

-file "C:\Program Files\ibm\cognos\tm1_64\bin64\ssl\git3.cer"

-label github3 -stashed -format ascii -trust enable

 

NOTE:

  • Provide the correct path of gsk8capicmd_64 file.
  • Provide the correct certificate store file path.
  • Remember the file will be in a different (probably in bin) folder for 32-bit version.
  • Verify the correct path to the certificates you exported.
  • Provide the correct certificate file names.
  • The above commands have been shown in few different lines for legibility, you’d have to put your commands in one line.

If you ran the command correctly, it should finish without any message.

Sample output:

5.     Initiate Remote Git

Before you could commit the changes to a git repository, you need to connect/bind your PA model to it. For doing so, you need to run a GitInit call on your PA model and provide the remote Git details. On running this command, a new control directory }git is created in your data folder.

Open Postman and hit following URL:

POST https://<server_ip>:<http_port>/api/v1/GitInit

{

“URL”: “<repository URL>”,

“Deployment”: “dev”,

“Username”: “<provide your username>”,

“Password”: “<provide your password>”,

“Force”: true

}

See sample below:

NOTE: In the sample screenshot above, the real username and password have been removed.

If the command ran successfully, you should see the HTTP return status 201 Created

6.     Push Objects to Git

6.1        Stash the changes

Make following ReST call to push objects to the repository:

POST https://<server_ip>:<http_port>/api/v1/GitPush

{

“NewBranch”: “Monthly_Hierarchy_Changes”,

“Force”: “true”,

“Message”: “Updated entity and product dimensions”,

“Author”: “Rahul”,

“Email”: “admin@abcd.com”

}

 

If the call ran successfully, you’d see the HTTP return status as 201 Created. In the response JSON, note down the ID returned, we’d need to use it in our next API call.

6.2        Commit the changes to Git

Now execute the GitExecute ReST call to push the changes to your remote git repository.

If the call ran successfully, you should receive 204 No Content HTTP status message.

On successful execution, you can verify that your empty git now has files:

7.     Pull Objects from Git

Before you could pull the changes into a different target PA application model, you need to do a GitInit on that model as well.

So, execute the GitInit:

POST https://<server_ip_2>:<http_port_2>/api/v1/GitInit

{

“URL”: “<repository URL>”,

“Deployment”: “dev”,

“Username”: “<provide your username>”,

“Password”: “<provide your password>”,

“Force”: true

}

 

Remember that server IP and http port will be of the target PA server.

Running this call binds the target server with the same Git repository. So now we can pull the changes from it.

7.1        Create a Git Pull Plan

Run following ReST call to create a pull plan on the target.

POST https://<server_ip_2:<http_port_2>/api/v1/GitPull

{

“Branch”: “Monthly_Hierarchy_Changes”,

“ExecutionMode”: “SingleCommit”,

“Force”: “true”,

“Username”: “<git username>”,

“Password”: “<git password>”

}

Remember that the branch should be the branch from which we want to pull the changes. In our case, we want to pull Monthly_Hierarchy_Changes since that’s the branch we pushed our dimension changes to.

The call will return a pull plan ID that we’d need to use in our next call to execute the plan.

7.2        Execute the Git Pull Plan

POST https://<server_ip>:<http_port>/api/v1/GitPlans(’42fg0YCCYyI=’)/tm1.Execute

{

“Branch”: “Monthly_Hierarchy_Changes”,

“ExecutionMode”: “SingleCommit”,

“Force”: “true”,

“Username”: “<git username>”,

“Password”: “<git password>”

}

The successful completion of ReST call will return 204 No Content status.

After completion of this call you can verify the objects in the data directory or using IBM TM1 Architect etc.

8.     Detach Git from PA Server

You can use UnInit ReST call to detach the Git repository from PA server. Doing so will remove the control }Git folder and disable all other Git related functions except GitInit.

9.     Important Links

TM1 Git Integration IBM Documentation

GitHub.com

 

Keywords: PA/TM1 Git Integration, Migrate PA dev to prod using Git, TM1 API ReST calls for Git Integration, TM1 and Git

 

This post has been written by our Guest Writer Rahul Parashar from IBM

Aug 4 / Administrator

Install TM1 Server as a Windows Service

 

Here is the command to install TM1 server as a Windows service:

tm1sd.exe -install -n “TM1 Server Name” -z “Data directory Path”

 

Syntax:

tm1sd.exe -install parameters

 

Parameters:

1. -n Name of your TM1 server. This will become the windows service name.
2. -z Path to the data directory folder which contains tm1s.cfg file.
3. -u Username.
4. -w Password of above account

 

Examples:

1. Install TM1 server TutorialGo as a windows service TutorialGo. The data directory (which contains cfg file) is in D:\\TutorialGo\\DataDir

Command:
tm1sd.exe -install -n TutorialGo -z D:\\TutorialGo\\DataDir

2. Install TM1 server SData as a windows service dev_sdata. The data directory (which contains cfg file) is in D:\\My Documents\\SData. Please install this service from the user account DOMAINNAME\\Administrator. Password for this account is pass@123

Command:
tm1sd.exe -install -n “dev_sdata” -z “D:\\My Documents\\SData” -u DOMAINNAME\\Administrator -w pass@123

Jul 29 / Administrator

TI to Replace Dynamic Subsets with Static Subsets

Dynamic subsets are always better when your dimension is changing frequently and you have to use a subset of that dimension in your cube view. But dynamic subsets consume considerable amount of memory. So it’s advisable that if possible, you should use static subsets to dynamic subsets.

 

TM1 consultant Rahul Parashar has submitted a TI process which can help you manage that in your model. You can keep a list of all the dynamic subsets of your model in a cube and a TI created by him can convert all such subsets to static subsets in single go. How cool is that!

read more…

Jul 5 / Administrator

TI to Fill TM1 Cube with Dummy Values

This article is about a TI to fill TM1 cube with dummy values. From time to time you may require some dummy data in your cube so that you can do full fledged testing of your rules and consolidations.

A TM1 consultant Rahul Parashar has submitted a turbo integrator process which does just that. Here are the details of the process:

read more…

May 20 / Administrator

12. TM1 Perspective

Introduction to TM1 Perspective

You can integrate all your TM1 data with Microsoft Excel and use it in graphs etc. You do this by using TM1 Perspective. It’s an excel add-in which helps you get connected to your TM1 application server. Follow below steps:

1. Go to Start > All Programs > IBM Cognos > Perspective For MS Excel (if you’re using Windows 7, figure out how you’re going to open this path, may be just search for Perspective)

2. MS Excel will open and will ask you to enable macros. Enabling macro will launch IBM’s TM1 perspective with Excel.

3. Go to TM1 menu bar, then click Connect and login to your TM1 admin server. You’ll receive a message saying that you’re now connected. Click OK. Now let’s learn how you can get the data from cubes into MS Excel.

read more…

May 15 / Administrator

11. Setting up Security in TM1

Introduction to Security in TM1

You can control access to TM1 objects by assigning specific levels of object security to a TM1 group. Each object type in TM1 can be assigned specific level of security. For example, cubes, dimension, processes, applications, chores etc.

 

Basic security in TM1 can be defined in 3 steps:

1. Creating and managing clients

2. Assigning clients to groups

2. Defining security for groups

NOTE: Remember, you can not apply security directly at user level. Users are added into groups and security is then defined on groups. 

read more…

Thank you for Downloading.

Please input valid email id so that we can send you download link.

Email id Required.

We respect your privacy and never share your email id with anybody.