Install SingleAgent in gradle jib build

Community post

Shared by the Applicare community. It has not been re-checked against Applicare 10.0, so confirm the steps in your environment or contact Support.

Step 1: Download the agent locally in any linux machine using the below command.

curl http://43.205.166.134:8880/applicare/standalone?filename=ApplicareSingleAgentLinux >ApplicareSingleAgentLinux.zip

Step 2: Unzip the ApplicareSingleAgentLinux.zip file and remove the ApplicareSingleAgentLinux.zip file.

unzip -o ApplicareSingleAgentLinux.zip -d ApplicareSingleAgentLinux
rm -rf ApplicareSingleAgentLinux.zip

Step 3: Edit the logback.xml file from the ApplicareSingleAgentLinux\logback directory.

Step 4: Comment the existing pattern (line 28) and add the below pattern after that line and save it.

<pattern>%d %-5p [%X{sessionId}] [%X{userId}] %C{1}.%M:%L] %m%n</pattern>

[Screenshot 1 is not available on this page.]

Step 5: Delete the below files in the ApplicareSingleAgentLinux directory.

a. ApplicareSingleAgentLinux/bin/phantomjs b. ApplicareSingleAgentLinux/jre c. ApplicareSingleAgentLinux/bin/apache-ant d. ApplicareSingleAgentLinux/bin/pdk

Step 6: Copy that ApplicareSingleAgentLinux directory and paste it in the home directory of your Gradle jib project.

Step 7: Put below content in build.gradle file inside jib.

      extraDirectories {
            paths {
                path {
                    // copies the contents of 'ApplicareSingleAgentLinux' into '/extras/ApplicareSingleAgentLinux' on the container
                    from = file('ApplicareSingleAgentLinux')
                    into = '/extras/ApplicareSingleAgentLinux'
                }
       }
       container {
            jvmFlags = ['-Xverify:none','-javaagent:/extras/ApplicareSingleAgentLinux/applicare-aspects.jar=verbosity=0,logfile=false,norestart-intellitrace=false','-Darcturus_home=/extras/ApplicareSingleAgentLinux','-Djava.library.path=.;/extras/ApplicareSingleAgentLinux/bin']
        }
 }

[Screenshot 2 is not available on this page.]

Important Note:

If the catalina.home or catalina.base jvm arguments are not available in your application jvm arguments then please add the -Dcatalina.base="" argument in the end of the jvmFlags.

container {
          jvmFlags = ['-Xverify:none','-javaagent:/extras/ApplicareSingleAgentLinux/applicare-aspects.jar=verbosity=0,logfile=false,norestart-intellitrace=false','-Darcturus_home=/extras/ApplicareSingleAgentLinux','-Djava.library.path=.;/extras/ApplicareSingleAgentLinux/bin','-Dcatalina.base=""]
        }

[Screenshot 3 is not available on this page.]

Join the discussion

Comments, voting and following are kept by Zendesk and need a Help Center account. This button opens the original discussion there.

Opens Zendesk · needs internet and sign-in

Still stuck? Contact support