Skip to main content Skip to complementary content

Installing and configuring MongoDB to prepare for installation

Before you install Talend Data Stewardship, Talend Data Preparation, or Talend Dictionary Service, you must install and configure a MongoDB instance.

Before you begin

Download the following packages from the MongoDB website:
  1. MongoDB server for your operating system
  2. MongoDB Tools - Mongo Shell
  3. MongoDB Command Line Database Tools (required for Talend Dictionary Service only)

Procedure

  1. Install the MongoDB server package and set up MongoDB server as a system service.
  2. Create a secret password for the MongoDB administrator user and store it in a safe place.
    For example:
    • Username: AdminUser
    • Password: Password1
  3. Use the Mongo Shell utility to install the MongoDB Shell package. This utility is called mongo in older releases and mongosh in recent releases.
  4. Open a terminal window from the right folder and start the Mongo Shell utility to run the server without authentication.
    For example, if MongoDB is installed on a localhost and on standard port (27017) then use the following command to connect to it:
    mongo --port 27017
  5. After connection, create AdminUser in admin database with the following commands:
    use admin
       db.createUser( { user: "AdminUser", pwd: "Password1", roles: [ { role: "userAdminAnyDatabase", db: "admin" }, { role: "clusterAdmin", db: "admin" } ] } )
       exit
  6. Shut down the MongoDB server with the systemctl stop command for Linux or with the Services applet for Windows.
  7. Locate MongoDB configuration file called mongod.cfg. To activate authorization, you must add the following section to this file:
    security:
       authorization: enabled 
  8. Save your changes and start the MongoDB server with the systemctl command for Linux or the Services applet for Windows.
  9. Start the Mongo CLI utility using the mongo or mongosh command. Security is now active so it needs to be started as follows:
    mongo --port 27017 -u "AdminUser" -p "Password1" --authenticationDatabase "admin" 
  10. Create the database users for Talend Data Stewardship, Talend Data Preparation, and Talend Dictionary Service, and define the user names and passwords.
    For example, here is the command to create the default users and passwords to enter in the Mongo shell that you started in the previous step:
    use dataprep
       db.createUser( { user: "dataprep-user", pwd: "duser",  roles: [ { role: "dbOwner", db: "dataprep" } ] } )
       use dqdict
       db.createUser( { user: "dqdict-user",   pwd: "duser", roles: [ { role: "dbOwner", db: "dqdict" }  ] } )
       use tds
       db.createUser( { user: "tds-user",      pwd: "duser",  roles: [ { role: "dbOwner", db: "tds" }  ] } )
       exit
    For security reasons it is not recommended to use these default values. dqdict is the database for Talend Dictionary Service application. In the example above, all 3 users are created one for each application. Only define the users for the applications you want to install.

What to do next

If you only want to install Talend Data Stewardship and Talend Data Preparation, you are ready to run the Talend Installer or to install them manually.

If you want to install Talend Dictionary Service, you must prepare its database before you proceed with the installation.

Preparing the database for Talend Dictionary Service

Procedure

  1. Download the Talend-DictionaryService.zip archive file from your license email and unzip it into a temporary folder.
  2. Open a terminal window and change the working folder to the dq_dict/database subfolder located in the extracted files.
  3. Locate the file semantic-dictionary-import.sh.
  4. Open this file with an editor and update the placeholders:
    • %%%MONGO_HOST%%%: the host for MongoDB. For example, 127.0.0.1.
    • %%%MONGO_PORT%%%: the port for MongoDB. For example, 27017.
    • %%%MONGO_DBNAME%%%: the database name for MongoDB. For example, use dqdict for default settings.
    • %%%MONGO_USER%%%: the username for the Talend Dictionary Service database. For example, use dqdict-user for default settings.
    • %%%MONGO_PWD%%%: the password for the Talend Dictionary Service database. For example, use duser for default settings.
  5. Optional: In that script, the mongorestore utility is called from PATH. It is recommended to specify the exact path to it.
  6. Save your changes.
  7. Make this file executable by running the following command:
    chmod +x semantic-dictionary-import.sh
  8. Run this file.

What to do next

You can now install Talend Dictionary Service.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!