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

[IIIF-1111] Upgrade to Cantaloupe v5 #112

Merged
merged 4 commits into from
May 19, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In addition to running a test Cantaloupe server using the Maven Docker plugin, y
docker run -d -p 8182:8182 \
-e "CANTALOUPE_ENDPOINT_ADMIN_SECRET=secret" \
-e "CANTALOUPE_ENDPOINT_ADMIN_ENABLED=true" \
--name melon -v /path/to/your/images:/imageroot cantaloupe:4.1.7-3 # or latest version
--name melon -v /path/to/your/images:/imageroot cantaloupe:5.0.2-0 # or latest version

Here is another, more complex, example:

Expand All @@ -71,7 +71,7 @@ Here is another, more complex, example:
-e "CANTALOUPE_S3SOURCE_ENDPOINT=s3.amazonaws.com" \
-e "CANTALOUPE_LOG_APPLICATION_FILEAPPENDER_ENABLED=true" \
-e "CANTALOUPE_LOG_APPLICATION_FILEAPPENDER_PATHNAME=/var/log/cantaloupe/cantaloupe.log" \
--name melon -v /path/to/your/images:/imageroot cantaloupe:4.1.7-3 # or latest version
--name melon -v /path/to/your/images:/imageroot cantaloupe:5.0.2-0 # or latest version

There are, of course, other ways to run Docker without having to supply all these environmental variables on the command line. One might want to use a Docker Compose file, Terraform configs, or Kubernetes.

Expand Down Expand Up @@ -122,7 +122,7 @@ Locally, we deploy Cantaloupe with Kubernetes. We're working on some documentati

We pin the versions of packages that we install into our base image. What this means is that periodically a pinned version will become obsolete and the build will break. We have a nightly build that should catch this issues for us, but in the case that you find the breakage before us, there is a handy way to tell which pinned version has broken the build. To see the current versions inside the base image, run:

mvn validate -Dversions
mvn validate -Dversions -Ddocker.noCache

This will output a list of current versions, which can be compared to the pinned versions defined in the project's POM file (i.e., pom.xml).

Expand Down
9 changes: 4 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,29 +64,28 @@

<properties>
<!-- What versions of Cantaloupe and Kakadu are we using? -->
<cantaloupe.version>4.1.7</cantaloupe.version>
<cantaloupe.version>5.0.2</cantaloupe.version>
<kakadu.version></kakadu.version>

<!-- Git repo with Kakadu source code (ours is private; override with yours) -->
<kakadu.git.repo>scm:git:git@github.com:uclalibrary/kakadu.git</kakadu.git.repo>

<!-- Docker container dependency versions -->
<ubuntu.tag>20.04</ubuntu.tag>
<openjdk.version>11.0.10+9-0ubuntu1~20.04</openjdk.version>
<openjdk.version>11.0.11+9-0ubuntu2~20.04</openjdk.version>
<gcc.version>4:9.3.0-1ubuntu2</gcc.version>
<make.version>4.2.1-1.2</make.version>
<libtiff.version>4.1.0+git191117-2ubuntu0.20.04.1</libtiff.version>
<build.essential.version>12.8ubuntu1.1</build.essential.version>
<libopenjp2.version>2.3.1-1ubuntu4</libopenjp2.version>
<libopenjp2.version>2.3.1-1ubuntu4.20.04.1</libopenjp2.version>
<libturbojpeg.version>2.0.3-0ubuntu1.20.04.1</libturbojpeg.version>
<wget.version>1.20.3-1ubuntu1</wget.version>
ksclarke marked this conversation as resolved.
Show resolved Hide resolved
<unzip.version>6.0-25ubuntu1</unzip.version>
<zip.version>3.0-11build1</zip.version>
<graphicsmagick.version>1.4+really1.3.35-1</graphicsmagick.version>
<curl.version>7.68.0-1ubuntu2.5</curl.version>
<imagemagick.version>8:6.9.10.23+dfsg-2.1ubuntu11.2</imagemagick.version>
<ffmpeg.version>7:4.2.4-1ubuntu0.1</ffmpeg.version>
<python2.version>2.7.17-2ubuntu4</python2.version>
<grok.version>9.1.0</grok.version>

<!-- Java dependency versions -->
<freelib.utils.version>2.1.0</freelib.utils.version>
Expand Down
13 changes: 10 additions & 3 deletions src/main/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,9 @@ RUN apt-get update -qq && \
libopenjp2-tools=${libopenjp2.version} \
libturbojpeg=${libturbojpeg.version} \
openjdk-11-jre-headless=${openjdk.version} \
wget=${wget.version} \
unzip=${unzip.version} \
zip=${zip.version} \
graphicsmagick=${graphicsmagick.version} \
curl=${curl.version} \
imagemagick=${imagemagick.version} \
ffmpeg=${ffmpeg.version} \
python2=${python2.version} \
< /dev/null > /dev/null && \
Expand Down Expand Up @@ -152,6 +149,16 @@ RUN mkdir -p /var/log/cantaloupe /var/cache/cantaloupe && \
chown -R cantaloupe -L /var/log/cantaloupe /var/cache/cantaloupe "$CONFIG_FILE" \
/usr/local/bin/docker-entrypoint.sh /usr/local/cantaloupe

# Install grok JPEG-2000 library and tools
WORKDIR /tmp
ARG GROK_RELEASES="https://github.com/GrokImageCompression/grok/releases"
RUN curl -sL ${GROK_RELEASES}/download/v${grok.version}/grok-v${grok.version}-linux-amd64.tar.gz > grok.tar.gz && \
tar zxfv grok.tar.gz && \
cp ./grok-v${grok.version}-linux-amd64/bin/grk_* /usr/bin && \
cp ./grok-v${grok.version}-linux-amd64/lib/*libgrok* /usr/lib && \
cp -r ./grok-v${grok.version}-linux-amd64/include/grok* /usr/include && \
rm -rf /tmp/grok-v${grok.version}-linux-amd64 grok-v${grok.version}-linux-amd64.tar.gz

# Set up logging, keeping a separate log for just the errors (in addition to the full log)
ENV CANTALOUPE_LOG_APPLICATION_ROLLINGFILEAPPENDER_PATHNAME=/var/log/cantaloupe/application.log
ENV CANTALOUPE_LOG_ERROR_ROLLINGFILEAPPENDER_PATHNAME=/var/log/cantaloupe/error.log
Expand Down
Loading