ETL Automated deployment groups.

Posted: October 2, 2015 in Informatica

Automated Deployment Script for Windows:-

Supported versions:- Informatica Power center 9x/8x

Prerequisites for the script to run are as follows.

1) Infrastructure:- Open all ports in the node port range.
2) Create a label (to label the objects that needs to migrate).
3) Create Query (using the Label).
4) Create dynamic deployment group using the query.

what is a deployemnt group?
A Deployment Group is an object, which contains Informatica components (source, target, transformations, mapping, session, workflow etc) of one or more Informatica Folders. Deployment Groups are used to move Informatica PowerCenter code from one repository to another.

How to add objects to deployemnt group?
The objects can be added manually or with the help of query. In this script we are using query to add objects to the deployment group.

Types of deployemnt groups available?
1) Static: one can add objects manually to the static deployment group or by using query.
2) Dynamic: only qury will be used to add objects to the group.
What is Query?
A query is an object used to search for versioned objects in the repository that meet specific conditions.
how to create a query?
Repository Manager: – Go to repository manager  Tools  Queries  New inside select the below parameters.
Query Name: – Give a name to the query.
Query Type: – “Shared”
Query Desc: – Give appropriate description.
Query Conditions: – Add a new query parameter to this query.
Below are the condtitons used.
Parameter Name –> “Label” –> Operator –> “Is Equal To” –> value 1 –> “select the Label”.
And
Parameter Name –> “Reusable Status” –> Operator –> “Is One Of” –> value 1 –> “Non-reusable,reusable”.

s

Note:-
The dynamic deployment query does not return non-reusable child objects with parent objects. To ensure that the dynamic query returns reusable and non-reusable child objects, include the Reusable Status parameter in the query and specify reusable and non-reusable values. In addition, include a Latest Status parameter in the query and specify the latest checked-in and older values.

What is Lable?
A label is a versioning object that you can associate with any versioned object or group of versioned objects in a repository. The usage of labels provides the following benefits:

• Version tracking of the objects during development
• Bundles groups of objects for deployment.

Creating a Label:
Please refer the below like for more information.
https://www.youtube.com/watch?v=VTnai2AC2BY

Follow the below stepts to create label.

Repository Manager: – Go to repository manager –> versioning –> Labels –> New.
Follow __ (project name, CR number, Date time) naming conversion for the label name.
Once the Label is created, development team’s will Label all the objects that needs to migrate.

Note: – The “Lock” option is used to prevent other users from editing or applying the label.
The development team will Label all the objects that are required to migrate to the upper environment.

Dynamic Deployment Group Creation

To create the deployment group, go to repository manager and right click on the “Deployment Groups” folder and select New Group.

deplo

Deployment Group name: – XXX_DEPLOY_GROUP
Group Type: – Dynamic
Query Name: – Select the query create for this deployment.

Once the deployment group is created one can check in the navigator window.

g

All set let’s jump into the script.

Scripts and files required to achive the automated deployment are as follows.
Scripts:- The below scripts are developed for powershell.
• ETL_Automated_deployment.ps1
• Deployment_Failure_email.ps1
• Deployment_success_email.ps1
Files :-
• DeployOptions.xml
This file is used to set default integration Service, workflow session logs, map variables, persisted values, dependent objects, set to move latest version only, etc.

• ETL_Deployment_Groups_List.txt
This file holds list of the deployment groups that needs to be migrated. Any number of deployment groups name can be added to the input file. Add only one Deployment group name per line in the input file.

Place the above 2 file in the same location
Ex:- D:\Informatica\9.6.1\server\infa_shared\Scripts\ETL_CODE_DEPLOYMENT\

ETL_Automated_deployment.ps1:
here is the Link for the script https://etltechsolutions.wordpress.com/script-etl_automated_deployment-ps1/

This PowerShell script is the main script, using “pmrep connect” command the script will connect to source and target repository to perform the ETL code migration. This script create 4 log files and placed in the log file directory specified in this script.
 <$DeploymentGroup>”_Impacted_objects.txt”.log
 <$DeploymentGroup>.log
 <$DeploymentGroup>”_DeploymentGroup_Status.txt”
 <$DeploymentGroup>”_Validate_Object.log”

**In the script the 4 log files will be placed in the folder D:\Informatica\9.6.1\server\infa_shared\log\AUTOMATED_DEPLOY_LOGS.

<$DeploymentGroup>.log: This log file provides the completion status of the deployment.

<$DeploymentGroup>”_DeploymentGroup_Status.txt”: This log file provides detailed information about the migration of the deployment group.

<$DeploymentGroup>”_Validate_Object.log”: Validate_Object log provides an summary of objects which are impacted/invalid after the validation.

<$DeploymentGroup>”_Impacted_objects.txt.log”: This log file will have list of the objects that are impacted due to the migration.

Deployment_Failure_email.ps1:
Here is the Link for the script https://etltechsolutions.wordpress.com/script-deployment_failure_email-ps1/

This script will send failure emails if the execution of the script “ETL_Automated_deployment.ps1” fails.

Deployment_success_email.ps1:
Here is the Link for the script https://etltechsolutions.wordpress.com/scriptdeployment-success-email/

This script will send success emails after the successful execution of the script “ETL_Automated_deployment.ps1”.

Note:- 
Try to place the ‘Deployment_success_email.ps1’, ‘Deployment_Failure_email.ps1’ and ‘ETL_Automated_deployment.ps1’ at the same location:
Ex:- D:\Informatica\9.6.1\server\infa_shared\Scripts\ETL_CODE_DEPLOYMENT\DEPLOYMENT_SCRIPTS\

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s