Install - Java Static Agent on a Containerized App
Installation Wizard
To help with the installation process, vFunction offers an Installation Wizard. This Wizard provides additional information about the Prerequisites as well as the Required and Optional Settings for installing the vFunction Server and Agents. This Wizard also walks you through each step in the Installation process.
Installation Steps
- Download the latest vFunction Sudoless Controller Installation TGZ
- Download or copy-and-paste the Dockerfile below
- Modify the Dockerfile following the file’s Comments
FROM almalinux:9
### Copy the Application's Binaries to the image
RUN mkdir -p /tmp/vfunction/binaries/
# Modify /artifact_repository/vfunction/app.war and app.war to be relevant for your application
COPY /artifact_repository/vfunction/app.war /tmp/vfunction/binaries/app.war
### vFunction Environment Variables
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-static-agent/java/linux/#controller_name
ENV VF_CONTROLLER_VIPERINST_CONTROLLER_NAME="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-static-agent/java/linux/#controller_host
ENV VF_CONTROLLER_VIPERINST_CONTROLLER_HOST="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-static-agent/java/linux/#controller_org_id
ENV VF_CONTROLLER_VIPERINST_CONTROLLER_ORG_ID="CHANGE_ME"
ENV VF_CONTROLLER_VIPERINST_CONTROLLER_APP_ID="CHANGE_ME"
ENV VF_CONTROLLER_VIPERINST_CONTROLLER_CLIENT_ID="CHANGE_ME"
ENV VF_CONTROLLER_VIPERINST_CONTROLLER_CIENT_SECRET="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-static-agent/java/linux/#instance_id
ENV VF_CONTROLLER_VIPERINST_CONTROLLER_INSTANCE_ID="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-static-agent/java/linux/#controller_tags
ENV VF_CONTROLLER_VIPERINST_CONTROLLER_TAGS="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-static-agent/java/linux/#jvm_memory_params
ENV VF_CONTROLLER_VIPERINST_VIPER_JVM_MEMORY_PARAMS="CHANGE_ME"
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-static-agent/java/linux/#viper_archives
ENV VF_CONTROLLER_VIPERINST_VIPER_ARCHIVES="/tmp/vfunction/binaries/app.war"
### vFunction Copy workflow
# Modify /artifact_repository to be relevant for your environment
COPY /artifact_repository/vfunction/vfunction-controller-sudo-less-installation*.tgz /tmp/vfunction-controller-sudo-less-installation.tgz
### vFunction Run workflow
RUN cd /tmp && tar -xvzf /tmp/vfunction-controller-sudo-less-installation.tgz && \
rm -f /tmp/vfunction-controller-sudo-less-installation.tgz && \
bash /tmp/vfunction/opt/vfunction/controller-installation/create-instance.sh -i viperinst -t java -v && \
bash /tmp/vfunction/opt/vfunction/controller-installation/install.sh -i viperinst -n -s && \
chmod -R 777 /tmp/vfunction
### vFunction CMD workflow
CMD ["/bin/bash", "-c", "bash /tmp/vfunction/opt/vfunction/controller-installation/restart-controller.sh -i viperinst ; sleep infinity"]
- Create a folder for vFunction artifacts in the Artifact Repository accessible by the Docker Build
- Add the vFunction Sudoless Controller Installation TGZ and the binaries for the Application to the Artifact Repository
- Create a vFunction Viper-specific project in your CI/CD Pipeline
- Build and deploy the Viper Container
- Confirm that the Viper comes up as expected in the vFunction Server UI