Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update server.xml for 6.5.x (since like 5.4.0 actually) #131

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions dc-os/Docker/HA/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
FROM docker.bintray.io/jfrog/artifactory-pro:6.5.8

MAINTAINER [email protected]
LABEL MAINTAINER [email protected]

# We download all the usual JDBC drivers available so we can configure them at runtime
RUN curl -L -o /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.38.jar https://bintray.com/artifact/download/bintray/jcenter/mysql/mysql-connector-java/5.1.38/mysql-connector-java-5.1.38.jar
RUN apt-get update && apt-get install -y dnsutils
#RUN apt-get update && apt-get install -y dnsutils

COPY run.sh /runArtifactory.sh

# Dynamic configurations
COPY files/plugins/inactiveServerCleaner.groovy /tmp/inactiveServerCleaner.groovy
COPY server.xml /opt/jfrog/artifactory/tomcat/conf/server.xml
COPY binarystore.xml /tmp/binarystore.xml
COPY artifactory.config.xml /tmp/artifactory.config.xml
COPY --chown=artifactory:artifactory files/plugins/inactiveServerCleaner.groovy /tmp/inactiveServerCleaner.groovy
COPY --chown=artifactory:artifactory server.xml /opt/jfrog/artifactory/tomcat/conf/server.xml
COPY --chown=artifactory:artifactory binarystore.xml /tmp/binarystore.xml
COPY --chown=artifactory:artifactory artifactory.config.xml /tmp/artifactory.config.xml

# Pre-Populated keys
RUN mkdir -p /var/opt/jfrog/artifactory/access/etc/keys/
RUN mkdir -p /var/opt/jfrog/artifactory/etc/security/
ADD files/access/etc/keys/private.key /var/opt/jfrog/artifactory/access/etc/keys/private.key
ADD files/access/etc/keys/root.crt /var/opt/jfrog/artifactory/access/etc/keys/root.crt
ADD files/security/communication.key /var/opt/jfrog/artifactory/communication.key
# Expose HA Port
EXPOSE 8081 10042

ENTRYPOINT /runArtifactory.sh
2 changes: 1 addition & 1 deletion dc-os/Docker/HA/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ setPorts() {
export HA_MEMBERSHIP_PORT=$PORT1
fi
# Change the port
sed -i -e 's,Connector port="\(.*\)",Connector port="'"$INSTANCE_PORT"'",g' /opt/jfrog/artifactory/tomcat/conf/server.xml
sed -i -e 's,Connector port="8081",Connector port="'"$INSTANCE_PORT"'",' /opt/jfrog/artifactory/tomcat/conf/server.xml
}

#Set initial configuration
Expand Down
12 changes: 8 additions & 4 deletions dc-os/Docker/HA/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,23 @@
<Connector port="8081" protocol="HTTP/1.1"
maxThreads="500" minSpareThreads="20"
enableLookups="false" disableUploadTimeout="true"
backlog="100"
backlog="100" sendReasonPhrase="true"
relaxedPathChars='[]' relaxedQueryChars='[]'
/>

<!-- Must be at least the value of artifactory.access.client.max.connections -->
<Connector port="8040" sendReasonPhrase="true" maxThreads="50"/>

<!-- This is the optional AJP connector -->
<!--<Connector port="8019" protocol="AJP/1.3"/>-->
<!-- <Connector port="8019" protocol="AJP/1.3" sendReasonPhrase="true"/> -->

<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"/>
<Host name="localhost" appBase="webapps" startStopThreads="2"/>
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="x-forwarded-for"
protocolHeader="x-forwarded-proto"
portHeader="x-forwarded-port" />
</Engine>

</Service>
</Server>
</Server>
10 changes: 5 additions & 5 deletions dc-os/Docker/PRO/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Dockerfile for a primary node
FROM docker.bintray.io/jfrog/artifactory-pro:6.5.8

MAINTAINER [email protected]
LABEL MAINTAINER [email protected]

# Will be filtered and copied in etc when first running
ADD artifactory.config.xml /tmp/artifactory.config.xml
COPY --chown=artifactory:artifactory artifactory.config.xml /tmp/artifactory.config.xml

# We download all the usual JDBC drivers available so we can
# configure them at runtime
Expand All @@ -14,10 +14,10 @@ RUN curl -L -o /opt/jfrog/artifactory/tomcat/lib/mysql-connector-java-5.1.38.jar
# Copy the run script
COPY run.sh /runArtifactory.sh

