Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
ALERT: The support homepage carousel is not displaying. We are working toward a resolution.

How to install Qlik Replicate on a docker image

75% helpful (3/4)
cancel
Showing results for 
Search instead for 
Did you mean: 
john_wang
Support
Support

How to install Qlik Replicate on a docker image

Last Update:

Aug 20, 2024 5:46:56 AM

Updated By:

john_wang

Created date:

Jun 7, 2024 1:14:17 AM

This article provides a guide on installing Qlik Replicate on a docker image.

Overview

  1. (Optional) Remove older versions of Docker
  2. Install Docker on the host Linux Server
  3. FTP upload the rpm file to the Linux Server folder
  4. Follow the Installing Qlik Replicate on docker steps
  5. Prepare the docker build files
  6. Modify the Dockerfile
  7. Build the docker image
  8. Startup and run the docker image

Steps

  1. (Optional) Remove older versions of Docker
    sudo rpm -qa|grep docker 
    sudo yum remove docker docker-client docker-client-latest docker-common docker-latest docker-laster-logrotate docker-logrotate docker-engine
  2. Install Docker on host Linux Server
    sudo yum install -y yum-utils device-mapper-persistent-data lvm2  
    sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
    
    sudo yum install --allowerasing docker-ce docker-ce-cli containerd.io
    
    sudo systemctl start docker
    sudo systemctl enable docker  
    
  3. FTP upload the Qlik Replicate rpm installation file to Linux Server folder "/kit" The /kit directory is a temporary folder used to store installation files. In the example below, the RPM file is areplicate-2024.5.0-357.x86_64.rpm. Once the installation is complete, the entire /kit folder can be safely deleted.
  4. Follow the Installing Replicate on a docker steps
    mkdir -p /kit/ar_docker
    cd /kit
    rpm2cpio areplicate-2024.5.0-357.x86_64.rpm | 	cpio -iv --make-directories --no-absolute-filenames -D ar_docker/ ./opt/attunity/replicate/addons/samples/docker/*
    mv ./ar_docker/opt/attunity/replicate/addons/samples/docker/* ./ar_docker
    rm -rf ./ar_docker/opt  
    
  5. Prepare the docker build files
    cd /kit/ar_docker
    cp ../areplicate-2024.5.0-357.x86_64.rpm .
    
    ./create-dockerfile.sh  
    
  6. Change the line of file /kit/ar_docker/Dockerfile , from:
    RUN yum -y install /tmp/areplicate-*.rpm
    to
    RUN systemd=no yum -y install /tmp/areplicate-*.rpm
NOTE!
The parameter systemd=no is used to solve the below error you may hit during the docker build stage: This rpm is not supported on your system (no systemctl), exiting. error: %prein(areplicate-2024.5.0-357.x86_64) scriptlet failed, exit status 43
NOTE!
The password should not be empty and must be strong enough.
WARNING!
If you want to install ODBC Drivers, please make the corresponding ODBC Drivers rpm files are ready in this folder. If you want to skip the ODBC Drivers installation at present, rename or delete the file "drivers" in this folder.
  1. Build the docker image
    docker build --no-cache -t johnw/replicate:2024.5 .
    where /johnw/replicate:2024.5 is the image tag.
Do not forget the last period "."
  1. Startup and Run the docker image
    docker run -d --name ar --hostname cdc2 -e ReplicateRestPort=3552 -p 3552:3552 -v /dockermount/data/replicate/data:/replicate/data johnw/replicate:2024.5

Now Qlik Replicate is running in the docker and can be accessed from Qlik Replicate Console GUI.

Environment

  • Qlik Replicate 2024.5  SP03 and above builds
  • Qlik Replicate 2023.11 SP05 and above builds
  • Linux 8.x and 9.x
Labels (1)
Comments
Vegy
Contributor III
Contributor III

Hi John, the systemd=no parameter/variable being passed to yum appears to make no difference for us:

> [11/29] RUN systemd=no yum -y install /var/tmp/areplicate-2023.11.0-468.x86_64.rpm && yum clean all && rm -f /var/tmp/areplicate-2023.11.0-468.x86_64.rpm && rm -f /etc/rc.d/rc*.d/*areplicate /etc/rc.d/init.d/areplicate >/dev/null:
1530614.07 This rpm is not supported on your system (no systemctl), exiting.
1530714.07 error: %prein(areplicate-2023.11.0-468.x86_64) scriptlet failed, exit status 43
1530814.07
1530914.07 Error in PREIN scriptlet in rpm package areplicate
1531014.13 Verifying : areplicate-2023.11.0-468.x86_64 1/1
1531114.20
1531214.21 Failed:
1531314.21 areplicate-2023.11.0-468.x86_64
1531414.21
1531514.22 Error: Transaction failed
 
 
We build our own dockerfile because we need additional items, hence the other commands being run to clean up the yum install.
Similarly I have tried following your guide to use the built in Dockerfile but get this at step 3:
 

[av63916:~/kit]$ rpm2cpio /Users/av63916/gds-lfs/qlik/areplicate-2024.5.0-144.x86_64.rpm | cpio -iv --make-directories --no-absolute-filenames -D ar_docker/ ./opt/attunity/replicate/addons/samples/docker/*

cpio: Option --no-absolute-filenames is not supported

Brief Usage:

  List:    cpio -it < archive

  Extract: cpio -i < archive

  Create:  cpio -o < filenames > archive

  Help:    cpio --help

tar: Write error

john_wang
Support
Support

Hello @Vegy ,

Please take note the resolution applies to

  • Qlik Replicate 2024.5 SP03 and above

If you are installing 2024.5 previous builds, or previous major versions eg 2023.11 then please follow the workaround in step 5 and 6 as below:

 

5. Prepare the docker build files

cd /kit/ar_docker
cp ../areplicate-2023.11.0-547.x86_64.rpm .

# create a script file "systemctl"
echo "ls" > systemctl
chmod u+x systemctl

./create-dockerfile.sh

 6. add below lines to the end of section "#install prequisits" of file /kit/ar_docker/Dockerfile, like:  

# Install dummy systemd
ADD systemctl /usr/sbin

john_wang_0-1723771275178.png

 

Regards,

John.

 

Vegy
Contributor III
Contributor III

Hi John, after recently receiving the link to the latest 2024.5 package passing the systemd=no parameter to the yum install still does not appear to work:

ERROR: process "/bin/sh -c systemd=no yum -y install /var/tmp/${QLIK_REPLICATE_RPM} && yum clean all && rm -f /var/tmp/${QLIK_REPLICATE_RPM} && rm -f /etc/rc.d/rc*.d/*areplicate /etc/rc.d/init.d/areplicate >/dev/null" did not complete successfully: exit code: 1
 
RUN systemd=no yum -y install /var/tmp/areplicate-2024.5.0-316.x86_64.rpm && yum clean all && rm -f /var/tmp/areplicate-2024.5.0-316.x86_64.rpm && rm -f /etc/rc.d/rc*.d/*areplicate /etc/rc.d/init.d/areplicate >/dev/null:
this rpm is not supported on your system (no systemctl), exiting
john_wang
Support
Support

Hi @Vegy ,

Please take note there are 2 resolution in this article:

1- "RUN systemd=no yum"

     This solution works with Replicate 2024.5 SP03 and above builds.

     You are trying to install 2024.5 SP02 (2024.5.0-316) hence hit error.

2- "# Install dummy systemd"

     You may wait for 2024.5 SP03 formal release, or if you still want to run 2024.5 SP02, please take the workaround "# Install dummy systemd". I've added the WA for you specially in my previous comment.

Regards,

John.

 

Jon_Donker
Creator
Creator

Hi @john_wang,

Hope you can help me out containerise 2023.11. (Disclaimer - I am still learning docker)

I can't use centos as I can't get the packages behind the firewall so using Redhat 9

FROM my.company.docker.repo/redhat/ubi9


#install prequisits
# RUN pushd /etc/yum.repos.d/
# RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
# RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*


ADD postgresql*.rpm /tmp/
ADD areplicate-*.rpm /tmp/
ADD systemctl /usr/sbin
ADD replicate_license_xxxx.txt /tmp/

RUN yum -y install unixODBC unzip
RUN yum -y install libicu.x86_64
RUN rm -f /etc/odbcinst.ini

RUN rpm -ivh /tmp/postgresql13-libs-13.9-1PGDG.rhel9.x86_64.rpm
RUN rpm -ivh /tmp/postgresql13-odbc-13.02.0000-2PGDG.rhel9.x86_64.rpm
RUN rpm -ivh /tmp/postgresql13-13.9-1PGDG.rhel9.x86_64.rpm

ADD odbcinst.ini /etc/

RUN systemd=no yum -y install /tmp/areplicate-2023.11.0-468.x86_64.rpm
RUN yum clean all
RUN rm -f /tmp/areplicate-*.rpm

RUN echo "export LD_LIBRARY_PATH=/usr/pgsql-13/lib:$LD_LIBRARY_PATH" >> /opt/attunity/replicate/bin/site_arep_login.sh

ENV ReplicateDataFolder=/replicate/data
ENV ReplicateAdminPassword=password
ENV ReplicateRestPort=3552
ENV LicenseFile=/tmp/replicate_license_xxxx.txt
ADD start_replicate.sh /opt/attunity/replicate/bin/start_replicate.sh
RUN chmod 775 /opt/attunity/replicate/bin/start_replicate.sh
RUN chown attunity:attunity /opt/attunity/replicate/bin/start_replicate.sh
ENTRYPOINT /opt/attunity/replicate/bin/start_replicate.sh ${ReplicateDataFolder} ${ReplicateAdminPassword} ${ReplicateRestPort} ${LicenseFile} ; tail -f /dev/null

 

The container builds and I can start the container; but I can't get to port 3552 on my local browser.

The docker logs contains no output.

If I go into the container and try manually starting start_replicate.sh; I get the following error message:

[attunity@cdc2 /]$ /opt/attunity/replicate/bin/repctl.sh -d /replicate/data service start rest_port=3552
/opt/attunity/replicate/bin/repctl: error while loading shared libraries: libarepbase.so: cannot open shared object file: No such file or directory

 

I found a post with the similar error message (https://community.qlik.com/t5/Official-Support-Articles/How-to-Decrypt-Qlik-Replicate-Verbose-Task-L...) but it didn't have a clear solution to the problem.

Vegy
Contributor III
Contributor III

I think the fix is to source site_arep_login.sh.

In our Dockerfile we have this entry: source $QLIK_REPLICATE_BASE_DIR/bin/arep_login.sh" >>~attunity/.bash_profile

Vegy
Contributor III
Contributor III

Apologies, we also set that variable in the Dockerfile as it appears a lot:

ENV QLIK_REPLICATE_BASE_DIR=/opt/attunity/replicate/

Jon_Donker
Creator
Creator

Thanks - I will give it a try

Jon_Donker
Creator
Creator

I got it working with the following code:

Disclaimer - I am no expert so please don't deploy this straight into a high critical prod environment 😬

 

Jon_Donker
Creator
Creator
FROM my.company.docker.repo/redhat/ubi9

ADD postgresql*.rpm /tmp/
ADD areplicate-*.rpm /tmp/
ADD systemctl /usr/sbin
ADD replicate_license_exp2025-06-29_ser60038556.txt /tmp/

RUN dnf -y update
RUN dnf makecache
RUN dnf -y install procps-ng
RUN dnf -y install unixODBC unzip
RUN dnf -y install libicu.x86_64
RUN rm -f /etc/odbcinst.ini

RUN rpm -ivh /tmp/postgresql13-libs-13.9-1PGDG.rhel9.x86_64.rpm
RUN rpm -ivh /tmp/postgresql13-odbc-13.02.0000-2PGDG.rhel9.x86_64.rpm
RUN rpm -ivh /tmp/postgresql13-13.9-1PGDG.rhel9.x86_64.rpm

ADD odbcinst.ini /etc/

RUN systemd=no yum -y install /tmp/areplicate-2023.11.0-468.x86_64.rpm
RUN yum clean all
RUN rm -f /tmp/areplicate-*.rpm

RUN export LD_LIBRARY_PATH=/opt/attunity/replicate/lib:\$LD_LIBRARY_PATH
RUN echo "export LD_LIBRARY_PATH=/usr/pgsql-13/lib:\$LD_LIBRARY_PATH" >> /opt/attunity/replicate/bin/site_arep_login.sh


# RUN 

ENV QLIK_REPLICATE_BASE_DIR=/opt/attunity/replicate/
ENV ReplicateDataFolder=/replicate/data
ENV ReplicateAdminPassword=AB1gL0ngPa33w0rd
ENV ReplicateRestPort=3552
ENV LicenseFile=/tmp/replicate_license_exp2025-06-29_ser60038556.txt

ADD start_replicate.sh /opt/attunity/replicate/bin/start_replicate.sh
RUN chmod 775 /opt/attunity/replicate/bin/start_replicate.sh
RUN chown attunity:attunity /opt/attunity/replicate/bin/start_replicate.sh
RUN source $QLIK_REPLICATE_BASE_DIR/bin/arep_login.sh >>~attunity/.bash_profile
ENTRYPOINT /opt/attunity/replicate/bin/start_replicate.sh ${ReplicateDataFolder} ${ReplicateAdminPassword} ${ReplicateRestPort} ${LicenseFile} ; tail -f /dev/null
Version history
Last update:
‎2024-08-20 05:46 AM
Updated by: