Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Deploying to multiple environnements

  1. #1

    Default Deploying to multiple environnements

    Hi all,

    we use three differents environnements : DEV, TEST and PROD. Each one comes with its own database used in PDI (TEST use the DB_TEST, DEV use DB_DEV and PROD use DB_PROD).

    Currently, when we deploy from DEV to TEST or PROD we have to manually modify the connector parameters to define the good database.

    Is there a way to avoid the need to change the connector paramater, for example using environnement variable or a property file ?


    Thanks,
    Richard.

  2. #2
    Join Date
    Aug 2015
    Posts
    313

    Default

    Yes , you can define variables in properties file and you can change the db details in multi environments.
    you need to call those kettle properties variables in connections.

  3. #3

    Default

    Thanks for your answer.

    We have two constraints :
    - Dev team connects to the DEV/TEST/PROD database repository from their Dev desktop which suppose to define 3 groups of properties (one for each DEV/TEST/PROD environnement;
    - To deploy Dev team exports their repository and then import it in the TEST/PROD but connectors are overriden and they need to edit them with the good values.

    Are we wrong when we deploy ? Is there a best way ?

    Thanks,
    Richard.

  4. #4
    Join Date
    Aug 2015
    Posts
    313

    Default

    Quote Originally Posted by richardfagot View Post
    Thanks for your answer.

    We have two constraints :
    - Dev team connects to the DEV/TEST/PROD database repository from their Dev desktop which suppose to define 3 groups of properties (one for each DEV/TEST/PROD environnement;
    MAY I KNOW why they are connecting from their desktop for PROD as well? is there any reasons. generally everyone used maintain separate machine for production , is it right ?.

    Quote Originally Posted by richardfagot View Post
    - To deploy Dev team exports their repository and then import it in the TEST/PROD but connectors are overriden and they need to edit them with the good values.

    Are we wrong when we deploy ? Is there a best way ?

    Thanks,
    Richard.
    Seems to be you are using DATABASE repository. yes there is best way to change connections while moving from env to env. as i said previously we just need to define db values in properties file and need to call variables in connection settings. Still are there any confusions?.

  5. #5
    Join Date
    Jan 2015
    Posts
    107

    Default Use JNDI to keep connection info per environment

    You can use JNDI connections for this. Inside the jobs and transformations, you only specify the JNDI connection name, which will be the same for dev, test and prod. So you might have source_db, staging_db and destination_db but NOT source_dev, source_test and source_prod. The actual connection parameters are then defined in the jdbc.properties file (by default it's located in data-integration/simple-jndi), so they stay outside of the repository and are never copied between environments during deployments. Each machine/installation keeps its own connections.

    On my workstation I need to connect to dev and test for different projects using different PDI versions. I've set up one Kettle home folder per environment I need, containing a customized start script, a jdbc.properties file and a .kettle subfolder with the repositories.xml and other settings.

    Example: DEV-spoon.sh in my projectA home folder:

    Code:
    # Pentaho assumes a .kettle subdir to contain the properties files,
    # don't include it here.
    export KETTLE_HOME=/home/pentaho/projectA/dev/
    
    # the jdbc.properties file goes here
    export KETTLE_JNDI_ROOT=/home/pentaho/projectA/dev/simple-jndi/
    
    # change data-integration-x.y to correct version for project.
    cd /opt/pentaho/data-integration-6.1
    ./spoon.sh
    Last edited by Isha Lamboo; 02-02-2017 at 04:21 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.