# Still needed ?
COPY server.xml /opt/jfrog/artifactory/tomcat/conf/server.xml
# Customized server.xml
COPY --chown=artifactory:artifactory server.xml /opt/jfrog/artifactory/tomcat/conf/server.xml

# This should be mapped to a shared NFS mounted on the host
# Expose HA Port
EXPOSE 8081 10042

ENTRYPOINT /runArtifactory.sh
2 changes: 1 addition & 1 deletion dc-os/Docker/PRO/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ mkdir files
echo "adding configuration file"
cp -Rf $SCRIPT_DIR/../../../files/* files/

docker build -t $1 .
docker build --rm -t $1 .
8 changes: 4 additions & 4 deletions dc-os/Docker/PRO/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ setPorts() {
export HA_MEMBERSHIP_PORT=$PORT1
fi
# Change the port
sed -i -e 's,Connector port="\(.*\)",Connector port="'"$INSTANCE_PORT"'",g' /opt/jfrog/artifactory/tomcat/conf/server.xml
sed -i -e 's,Connector port="8081",Connector port="'"$INSTANCE_PORT"'",g' /opt/jfrog/artifactory/tomcat/conf/server.xml
}

#Set initial configuration
Expand All @@ -57,7 +57,7 @@ function setInitialConfiguration {
cp -f /var/opt/jfrog/artifactory/etc/artifactory.config.latest.xml /var/opt/jfrog/artifactory/etc/artifactory.config.import.xml
else
# If not we take the bootstrap one, and import it
cp -f /var/opt/jfrog/artifactory/etc/artifactory.config.bootstrap.xml /var/opt/jfrog/artifactory/etc/artifactory.config.import.xml
cp -f /var/opt/jfrog/artifactory/etc/artifactory.config.bootstrap.xml /var/opt/jfrog/artifactory/etc/artifactory.config.import.xml
fi
# Changing the instance port
sed -i -e "s,<artifactoryPort>\(.*\)</artifactoryPort>,<artifactoryPort>$INSTANCE_PORT</artifactoryPort>,g" /var/opt/jfrog/artifactory/etc/artifactory.config.import.xml
Expand All @@ -67,8 +67,8 @@ function setInitialConfiguration {
#Set license
function setLicense {
logger "Setting up license."
[ ! -d /var/opt/jfrog/artifactory/etc ] && mkdir -p /var/opt/jfrog/artifactory/etc
echo -n "$ART_LICENSES" | cut -d, -f1 > /var/opt/jfrog/artifactory/etc/artifactory.lic
chmod 777 /var/opt/jfrog/artifactory/etc/artifactory.lic
echo "Added license"
}

Expand All @@ -94,4 +94,4 @@ setPorts
setInstanceIp
setInitialConfiguration

/entrypoint-artifactory.sh
/entrypoint-artifactory.sh
13 changes: 10 additions & 3 deletions dc-os/Docker/PRO/server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,23 @@
<Connector port="8081" protocol="HTTP/1.1"
maxThreads="500" minSpareThreads="20"
enableLookups="false" disableUploadTimeout="true"
backlog="100"
backlog="100" sendReasonPhrase="true"
relaxedPathChars='[]' relaxedQueryChars='[]'
/>

<!-- Must be at least the value of artifactory.access.client.max.connections -->
<Connector port="8040" sendReasonPhrase="true" maxThreads="50"/>

<!-- This is the optional AJP connector -->
<!-- <Connector port="8019" protocol="AJP/1.3" sendReasonPhrase="true"/> -->

<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps"/>
<Host name="localhost" appBase="webapps" startStopThreads="2"/>
<Valve className="org.apache.catalina.valves.RemoteIpValve"
remoteIpHeader="x-forwarded-for"
protocolHeader="x-forwarded-proto"
portHeader="x-forwarded-port" />
</Engine>

</Service>
</Server>
</Server>
27 changes: 0 additions & 27 deletions files/access/etc/keys/private.key

This file was deleted.

18 changes: 0 additions & 18 deletions files/access/etc/keys/root.crt

This file was deleted.

2 changes: 0 additions & 2 deletions files/security/communication.key

This file was deleted.