Skip to content
Snippets Groups Projects
Commit 32fda8cb authored by Jaroslav Brazda's avatar Jaroslav Brazda
Browse files

Initial Commit

parents
No related branches found
No related tags found
No related merge requests found
FROM debian:8.1
#first time you need to provide host name, name, and agent required creds
##example run command: docker run -d -h <hostname> --name <agent_name> <image_name:image_tag> <agent_username> <agent_password>
##ie., docker run -d -h jw2 --name jw2 test:3 jweber@000qio.org jetssuck
##ie., docker run -d -h jw1 --name jw1 test:3 jweber@informatica.com bp3luser
#subsequent runs can be done via docker start <container_id>
MAINTAINER Jaroslav Brazda <jaroslav.brazda@gmail.com>
# Upgrading system for wget and unzip tools
RUN apt-get update && \
apt-get -y install wget && \
apt-get -y install unzip
COPY ./post-build-files /informatica/agent/
#setup
RUN mkdir "/informatica/agent/installer" && \
wget --no-check-certificate "https://app2.informaticacloud.com/saas/download/linux64/installer/agent64_install.bin" -O /informatica/agent/installer/agent64_install.bin && \
chmod +x /informatica/agent/entrypoint.sh && \
chmod +x /informatica/agent/register-agent.sh && \
chmod +x /informatica/agent/installer/agent64_install.bin
#install
RUN chmod +x /informatica/agent/run_install.sh &&\
/informatica/agent/run_install.sh &&\
rm /informatica/agent/infaagent/main/tools/unzip/unzip &&\
ln -s /usr/bin/unzip /informatica/agent/infaagent/main/tools/unzip/unzip
#post install
RUN update-alternatives --install /usr/bin/java java /informatica/agent/infaagent/jre/bin/java 100
#unzip -o /informatica/work/agent_jars.zip -d /informatica/agent/infaagent
#cleanup
RUN rm /informatica/agent/installer/agent64_install.bin
ENTRYPOINT ["/informatica/agent/entrypoint.sh", "/informatica/agent/infaagent"]
#!/bin/bash
AGENT_HOME=$1
USERNAME=$2
PASSWORD=$3
_term() {
printf "%s\n" "Caught SIGTERM signal, stopping agent!"
$AGENT_HOME/main/agentcore/consoleAgentManager.sh shutdown
}
trap _term SIGINT SIGTERM
if [ "$USERNAME" == "--help" ]
then
echo 'docker run -d IMAGE[:TAG] <ics-username> <ics-password>'
else
nohup /informatica/agent/register-agent.sh $AGENT_HOME $USERNAME $PASSWORD > /informatica/agent/register.nohup &
$AGENT_HOME/agent_start.sh & wait $!
fi
\ No newline at end of file
#Choose Install Folder
#---------------------
USER_INSTALL_DIR=/informatica/agent/infaagent
\ No newline at end of file
#!/bin/bash
AGENT_HOME=$1
USERNAME=$2
PASSWORD=$3
COUNTER=1
echo 'Waiting for agent core to start'
sleep 10
CONFIGURED=`$AGENT_HOME/main/agentcore/consoleAgentManager.sh isConfigured`
while [[ -z $CONFIGURED && $COUNTER -lt 31 ]]
do
sleep 1
CONFIGURED=`$AGENT_HOME/main/agentcore/consoleAgentManager.sh isConfigured`
COUNTER=$[$COUNTER +1]
done
if [ -z $CONFIGURED ]
then
echo 'Agent core not started!'
elif [ "$CONFIGURED" != "true" ]
then
$AGENT_HOME/main/agentcore/consoleAgentManager.sh configure $USERNAME $PASSWORD
fi
\ No newline at end of file
export LAX_DEBUG=true
/informatica/agent/installer/agent64_install.bin -i silent -f /informatica/agent/installer.properties
echo Test Completed
echo $?
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment