Install - Java Agent Controller on Containerized Tomcat App for Dynamic Analysis
Installation Steps
- Download the latest vFunction Sudoless Controller Installation TGZ
- Download a sample installation.yaml
- Set the Configurable Settings in the downloaded installation.yaml
- Create a folder for vFunction artifacts in the Artifact Repository accessible by the Docker Build
- Add the vFunction Sudoless Controller Installation TGZ and the installation.yaml to the Artifact Repository
- Create a vFunction specific branch to add the vFunction artificats to the Application’s Dockerfile
- Modify the Application’s Dockerfile
FROM <existing_docker_image>
COPY <existing_workflow>
### vFunction COPY workflow
COPY /artifact_repository/vfunction/vfunction-controller-sudo-less-installation*.tgz /tmp/vfunction-controller-sudo-less-installation.tgz
COPY /artifact_repository/vfunction/installation.yaml /tmp/
RUN <existing_workflow>
### vFunction RUN workflow
RUN cd /tmp && tar zxvf /tmp/vfunction-controller-sudo-less-installation.tgz && \
rm -rf /tmp/vfunction-controller-sudo-less-installation.tgz && \
mv /tmp/installation.yaml /tmp/vfunction/etc/sysconfig/vfunction/installation/instances/default-java/ && \
bash /tmp/vfunction/opt/vfunction/controller-installation/install.sh -i default-java -n -a && \
echo "cd /tmp/vfunction/opt/vfunction/controller-installation" >> /usr/local/tomcat/bin/setenv.sh && \
echo "bash restart-controller.sh -i default-java -c" >> /usr/local/tomcat/bin/setenv.sh && \
cat /tmp/vfunction/etc/sysconfig/vfunction/agent/instances/default-java/vmargs-examples/tomcat >> /usr/local/tomcat/bin/setenv.sh && \
chmod -R 777 /tmp/vfunction && \
chown -R <tomcat>:<tomcat> /tmp/vfunction
ENTRYPOINT [<existingWorkflowIfUsed>]
CMD [<existingWorkflowIfUsed>]
- Build and deploy the Application
- Confirm that the Application comes up and functions as expected
- If any issues arise: