Nexus 3 integration with Talend Integration Cloud is not working

Problem Description

Nexus 3 integration with Talend Cloud is not working.

 

Solution

Use Nexus 2 to migrate the missing Talend repositories and users from Nexus 3 to Nexus 2, and integrate them with Talend Integration Cloud (TIC) and Studio.

 

  1. Installation on the identified Nexus server, this example is for Red Hat Linux RHEL 7.5:

    # cd /opt
    # wget http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz
    # tar -zxf nexus-latest-bundle.tar.gz
    # rm nexus-latest-bundle.tar.gz
    # mv nexus-2.14.4-03 nexus
    
  2. Create a new user, nexus, set the password, then login as nexus and change the ownership:

    # sudo adduser nexus
    # sudo passwd nexus
    # su – nexus
    # exit
    # chown -R nexus:root /opt/nexus
    # chown -R nexus:root /opt/sonatype-work
    
  3. Run the vi sudo command to edit the /etc/sudoers file, as shown below. This file defines the policies applied by the sudo command.

    #  vi sudo  /etc/sudoers
  4. Find the lines in the file that grant sudo access to users in the group wheel when enabled. Remove the comment character, #, at the start of the second line, if it is commented. This enables the configuration option. Save your changes and exit the editor.

    # #  Allows people in group wheel to run all commands
    #  %wheel        ALL=(ALL)       ALL
    
  5. Add the nexus user to the wheel group using the usermod command:

    # usermod -aG wheel nexus
  6. Set nexus home:

    # sudo vi /etc/profile
    # export NEXUS_HOME=/opt/nexus
    # export PATH=$PATH:$NEXUS_HOME/bin
  7. Set autostart, and use the system for autostart:

    # sudo vi /opt/nexus/bin/nexus  (update below 3 parameters)
    NEXUS_HOME="/opt/nexus"
    RUN_AS_USER="nexus"
    PIDDIR="/opt/nexus"

 

This example uses systemd to run the repository manager service.

  1. Create a file and name it nexus.service.

  2. Add the following contents, then save the file in the /etc/systemd/system/ directory:

    [Unit]
    Description=nexus service
    After=network.target
      
    [Service]
    Type=forking
    ExecStart=/opt/nexus/bin/nexus start
    ExecStop=/opt/nexus/bin/nexus stop
    User=nexus
    Restart=on-abort
      
    [Install]
    WantedBy=multi-user.target
    
  3. Activate the service with the following commands:

    # sudo systemctl daemon-reload
    # sudo systemctl enable nexus.service
    # sudo systemctl start nexus.service
    
  4. After starting the service for any Linux-based operating systems, verify that the service started successfully:

    # tail -f /opt/sonatype-work/nexus3/log/nexus.log
  5. Port forwarding: this is done when a TIC URL does not accept a port in the URL address. You have to hide it in the URL.

    # sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8081

 

Migrating Talend Repositories on Nexus 2

Since Nexus 2 is installed from the Sonatype site, it does not have Talend repositories and users that come along with a TAC installation of embedded Nexus. To create the repositories and users, perform the following steps.

  1. Open your browser and check the Nexus service, and ensure that port 8081 is open.

  2. Login with the Nexus 2 defaults: user admin and password Talend123.

  3. Notice that Talend related repositories are not present, you need to get them.

  4. Download and move the Artifact Repository zip file from TIC.

  5. Extract the Artifact-Repository-Nexus-V3.9.0-01.zip file.

  6. There are three folders in the ZIP file: Artifact-Repository-Nexus-3.9.0-01-unix, Artifact-Repository-Nexus-3.9.0-01-windows, and migration-7.0.1.

  7. Open the migration-7.0.1 folder.

  8. Edit the nexus.properties file, and update the Nexus 2 details for the URL, admin credentials, and Nexus version:

    # sudo cat nexus.properties
    [sudo] password for ha1162@corp.nlg.net:
    nexusUrl=http://localhost:8081/nexus
    adminUser=admin
    adminPassword=admin123
    nexusVersion=2
    
  9. Execute the JAR file found at the same level:

    # sudo Java -jar nexux-migration-7.0.1.jar

 

TIC configuration with Nexus 2

  1. Complete TIC configuration:

    image001.jpg 

     

  2. Start Studio using a remote connection and pointing to a Talend Cloud project.

  3. JAR files sync up will start between Studio and Talend-custom-lib-releases repository in Nexus 2.

    image002.jpg

Version history
Revision #:
7 of 7
Last update:
‎10-05-2018 02:03 PM
Updated by:
 
Contributors