Commit 55da5be5 by Feanil Patel

Stop overriding upstream Java and startup/settings files.

We originally made these changes when trying to debug the connection
between the go-agent and go-server.  Having them here makes it harder to
upgrade go-agent versions since they are regularly making improvements
to the upstream dockerfiles.
parent 86056265
......@@ -4,20 +4,6 @@ FROM gocd/gocd-agent:17.1.0
LABEL version="0.02" \
description="This custom go-agent docker file installs additional requirements for the edx pipeline"
# Add Custom apt repositories
RUN \
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && \
add-apt-repository -y ppa:webupd8team/java && \
add-apt-repository -y 'deb http://ppa.edx.org trusty main' && \
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 69464050 && \
apt-get update
# Install Java 7
RUN \
apt-get install -y oracle-java8-installer && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/oracle-jdk8-installer
# Install a modern git client
RUN add-apt-repository -y ppa:git-core/ppa && \
apt-get update && \
......@@ -26,9 +12,6 @@ RUN add-apt-repository -y ppa:git-core/ppa && \
# Define working directory.
WORKDIR /data
# Define commonly used JAVA_HOME variable
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
# Install Python and package mgmt tools.
RUN apt-get update && apt-get install -y -q \
python \
......@@ -76,10 +59,6 @@ RUN \
# Install AWS command-line interface - for AWS operations in a go-agent task.
RUN pip install awscli
ADD docker/build/go-agent/files/go-agent-start.sh /etc/service/go-agent/run
ADD docker/build/go-agent/files/go-agent-env-vars /etc/default/go-agent
RUN update-java-alternatives -s java-8-oracle
# !!!!NOTICE!!!! ---- Runner of this pipeline take heed!! You must replace go_github_key.pem with the REAL key material
# that can checkout private github repositories used as pipeline materials. The key material here is faked and is only
# used to pass CI!
......
GO_SERVER=127.0.0.1
export GO_SERVER
GO_SERVER_PORT=8153
export GO_SERVER_PORT
GO_SERVER_SSL_PORT=8154
export GO_SERVER_SSL_PORT
AGENT_WORK_DIR=/var/lib/${SERVICE_NAME:-go-agent}
export AGENT_WORK_DIR
DAEMON=N
VNC=N
export JAVA_HOME="/usr/lib/jvm/java-7-oracle/jre" # SET_BY_GO_INSTALLER__DONT_REMOVE
\ No newline at end of file
#!/bin/bash
GO_SERVER=${GO_SERVER:-go-server}
GO_SERVER_PORT=${GO_SERVER_PORT:-go-server-port}
COLOR_START=""
COLOR_END=""
echo -e "${COLOR_START}Starting Go Agent to connect to server $GO_SERVER:$GO_SERVER_PORT ...${COLOR_END}"
sed -i -e 's/GO_SERVER=.*/GO_SERVER='$GO_SERVER'/' /etc/default/go-agent
sed -i -e 's/GO_SERVER_PORT=.*/GO_SERVER_PORT='$GO_SERVER_PORT'/' /etc/default/go-agent
sed -i -e 's/GO_SERVER_SSL_PORT=.*/GO_SERVER_SSL_PORT='$GO_SERVER_SSL_PORT'/' /etc/default/go-agent
mkdir -p /var/lib/go-agent/config
/bin/rm -f /var/lib/go-agent/config/autoregister.properties
AGENT_KEY="${AGENT_KEY:-123456789abcdef}"
echo "agent.auto.register.key=$AGENT_KEY" >/var/lib/go-agent/config/autoregister.properties
if [ -n "$AGENT_RESOURCES" ]; then echo "agent.auto.register.resources=$AGENT_RESOURCES" >>/var/lib/go-agent/config/autoregister.properties; fi
if [ -n "$AGENT_ENVIRONMENTS" ]; then echo "agent.auto.register.environments=$AGENT_ENVIRONMENTS" >>/var/lib/go-agent/config/autoregister.properties; fi
/sbin/setuser go /etc/init.d/go-agent start
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment