├── .dockerignore ├── .github ├── dependabot.yml └── workflows │ ├── cron.yml │ ├── main.yml │ └── send-release-notification.yml ├── Dockerfile ├── Dockerfile-build ├── LICENSE ├── Makefile ├── NOTICE ├── README.md ├── VERSION ├── VERSION_FFMPEG ├── VERSION_MAJOR ├── VERSION_OPENCAST ├── VERSION_WHISPER_CPP ├── compose ├── README.md ├── assets │ └── pyca.conf ├── compose.allinone.h2+pyca.yaml ├── compose.allinone.h2.yaml ├── compose.allinone.mariadb.yaml ├── compose.allinone.postgres.yaml ├── compose.build.yaml ├── compose.multiserver.build.yaml ├── compose.multiserver.mariadb.yaml └── compose.multiserver.postgres.yaml ├── rootfs-build ├── docker-entrypoint.sh ├── docker │ └── opencast │ │ └── etc │ │ └── org.ops4j.pax.logging.cfg-develop └── usr │ └── local │ └── bin │ ├── is_git_repo │ ├── is_oc_dist │ ├── is_oc_installed │ ├── log │ ├── log_err │ ├── oc_build │ ├── oc_clean_data │ ├── oc_clone │ ├── oc_install │ ├── oc_run │ └── oc_uninstall ├── rootfs ├── docker-entrypoint.sh ├── docker-healthcheck.sh └── opencast │ ├── docker │ └── scripts │ │ ├── TryToConnectToDb.java │ │ ├── db.sh │ │ ├── elasticsearch.sh │ │ ├── h2.sh │ │ ├── helper.sh │ │ ├── jdbc.sh │ │ ├── mariadb.sh │ │ ├── opencast.sh │ │ ├── postgresql.sh │ │ ├── tz.sh │ │ └── whisper.sh │ └── etc │ ├── custom.properties │ ├── org.opencastproject.ingest.scanner.InboxScannerService-inbox.cfg │ ├── org.opencastproject.organization-mh_default_org.cfg-clustered │ ├── org.ops4j.pax.logging.cfg │ └── org.ops4j.pax.web.cfg └── scripts └── release /.dockerignore: -------------------------------------------------------------------------------- 1 | .dockerignore 2 | .git/ 3 | .github/ 4 | docker-compose/ 5 | LICENSE 6 | Makefile 7 | NOTICE 8 | README.md 9 | VERSION 10 | VERSION_FFMPEG 11 | VERSION_OPENCAST 12 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | schedule: 6 | interval: weekly 7 | groups: 8 | all: 9 | patterns: [ "*" ] 10 | labels: 11 | - kind/dependency 12 | -------------------------------------------------------------------------------- /.github/workflows/cron.yml: -------------------------------------------------------------------------------- 1 | name: Update Container Images 2 | 3 | on: 4 | schedule: 5 | - cron: '0 2 * * *' 6 | 7 | jobs: 8 | build-and-push: 9 | runs-on: ubuntu-latest 10 | 11 | env: 12 | DOCKER_BUILDX_OUTPUT: --push 13 | DOCKER_BUILDX_PLATFORM: linux/amd64,linux/arm64 14 | 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | include: 19 | # dev 20 | - day_of_week: '*' 21 | branch: '18.x' 22 | push_major: 'true' 23 | - day_of_week: '*' 24 | branch: '17.x' 25 | push_major: 'false' 26 | - day_of_week: '*' 27 | branch: '16.x' 28 | push_major: 'false' 29 | 30 | # stable 31 | - day_of_week: '0' 32 | branch: '17.4' 33 | push_major: 'true' 34 | additional_tags: 'latest' 35 | - day_of_week: '1' 36 | branch: '17.3' 37 | push_major: 'false' 38 | - day_of_week: '2' 39 | branch: '17.2' 40 | push_major: 'false' 41 | - day_of_week: '3' 42 | branch: '17.1' 43 | push_major: 'false' 44 | 45 | # legacy 46 | - day_of_week: '4' 47 | branch: '16.11' 48 | push_major: 'true' 49 | - day_of_week: '5' 50 | branch: '16.10' 51 | push_major: 'false' 52 | - day_of_week: '6' 53 | branch: '16.9' 54 | push_major: 'false' 55 | 56 | steps: 57 | - uses: actions/checkout@v4 58 | with: 59 | ref: ${{ matrix.branch }} 60 | 61 | - name: set up Docker buildx 62 | uses: docker/setup-buildx-action@v3 63 | with: 64 | platforms: ${{ env.DOCKER_BUILDX_PLATFORM }} 65 | 66 | - name: set up OCI registry 67 | uses: docker/login-action@v3 68 | with: 69 | registry: quay.io 70 | username: ${{ secrets.QUAY_ROBOT_USERNAME }} 71 | password: ${{ secrets.QUAY_ROBOT_PASSWORD }} 72 | 73 | - name: build and push container images 74 | run: | 75 | if [ "${{ matrix.day_of_week }}" != "*" ]; then 76 | if [ "${{ matrix.day_of_week }}" != $(date "+%w") ]; then 77 | echo "Not scheduled for today; done" 78 | exit 79 | fi 80 | fi 81 | 82 | IMAGE_TAGS="$(cat VERSION)" 83 | if [ "${{ matrix.push_major }}" = 'true' ]; then 84 | IMAGE_TAGS="${IMAGE_TAGS} $(cat VERSION_MAJOR)" 85 | fi 86 | if [ -n "${{ matrix.additional_tags }}" ]; then 87 | IMAGE_TAGS="${IMAGE_TAGS} ${{ matrix.additional_tags }}" 88 | fi 89 | 90 | BUILD_DATE=$(date -u +"%Y-%m-%dT%TZ") 91 | 92 | # retry once 93 | for i in $(seq 1 2); do 94 | make \ 95 | BUILD_DATE="${BUILD_DATE}" \ 96 | IMAGE_TAGS="${IMAGE_TAGS}" \ 97 | DOCKER_BUILDX_PLATFORM="${DOCKER_BUILDX_PLATFORM}" \ 98 | DOCKER_BUILDX_OUTPUT="${DOCKER_BUILDX_OUTPUT}" \ 99 | build \ 100 | && break 101 | done 102 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build 2 | 3 | on: 4 | push: 5 | branches: 6 | - '[0-9]+.x' 7 | - '[0-9]+.[0-9]+' 8 | pull_request: 9 | branches: 10 | - '[0-9]+.x' 11 | - '[0-9]+.[0-9]+' 12 | 13 | jobs: 14 | lint: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/checkout@v4 18 | - name: install 19 | run: | 20 | sudo apt-get install shellcheck 21 | shellcheck --version 22 | - name: lint 23 | run: | 24 | make lint 25 | 26 | build-and-push: 27 | runs-on: ubuntu-latest 28 | env: 29 | DOCKER_BUILDX_PLATFORM: linux/amd64,linux/arm64 30 | steps: 31 | - uses: actions/checkout@v4 32 | 33 | - name: set up Docker buildx 34 | uses: docker/setup-buildx-action@v3 35 | with: 36 | platforms: ${{ env.DOCKER_BUILDX_PLATFORM }} 37 | 38 | - name: info 39 | run: | 40 | docker info 41 | 42 | - uses: docker/login-action@v3 43 | if: ${{ github.event_name == 'push' }} 44 | with: 45 | registry: quay.io 46 | username: ${{ secrets.QUAY_ROBOT_USERNAME }} 47 | password: ${{ secrets.QUAY_ROBOT_PASSWORD }} 48 | 49 | - name: build and push container images 50 | run: | 51 | case "${{ github.event_name }}" in 52 | push) DOCKER_BUILDX_OUTPUT='--push' ;; 53 | *) DOCKER_BUILDX_OUTPUT='' ;; 54 | esac 55 | 56 | IMAGE_TAGS="$(cat VERSION)" 57 | 58 | BUILD_DATE=$(date -u +"%Y-%m-%dT%TZ") 59 | 60 | # retry once 61 | for i in $(seq 1 2); do 62 | make \ 63 | BUILD_DATE="${BUILD_DATE}" \ 64 | IMAGE_TAGS="${IMAGE_TAGS}" \ 65 | DOCKER_BUILDX_PLATFORM="${DOCKER_BUILDX_PLATFORM}" \ 66 | DOCKER_BUILDX_OUTPUT="${DOCKER_BUILDX_OUTPUT}" \ 67 | build \ 68 | && break 69 | done 70 | -------------------------------------------------------------------------------- /.github/workflows/send-release-notification.yml: -------------------------------------------------------------------------------- 1 | name: Send Out Release Notification 2 | 3 | on: 4 | create: 5 | 6 | jobs: 7 | build-and-push: 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v4 12 | 13 | - name: set up matrix-msg 14 | uses: lkiesow/matrix-notification@v1 15 | with: 16 | room: '!RACMQVfKRDQTWhdXLa:matrix.org' 17 | token: ${{ secrets.MATRIX_TOKEN }} 18 | tool: true 19 | 20 | - name: announce new container images 21 | run: | 22 | if [[ "${{ github.ref }}" =~ ^refs/heads/[0-9]+\.(x|[0-9]+)$ ]]; then 23 | echo "Started building Opencast $(cat VERSION) container images. They should be available in approximately 1h." | ~/.local/bin/matrix-msg 24 | fi 25 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | ARG IMAGE_BASE=default 16 | 17 | FROM --platform=${BUILDPLATFORM} docker.io/library/eclipse-temurin:17-jdk AS base-build 18 | FROM --platform=${TARGETPLATFORM} docker.io/library/eclipse-temurin:17-jre AS base-target 19 | LABEL org.opencontainers.image.base.name="docker.io/library/eclipse-temurin:17-jre" 20 | 21 | FROM base-target AS base-default-runtime 22 | FROM base-default-runtime AS base-default-dev 23 | 24 | # Adapted from: 25 | # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.4.1/ubuntu2204/base/Dockerfile 26 | # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.4.1/ubuntu2204/runtime/Dockerfile 27 | # BSD-3-Clause License: https://gitlab.com/nvidia/container-images/cuda/-/blob/master/LICENSE 28 | FROM base-target AS base-nvidia-cuda-runtime-amd64 29 | ENV NVARCH=x86_64 30 | FROM base-target AS base-nvidia-cuda-runtime-arm64 31 | ENV NVARCH=sbsa 32 | FROM base-nvidia-cuda-runtime-${TARGETARCH} AS base-nvidia-cuda-runtime 33 | RUN apt-get update \ 34 | && apt-get install -y --no-install-recommends \ 35 | ca-certificates \ 36 | curl \ 37 | gnupg2 \ 38 | && rm -rf /var/lib/apt/lists/* 39 | 40 | RUN curl -fsSL "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/${NVARCH}/3bf863cc.pub" | gpg --dearmor -o /etc/apt/keyrings/nvidia-cuda-keyring.gpg \ 41 | && echo "deb [signed-by=/etc/apt/keyrings/nvidia-cuda-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/${NVARCH} /" > /etc/apt/sources.list.d/nvidia-cuda.list 42 | 43 | RUN apt-get update \ 44 | && apt-get install -y --no-install-recommends \ 45 | cuda-compat-12-4 \ 46 | cuda-cudart-12-4 \ 47 | cuda-libraries-12-4 \ 48 | cuda-nvtx-12-4 \ 49 | libcublas-12-4 \ 50 | libcusparse-12-4 \ 51 | libnccl2 \ 52 | libnpp-12-4 \ 53 | && rm -rf /var/lib/apt/lists/* 54 | 55 | ENV NVIDIA_REQUIRE_CUDA="cuda>=12.4 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=525,driver<526 brand=unknown,driver>=525,driver<526 brand=nvidia,driver>=525,driver<526 brand=nvidiartx,driver>=525,driver<526 brand=geforce,driver>=525,driver<526 brand=geforcertx,driver>=525,driver<526 brand=quadro,driver>=525,driver<526 brand=quadrortx,driver>=525,driver<526 brand=titan,driver>=525,driver<526 brand=titanrtx,driver>=525,driver<526 brand=tesla,driver>=535,driver<536 brand=unknown,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=geforce,driver>=535,driver<536 brand=geforcertx,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=titan,driver>=535,driver<536 brand=titanrtx,driver>=535,driver<536" 56 | ENV NVIDIA_VISIBLE_DEVICES="all" 57 | ENV NVIDIA_DRIVER_CAPABILITIES="compute,utility" 58 | 59 | ENV PATH="/usr/local/cuda/bin:${PATH}" 60 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib:/usr/local/cuda/lib64:/usr/local/cuda/compat:${LD_LIBRARY_PATH}" 61 | 62 | 63 | # Adapted from: https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.4.1/ubuntu2204/devel/Dockerfile 64 | # BSD-3-Clause License: https://gitlab.com/nvidia/container-images/cuda/-/blob/master/LICENSE 65 | FROM base-nvidia-cuda-runtime AS base-nvidia-cuda-dev 66 | RUN apt-get update \ 67 | && apt-get install -y --no-install-recommends \ 68 | cuda-command-line-tools-12-4 \ 69 | cuda-cudart-dev-12-4 \ 70 | cuda-libraries-dev-12-4 \ 71 | cuda-minimal-build-12-4 \ 72 | cuda-nsight-compute-12-4 \ 73 | cuda-nvml-dev-12-4 \ 74 | libcublas-dev-12-4 \ 75 | libcusparse-dev-12-4 \ 76 | libnccl-dev \ 77 | libnpp-dev-12-4 \ 78 | && rm -rf /var/lib/apt/lists/* 79 | 80 | ENV LIBRARY_PATH=/usr/local/cuda/lib64/stubs:/usr/local/cuda/compat 81 | 82 | 83 | FROM base-${IMAGE_BASE}-runtime AS base-runtime 84 | FROM base-${IMAGE_BASE}-dev AS base-dev 85 | 86 | 87 | FROM --platform=${BUILDPLATFORM} docker.io/library/alpine:edge AS build-ffmpeg 88 | ARG TARGETARCH 89 | ARG FFMPEG_VERSION="release" 90 | RUN apk add --no-cache \ 91 | curl \ 92 | tar \ 93 | xz \ 94 | && mkdir -p /tmp/ffmpeg \ 95 | && cd /tmp/ffmpeg \ 96 | && curl -sSL "https://s3.opencast.org/opencast-ffmpeg-static/ffmpeg-${FFMPEG_VERSION}-${TARGETARCH}-static.tar.xz" \ 97 | | tar xJf - --strip-components 1 --wildcards '*/ffmpeg' '*/ffprobe' \ 98 | && chown root:root ff* \ 99 | && mv ff* /usr/local/bin 100 | 101 | 102 | FROM base-dev AS build-whisper-cpp 103 | ARG WHISPER_CPP_VERSION="master" 104 | RUN apt-get update \ 105 | && apt-get install -y --no-install-recommends \ 106 | ccache \ 107 | cmake \ 108 | g++ \ 109 | gcc \ 110 | git \ 111 | libc-dev \ 112 | make 113 | RUN mkdir -p /tmp/whisper.cpp 114 | WORKDIR /tmp/whisper.cpp 115 | RUN git clone https://github.com/ggerganov/whisper.cpp.git . \ 116 | && git checkout "$WHISPER_CPP_VERSION" 117 | ARG IMAGE_BASE=default 118 | RUN cmake -B build \ 119 | -DBUILD_SHARED_LIBS=OFF \ 120 | -DGGML_CPU=ON \ 121 | -DGGML_CPU_ARM_ARCH=native \ 122 | -DGGML_CUDA=$(if [ "${IMAGE_BASE}" = "nvidia-cuda" ]; then echo ON; else echo OFF; fi) \ 123 | -DGGML_NATIVE=OFF \ 124 | -DWHISPER_BUILD_EXAMPLES=ON \ 125 | -DWHISPER_BUILD_SERVER=OFF \ 126 | -DWHISPER_BUILD_TESTS=OFF \ 127 | && cmake --build build --config Release -j $(nproc) \ 128 | && sed -i 's#models_path=.*$#models_path=/usr/share/whisper.cpp/models/#' models/download-ggml-model.sh 129 | RUN mkdir -p out \ 130 | && mv build/bin/whisper-cli out/whisper.cpp \ 131 | && mv models/download-ggml-model.sh out/whisper.cpp-model-download 132 | 133 | 134 | FROM --platform=${BUILDPLATFORM} base-build AS build-opencast 135 | 136 | ARG OPENCAST_REPO="https://github.com/opencast/opencast.git" 137 | ARG OPENCAST_VERSION="develop" 138 | 139 | ENV OPENCAST_SRC="/usr/src/opencast" 140 | ENV OPENCAST_HOME="/opencast" 141 | ENV OPENCAST_UHOME="/home/opencast" 142 | ENV OPENCAST_UID="800" 143 | ENV OPENCAST_GID="800" 144 | ENV OPENCAST_USER="opencast" 145 | ENV OPENCAST_GROUP="opencast" 146 | 147 | RUN apt-get update \ 148 | && apt-get install -y --no-install-recommends \ 149 | ca-certificates \ 150 | git \ 151 | gzip \ 152 | tar 153 | 154 | RUN groupadd --system -g "${OPENCAST_GID}" "${OPENCAST_GROUP}" \ 155 | && useradd --system -M -N -g "${OPENCAST_GROUP}" -d "${OPENCAST_UHOME}" -u "${OPENCAST_UID}" "${OPENCAST_USER}" \ 156 | && mkdir -p "${OPENCAST_SRC}" "${OPENCAST_HOME}" "${OPENCAST_UHOME}" \ 157 | && chown -R "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_SRC}" "${OPENCAST_HOME}" "${OPENCAST_UHOME}" 158 | 159 | USER "${OPENCAST_USER}" 160 | WORKDIR "${OPENCAST_SRC}" 161 | 162 | RUN git clone --recursive "${OPENCAST_REPO}" . \ 163 | && git checkout "${OPENCAST_VERSION}" 164 | RUN ./mvnw --batch-mode install \ 165 | -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 \ 166 | -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ 167 | -DskipTests=true \ 168 | -Dcheckstyle.skip=true \ 169 | -DskipJasmineTests=true 170 | ARG OPENCAST_DISTRIBUTION 171 | RUN tar -xzf build/opencast-dist-${OPENCAST_DISTRIBUTION}-*.tar.gz --strip 1 -C "${OPENCAST_HOME}" 172 | 173 | 174 | FROM --platform=${BUILDPLATFORM} base-build AS build-rootfs 175 | ENV OPENCAST_HOME "/rootfs/opencast" 176 | ENV OPENCAST_SCRIPTS "${OPENCAST_HOME}/docker/scripts" 177 | COPY rootfs /rootfs 178 | RUN javac "${OPENCAST_SCRIPTS}/TryToConnectToDb.java" \ 179 | && rm -rf "${OPENCAST_SCRIPTS}/TryToConnectToDb.java" 180 | 181 | 182 | FROM base-runtime 183 | 184 | ENV OPENCAST_HOME="/opencast" 185 | ENV OPENCAST_DATA="/data" 186 | ENV OPENCAST_CUSTOM_CONFIG="/etc/opencast" 187 | ENV OPENCAST_USER="opencast" 188 | ENV OPENCAST_GROUP="opencast" 189 | ENV OPENCAST_UHOME="/home/opencast" 190 | ENV OPENCAST_UID="800" 191 | ENV OPENCAST_GID="800" 192 | ENV WHISPER_CPP_MODELS="/usr/share/whisper.cpp/models" 193 | ENV OPENCAST_CONFIG="${OPENCAST_HOME}/etc" 194 | ENV OPENCAST_SCRIPTS="${OPENCAST_HOME}/docker/scripts" 195 | ENV OPENCAST_STAGE_BASE_HOME="${OPENCAST_HOME}/docker/stage/base" 196 | ENV OPENCAST_STAGE_OUT_HOME="${OPENCAST_HOME}/docker/stage/out" 197 | 198 | RUN groupadd --system -g "${OPENCAST_GID}" "${OPENCAST_GROUP}" \ 199 | && useradd --system -M -N -g "${OPENCAST_GROUP}" -d "${OPENCAST_UHOME}" -u "${OPENCAST_UID}" "${OPENCAST_USER}" \ 200 | && mkdir -p "${OPENCAST_DATA}" "${OPENCAST_UHOME}" "${WHISPER_CPP_MODELS}" \ 201 | && chown -R "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_DATA}" "${OPENCAST_UHOME}" "${WHISPER_CPP_MODELS}" 202 | 203 | # libgomp1 is a dependency of whisper.cpp. It is also installed as a dependency of Tesseract, but we want it to be an 204 | # explicitly installed package. 205 | RUN apt-get update \ 206 | && apt-get install -y --no-install-recommends \ 207 | ca-certificates \ 208 | curl \ 209 | fontconfig \ 210 | fonts-dejavu \ 211 | fonts-freefont-ttf \ 212 | fonts-liberation \ 213 | fonts-linuxlibertine \ 214 | gosu \ 215 | inotify-tools \ 216 | jq \ 217 | libgomp1 \ 218 | netcat-openbsd \ 219 | openssl \ 220 | rsync \ 221 | tesseract-ocr \ 222 | tesseract-ocr-eng \ 223 | tzdata \ 224 | && rm -rf /var/lib/apt/lists/* 225 | 226 | COPY --from=build-ffmpeg /usr/local/bin/ff* /usr/local/bin/ 227 | COPY --from=build-whisper-cpp /tmp/whisper.cpp/out/* /usr/local/bin/ 228 | COPY --from=build-opencast "${OPENCAST_HOME}" "${OPENCAST_HOME}" 229 | COPY --from=build-rootfs /rootfs / 230 | 231 | ARG OPENCAST_REPO="https://github.com/opencast/opencast.git" 232 | ARG OPENCAST_VERSION="develop" 233 | ARG OPENCAST_DISTRIBUTION 234 | ARG VERSION=unkown 235 | ARG BUILD_DATE=unkown 236 | ARG GIT_COMMIT=unkown 237 | 238 | ENV OPENCAST_REPO="${OPENCAST_REPO}" 239 | ENV OPENCAST_VERSION="${OPENCAST_VERSION}" 240 | ENV OPENCAST_DISTRIBUTION="${OPENCAST_DISTRIBUTION}" 241 | 242 | RUN if [ "${OPENCAST_DISTRIBUTION}" = "allinone" ]; then \ 243 | rm -f "${OPENCAST_CONFIG}/org.opencastproject.organization-mh_default_org.cfg-clustered"; \ 244 | fi \ 245 | && mv "${OPENCAST_CONFIG}/org.opencastproject.organization-mh_default_org.cfg-clustered" "${OPENCAST_CONFIG}/org.opencastproject.organization-mh_default_org.cfg" || true \ 246 | && chown "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_HOME}" "${OPENCAST_CONFIG}" \ 247 | && chown -R "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_HOME}/data" \ 248 | \ 249 | && mkdir -p "${OPENCAST_STAGE_BASE_HOME}" \ 250 | && rsync -vrlog --chown=0:0 "${OPENCAST_CONFIG}" "${OPENCAST_STAGE_BASE_HOME}" \ 251 | \ 252 | && rm -rf /tmp/* 253 | 254 | WORKDIR "${OPENCAST_HOME}" 255 | 256 | EXPOSE 8080 257 | VOLUME [ "${OPENCAST_DATA}" ] 258 | 259 | LABEL maintainer="University of Münster eLectures Team " \ 260 | org.opencontainers.image.title="opencast-${OPENCAST_DISTRIBUTION}" \ 261 | org.opencontainers.image.description="container image for the Opencast ${OPENCAST_DISTRIBUTION} distribution" \ 262 | org.opencontainers.image.version="${VERSION}" \ 263 | org.opencontainers.image.vendor="Opencast" \ 264 | org.opencontainers.image.authors="University of Münster eLectures Team " \ 265 | org.opencontainers.image.licenses="ECL-2.0" \ 266 | org.opencontainers.image.url="https://github.com/opencast/opencast-docker/blob/${VERSION}/README.md" \ 267 | org.opencontainers.image.documentation="https://github.com/opencast/opencast-docker/blob/${VERSION}/README.md" \ 268 | org.opencontainers.image.source="https://github.com/opencast/opencast-docker" \ 269 | org.opencontainers.image.created="${BUILD_DATE}" \ 270 | org.opencontainers.image.revision="${GIT_COMMIT}" 271 | 272 | HEALTHCHECK --timeout=10s CMD /docker-healthcheck.sh 273 | ENTRYPOINT ["/docker-entrypoint.sh"] 274 | CMD ["app:start"] 275 | -------------------------------------------------------------------------------- /Dockerfile-build: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | ARG IMAGE_BASE=default 16 | 17 | FROM docker.io/library/eclipse-temurin:17-jdk AS base-target 18 | LABEL org.opencontainers.image.base.name="docker.io/library/eclipse-temurin:17-jdk" 19 | 20 | FROM base-target AS base-default-runtime 21 | FROM base-default-runtime AS base-default-dev 22 | 23 | # Adapted from: 24 | # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.4.1/ubuntu2204/base/Dockerfile 25 | # https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.4.1/ubuntu2204/runtime/Dockerfile 26 | # BSD-3-Clause License: https://gitlab.com/nvidia/container-images/cuda/-/blob/master/LICENSE 27 | FROM base-target AS base-nvidia-cuda-runtime-amd64 28 | ENV NVARCH=x86_64 29 | FROM base-target AS base-nvidia-cuda-runtime-arm64 30 | ENV NVARCH=sbsa 31 | FROM base-nvidia-cuda-runtime-${TARGETARCH} AS base-nvidia-cuda-runtime 32 | RUN apt-get update \ 33 | && apt-get install -y --no-install-recommends \ 34 | ca-certificates \ 35 | curl \ 36 | gnupg2 \ 37 | && rm -rf /var/lib/apt/lists/* 38 | 39 | RUN curl -fsSL "https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/${NVARCH}/3bf863cc.pub" | gpg --dearmor -o /etc/apt/keyrings/nvidia-cuda-keyring.gpg \ 40 | && echo "deb [signed-by=/etc/apt/keyrings/nvidia-cuda-keyring.gpg] https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/${NVARCH} /" > /etc/apt/sources.list.d/nvidia-cuda.list 41 | 42 | RUN apt-get update \ 43 | && apt-get install -y --no-install-recommends \ 44 | cuda-compat-12-4 \ 45 | cuda-cudart-12-4 \ 46 | cuda-libraries-12-4 \ 47 | cuda-nvtx-12-4 \ 48 | libcublas-12-4 \ 49 | libcusparse-12-4 \ 50 | libnccl2 \ 51 | libnpp-12-4 \ 52 | && rm -rf /var/lib/apt/lists/* 53 | 54 | ENV NVIDIA_REQUIRE_CUDA="cuda>=12.4 brand=tesla,driver>=470,driver<471 brand=unknown,driver>=470,driver<471 brand=nvidia,driver>=470,driver<471 brand=nvidiartx,driver>=470,driver<471 brand=geforce,driver>=470,driver<471 brand=geforcertx,driver>=470,driver<471 brand=quadro,driver>=470,driver<471 brand=quadrortx,driver>=470,driver<471 brand=titan,driver>=470,driver<471 brand=titanrtx,driver>=470,driver<471 brand=tesla,driver>=525,driver<526 brand=unknown,driver>=525,driver<526 brand=nvidia,driver>=525,driver<526 brand=nvidiartx,driver>=525,driver<526 brand=geforce,driver>=525,driver<526 brand=geforcertx,driver>=525,driver<526 brand=quadro,driver>=525,driver<526 brand=quadrortx,driver>=525,driver<526 brand=titan,driver>=525,driver<526 brand=titanrtx,driver>=525,driver<526 brand=tesla,driver>=535,driver<536 brand=unknown,driver>=535,driver<536 brand=nvidia,driver>=535,driver<536 brand=nvidiartx,driver>=535,driver<536 brand=geforce,driver>=535,driver<536 brand=geforcertx,driver>=535,driver<536 brand=quadro,driver>=535,driver<536 brand=quadrortx,driver>=535,driver<536 brand=titan,driver>=535,driver<536 brand=titanrtx,driver>=535,driver<536" 55 | ENV NVIDIA_VISIBLE_DEVICES="all" 56 | ENV NVIDIA_DRIVER_CAPABILITIES="compute,utility" 57 | 58 | ENV PATH="/usr/local/cuda/bin:${PATH}" 59 | ENV LD_LIBRARY_PATH="/usr/local/cuda/lib:/usr/local/cuda/lib64:/usr/local/cuda/compat:${LD_LIBRARY_PATH}" 60 | 61 | 62 | # Adapted from: https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.4.1/ubuntu2204/devel/Dockerfile 63 | # BSD-3-Clause License: https://gitlab.com/nvidia/container-images/cuda/-/blob/master/LICENSE 64 | FROM base-nvidia-cuda-runtime AS base-nvidia-cuda-dev 65 | RUN apt-get update \ 66 | && apt-get install -y --no-install-recommends \ 67 | cuda-command-line-tools-12-4 \ 68 | cuda-cudart-dev-12-4 \ 69 | cuda-libraries-dev-12-4 \ 70 | cuda-minimal-build-12-4 \ 71 | cuda-nsight-compute-12-4 \ 72 | cuda-nvml-dev-12-4 \ 73 | libcublas-dev-12-4 \ 74 | libcusparse-dev-12-4 \ 75 | libnccl-dev \ 76 | libnpp-dev-12-4 \ 77 | && rm -rf /var/lib/apt/lists/* 78 | 79 | ENV LIBRARY_PATH=/usr/local/cuda/lib64/stubs:/usr/local/cuda/compat 80 | 81 | 82 | FROM base-${IMAGE_BASE}-runtime AS base-runtime 83 | FROM base-${IMAGE_BASE}-dev AS base-dev 84 | 85 | 86 | FROM --platform=${BUILDPLATFORM} docker.io/library/alpine:edge AS build-ffmpeg 87 | ARG TARGETARCH 88 | ARG FFMPEG_VERSION="release" 89 | RUN apk add --no-cache \ 90 | curl \ 91 | tar \ 92 | xz \ 93 | && mkdir -p /tmp/ffmpeg \ 94 | && cd /tmp/ffmpeg \ 95 | && curl -sSL "https://s3.opencast.org/opencast-ffmpeg-static/ffmpeg-${FFMPEG_VERSION}-${TARGETARCH}-static.tar.xz" \ 96 | | tar xJf - --strip-components 1 --wildcards '*/ffmpeg' '*/ffprobe' \ 97 | && chown root:root ff* \ 98 | && mv ff* /usr/local/bin 99 | 100 | 101 | FROM base-dev AS build-whisper-cpp 102 | ARG WHISPER_CPP_VERSION="master" 103 | RUN apt-get update \ 104 | && apt-get install -y --no-install-recommends \ 105 | ccache \ 106 | cmake \ 107 | g++ \ 108 | gcc \ 109 | git \ 110 | libc-dev \ 111 | make 112 | RUN mkdir -p /tmp/whisper.cpp 113 | WORKDIR /tmp/whisper.cpp 114 | RUN git clone https://github.com/ggerganov/whisper.cpp.git . \ 115 | && git checkout "$WHISPER_CPP_VERSION" 116 | ARG IMAGE_BASE=default 117 | RUN cmake -B build \ 118 | -DBUILD_SHARED_LIBS=OFF \ 119 | -DGGML_CPU=ON \ 120 | -DGGML_CPU_ARM_ARCH=native \ 121 | -DGGML_CUDA=$(if [ "${IMAGE_BASE}" = "nvidia-cuda" ]; then echo ON; else echo OFF; fi) \ 122 | -DGGML_NATIVE=OFF \ 123 | -DWHISPER_BUILD_EXAMPLES=ON \ 124 | -DWHISPER_BUILD_SERVER=OFF \ 125 | -DWHISPER_BUILD_TESTS=OFF \ 126 | && cmake --build build --config Release -j $(nproc) \ 127 | && sed -i 's#models_path=.*$#models_path=/usr/share/whisper.cpp/models/#' models/download-ggml-model.sh 128 | RUN mkdir -p out \ 129 | && mv build/bin/whisper-cli out/whisper.cpp \ 130 | && mv models/download-ggml-model.sh out/whisper.cpp-model-download 131 | 132 | 133 | FROM base-dev 134 | 135 | ARG OPENCAST_REPO="https://github.com/opencast/opencast.git" 136 | ARG OPENCAST_VERSION="develop" 137 | ARG VERSION=unkown 138 | ARG BUILD_DATE=unkown 139 | ARG GIT_COMMIT=unkown 140 | 141 | LABEL maintainer="University of Münster eLectures Team " \ 142 | org.opencontainers.image.title="opencast-build" \ 143 | org.opencontainers.image.description="container image that provides an Opencast build and development environment" \ 144 | org.opencontainers.image.version="${VERSION}" \ 145 | org.opencontainers.image.vendor="Opencast" \ 146 | org.opencontainers.image.authors="University of Münster eLectures Team " \ 147 | org.opencontainers.image.licenses="ECL-2.0" \ 148 | org.opencontainers.image.url="https://github.com/opencast/opencast-docker/blob/${VERSION}/README.md" \ 149 | org.opencontainers.image.documentation="https://github.com/opencast/opencast-docker/blob/${VERSION}/README.md" \ 150 | org.opencontainers.image.source="https://github.com/opencast/opencast-docker" \ 151 | org.opencontainers.image.created="${BUILD_DATE}" \ 152 | org.opencontainers.image.revision="${GIT_COMMIT}" 153 | 154 | ENV OPENCAST_REPO="${OPENCAST_REPO}" 155 | ENV OPENCAST_VERSION="${OPENCAST_VERSION}" 156 | ENV OPENCAST_DISTRIBUTION="${OPENCAST_DISTRIBUTION}" 157 | ENV OPENCAST_SRC="/usr/src/opencast" 158 | ENV OPENCAST_HOME="/opencast" 159 | ENV OPENCAST_DATA="/data" 160 | ENV OPENCAST_CUSTOM_CONFIG="/etc/opencast" 161 | ENV OPENCAST_USER="opencast" 162 | ENV OPENCAST_GROUP="opencast" 163 | ENV OPENCAST_UHOME="/home/opencast" 164 | ENV OPENCAST_UID="800" 165 | ENV OPENCAST_GID="800" 166 | ENV OPENCAST_BUILD_ASSETS="/docker" 167 | ENV WHISPER_CPP_MODELS="/usr/share/whisper.cpp/models" 168 | ENV OPENCAST_CONFIG="${OPENCAST_HOME}/etc" 169 | ENV OPENCAST_SCRIPTS="${OPENCAST_HOME}/docker/scripts" 170 | ENV OPENCAST_STAGE_BASE_HOME="${OPENCAST_HOME}/docker/stage/base" 171 | ENV OPENCAST_STAGE_OUT_HOME="${OPENCAST_HOME}/docker/stage/out" 172 | ENV ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER="admin" 173 | ENV ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS="opencast" 174 | ENV ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER="opencast_system_account" 175 | ENV ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS="CHANGE_ME" 176 | 177 | # Install Firefox from PPA 178 | COPY < /etc/sudoers.d/opencast-builder \ 243 | \ 244 | && cd / \ 245 | && rm -rf /tmp/* /var/lib/apt/lists/* 246 | 247 | COPY --from=build-ffmpeg /usr/local/bin/ff* /usr/local/bin/ 248 | COPY --from=build-whisper-cpp /tmp/whisper.cpp/out/* /usr/local/bin/ 249 | COPY rootfs "${OPENCAST_BUILD_ASSETS}/" 250 | COPY rootfs-build / 251 | 252 | WORKDIR "${OPENCAST_SRC}" 253 | 254 | EXPOSE 8080 5005 255 | VOLUME [ "${OPENCAST_DATA}", "${OPENCAST_SRC}", "/root/.m2" ] 256 | 257 | ENTRYPOINT ["/docker-entrypoint.sh"] 258 | CMD ["bash"] 259 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Educational Community License, Version 2.0 (ECL-2.0) 2 | Educational Community License 3 | Version 2.0, April 2007a 4 | http://opensource.org/licenses/ECL-2.0 5 | 6 | The Educational Community License version 2.0 ("ECL") consists of the 7 | Apache 2.0 license, modified to change the scope of the patent grant in 8 | section 3 to be specific to the needs of the education communities using 9 | this license. The original Apache 2.0 license can be found at: 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 13 | 14 | 1. Definitions. 15 | 16 | "License" shall mean the terms and conditions for use, reproduction, 17 | and distribution as defined by Sections 1 through 9 of this document. 18 | 19 | "Licensor" shall mean the copyright owner or entity authorized by 20 | the copyright owner that is granting the License. 21 | 22 | "Legal Entity" shall mean the union of the acting entity and all 23 | other entities that control, are controlled by, or are under common 24 | control with that entity. For the purposes of this definition, 25 | "control" means (i) the power, direct or indirect, to cause the 26 | direction or management of such entity, whether by contract or 27 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 28 | outstanding shares, or (iii) beneficial ownership of such entity. 29 | 30 | "You" (or "Your") shall mean an individual or Legal Entity 31 | exercising permissions granted by this License. 32 | 33 | "Source" form shall mean the preferred form for making modifications, 34 | including but not limited to software source code, documentation 35 | source, and configuration files. 36 | 37 | "Object" form shall mean any form resulting from mechanical 38 | transformation or translation of a Source form, including but 39 | not limited to compiled object code, generated documentation, 40 | and conversions to other media types. 41 | 42 | "Work" shall mean the work of authorship, whether in Source or 43 | Object form, made available under the License, as indicated by a 44 | copyright notice that is included in or attached to the work 45 | (an example is provided in the Appendix below). 46 | 47 | "Derivative Works" shall mean any work, whether in Source or Object 48 | form, that is based on (or derived from) the Work and for which the 49 | editorial revisions, annotations, elaborations, or other modifications 50 | represent, as a whole, an original work of authorship. For the purposes 51 | of this License, Derivative Works shall not include works that remain 52 | separable from, or merely link (or bind by name) to the interfaces of, 53 | the Work and Derivative Works thereof. 54 | 55 | "Contribution" shall mean any work of authorship, including 56 | the original version of the Work and any modifications or additions 57 | to that Work or Derivative Works thereof, that is intentionally 58 | submitted to Licensor for inclusion in the Work by the copyright owner 59 | or by an individual or Legal Entity authorized to submit on behalf of 60 | the copyright owner. For the purposes of this definition, "submitted" 61 | means any form of electronic, verbal, or written communication sent 62 | to the Licensor or its representatives, including but not limited to 63 | communication on electronic mailing lists, source code control systems, 64 | and issue tracking systems that are managed by, or on behalf of, the 65 | Licensor for the purpose of discussing and improving the Work, but 66 | excluding communication that is conspicuously marked or otherwise 67 | designated in writing by the copyright owner as "Not a Contribution." 68 | 69 | "Contributor" shall mean Licensor and any individual or Legal Entity 70 | on behalf of whom a Contribution has been received by Licensor and 71 | subsequently incorporated within the Work. 72 | 73 | 2. Grant of Copyright License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | copyright license to reproduce, prepare Derivative Works of, 77 | publicly display, publicly perform, sublicense, and distribute the 78 | Work and such Derivative Works in Source or Object form. 79 | 80 | 3. Grant of Patent License. Subject to the terms and conditions of 81 | this License, each Contributor hereby grants to You a perpetual, 82 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 83 | (except as stated in this section) patent license to make, have made, 84 | use, offer to sell, sell, import, and otherwise transfer the Work, 85 | where such license applies only to those patent claims licensable 86 | by such Contributor that are necessarily infringed by their 87 | Contribution(s) alone or by combination of their Contribution(s) 88 | with the Work to which such Contribution(s) was submitted. If You 89 | institute patent litigation against any entity (including a 90 | cross-claim or counterclaim in a lawsuit) alleging that the Work 91 | or a Contribution incorporated within the Work constitutes direct 92 | or contributory patent infringement, then any patent licenses 93 | granted to You under this License for that Work shall terminate 94 | as of the date such litigation is filed. Any patent license granted 95 | hereby with respect to contributions by an individual employed by an 96 | institution or organization is limited to patent claims where the 97 | individual that is the author of the Work is also the inventor of the 98 | patent claims licensed, and where the organization or institution has 99 | the right to grant such license under applicable grant and research 100 | funding agreements. No other express or implied licenses are granted. 101 | 102 | 4. Redistribution. You may reproduce and distribute copies of the 103 | Work or Derivative Works thereof in any medium, with or without 104 | modifications, and in Source or Object form, provided that You 105 | meet the following conditions: 106 | 107 | 1. You must give any other recipients of the Work or 108 | Derivative Works a copy of this License; and 109 | 110 | 2. You must cause any modified files to carry prominent notices 111 | stating that You changed the files; and 112 | 113 | 3. You must retain, in the Source form of any Derivative Works 114 | that You distribute, all copyright, patent, trademark, and 115 | attribution notices from the Source form of the Work, 116 | excluding those notices that do not pertain to any part of 117 | the Derivative Works; and 118 | 119 | 4. If the Work includes a "NOTICE" text file as part of its 120 | distribution, then any Derivative Works that You distribute must 121 | include a readable copy of the attribution notices contained 122 | within such NOTICE file, excluding those notices that do not 123 | pertain to any part of the Derivative Works, in at least one 124 | of the following places: within a NOTICE text file distributed 125 | as part of the Derivative Works; within the Source form or 126 | documentation, if provided along with the Derivative Works; or, 127 | within a display generated by the Derivative Works, if and 128 | wherever such third-party notices normally appear. The contents 129 | of the NOTICE file are for informational purposes only and 130 | do not modify the License. You may add Your own attribution 131 | notices within Derivative Works that You distribute, alongside 132 | or as an addendum to the NOTICE text from the Work, provided 133 | that such additional attribution notices cannot be construed 134 | as modifying the License. 135 | 136 | You may add Your own copyright statement to Your modifications and 137 | may provide additional or different license terms and conditions 138 | for use, reproduction, or distribution of Your modifications, or 139 | for any such Derivative Works as a whole, provided Your use, 140 | reproduction, and distribution of the Work otherwise complies with 141 | the conditions stated in this License. 142 | 143 | 5. Submission of Contributions. Unless You explicitly state otherwise, 144 | any Contribution intentionally submitted for inclusion in the Work 145 | by You to the Licensor shall be under the terms and conditions of 146 | this License, without any additional terms or conditions. 147 | Notwithstanding the above, nothing herein shall supersede or modify 148 | the terms of any separate license agreement you may have executed 149 | with Licensor regarding such Contributions. 150 | 151 | 6. Trademarks. This License does not grant permission to use the trade 152 | names, trademarks, service marks, or product names of the Licensor, 153 | except as required for reasonable and customary use in describing the 154 | origin of the Work and reproducing the content of the NOTICE file. 155 | 156 | 7. Disclaimer of Warranty. Unless required by applicable law or 157 | agreed to in writing, Licensor provides the Work (and each 158 | Contributor provides its Contributions) on an "AS IS" BASIS, 159 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 160 | implied, including, without limitation, any warranties or conditions 161 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 162 | PARTICULAR PURPOSE. You are solely responsible for determining the 163 | appropriateness of using or redistributing the Work and assume any 164 | risks associated with Your exercise of permissions under this License. 165 | 166 | 8. Limitation of Liability. In no event and under no legal theory, 167 | whether in tort (including negligence), contract, or otherwise, 168 | unless required by applicable law (such as deliberate and grossly 169 | negligent acts) or agreed to in writing, shall any Contributor be 170 | liable to You for damages, including any direct, indirect, special, 171 | incidental, or consequential damages of any character arising as a 172 | result of this License or out of the use or inability to use the 173 | Work (including but not limited to damages for loss of goodwill, 174 | work stoppage, computer failure or malfunction, or any and all 175 | other commercial damages or losses), even if such Contributor 176 | has been advised of the possibility of such damages. 177 | 178 | 9. Accepting Warranty or Additional Liability. While redistributing 179 | the Work or Derivative Works thereof, You may choose to offer, 180 | and charge a fee for, acceptance of support, warranty, indemnity, 181 | or other liability obligations and/or rights consistent with this 182 | License. However, in accepting such obligations, You may act only 183 | on Your own behalf and on Your sole responsibility, not on behalf 184 | of any other Contributor, and only if You agree to indemnify, 185 | defend, and hold each Contributor harmless for any liability 186 | incurred by, or claims asserted against, such Contributor by reason 187 | of your accepting any such warranty or additional liability. 188 | 189 | END OF TERMS AND CONDITIONS 190 | 191 | APPENDIX: How to apply the Educational Community License to your work 192 | 193 | To apply the Educational Community License to your work, attach 194 | the following boilerplate notice, with the fields enclosed by 195 | brackets "[]" replaced with your own identifying information. 196 | (Don't include the brackets!) The text should be enclosed in the 197 | appropriate comment syntax for the file format. We also recommend 198 | that a file or class name and description of purpose be included on 199 | the same "printed page" as the copyright notice for easier 200 | identification within third-party archives. 201 | 202 | Copyright [yyyy] [name of copyright owner] 203 | 204 | Licensed under the Educational Community License, Version 2.0 205 | (the "License"); you may not use this file except in compliance with 206 | the License. You may obtain a copy of the License at 207 | 208 | http://opensource.org/licenses/ECL-2.0 209 | 210 | Unless required by applicable law or agreed to in writing, software 211 | distributed under the License is distributed on an "AS IS" BASIS, 212 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 213 | See the License for the specific language governing permissions and 214 | limitations under the License. 215 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | # user configurable variables 16 | 17 | VERSION ?= $(shell cat VERSION) 18 | VERSION_MAJOR ?= $(shell cat VERSION_MAJOR) 19 | OPENCAST_REPO ?= https://github.com/opencast/opencast.git 20 | OPENCAST_VERSION ?= $(shell cat VERSION_OPENCAST) 21 | FFMPEG_VERSION ?= $(shell cat VERSION_FFMPEG) 22 | WHISPER_CPP_VERSION ?= $(shell cat VERSION_WHISPER_CPP) 23 | 24 | IMAGE_REGISTRY ?= quay.io/opencast 25 | IMAGE_TAGS ?= latest $(VERSION) $(VERSION_MAJOR) 26 | IMAGE_BASE ?= default 27 | DOCKER_BUILDX_PLATFORM ?= linux/amd64 28 | DOCKER_BUILDX_OUTPUT ?= --load 29 | DOCKER_BUILDX_EXTRA_ARGS ?= 30 | 31 | GIT_COMMIT := $(shell git rev-parse --short HEAD || echo "unknown") 32 | BUILD_DATE := $(shell date -u +"%Y-%m-%dT%TZ") 33 | 34 | # build variables (do not change) 35 | 36 | export DOCKER_BUILDKIT = 1 37 | OPENCAST_DISTRIBUTIONS = \ 38 | admin \ 39 | adminpresentation \ 40 | allinone \ 41 | ingest \ 42 | presentation \ 43 | worker 44 | 45 | # targets 46 | 47 | all: lint build 48 | 49 | .PHONY: build 50 | build: $(addprefix build-, $(OPENCAST_DISTRIBUTIONS)) build-build 51 | build-%: 52 | docker buildx build -f Dockerfile \ 53 | --pull \ 54 | --platform "$(DOCKER_BUILDX_PLATFORM)" \ 55 | $(DOCKER_BUILDX_OUTPUT) \ 56 | $(addprefix -t $(IMAGE_REGISTRY)/$*:, $(IMAGE_TAGS)) \ 57 | $(DOCKER_BUILDX_EXTRA_ARGS) \ 58 | \ 59 | --build-arg IMAGE_BASE="$(IMAGE_BASE)" \ 60 | --build-arg OPENCAST_REPO="$(OPENCAST_REPO)" \ 61 | --build-arg OPENCAST_VERSION="$(OPENCAST_VERSION)" \ 62 | --build-arg OPENCAST_DISTRIBUTION="$*" \ 63 | --build-arg FFMPEG_VERSION="$(FFMPEG_VERSION)" \ 64 | --build-arg WHISPER_CPP_VERSION="$(WHISPER_CPP_VERSION)" \ 65 | --build-arg BUILD_DATE="$(BUILD_DATE)" \ 66 | --build-arg GIT_COMMIT="$(GIT_COMMIT)" \ 67 | --build-arg VERSION="$(VERSION)" \ 68 | . 69 | 70 | build-build: 71 | docker buildx build -f Dockerfile-build \ 72 | --pull \ 73 | --platform "$(DOCKER_BUILDX_PLATFORM)" \ 74 | $(DOCKER_BUILDX_OUTPUT) \ 75 | $(addprefix -t $(IMAGE_REGISTRY)/build:, $(IMAGE_TAGS)) \ 76 | $(DOCKER_BUILDX_EXTRA_ARGS) \ 77 | \ 78 | --build-arg IMAGE_BASE="$(IMAGE_BASE)" \ 79 | --build-arg OPENCAST_REPO="$(OPENCAST_REPO)" \ 80 | --build-arg OPENCAST_VERSION="$(OPENCAST_VERSION)" \ 81 | --build-arg FFMPEG_VERSION="$(FFMPEG_VERSION)" \ 82 | --build-arg WHISPER_CPP_VERSION="$(WHISPER_CPP_VERSION)" \ 83 | --build-arg BUILD_DATE="$(BUILD_DATE)" \ 84 | --build-arg GIT_COMMIT="$(GIT_COMMIT)" \ 85 | --build-arg VERSION="$(VERSION)" \ 86 | . 87 | 88 | .PHONY: clean 89 | clean: $(addprefix clean-, $(OPENCAST_DISTRIBUTIONS)) clean-build 90 | clean-%: 91 | -docker rmi $(IMAGE_REGISTRY)/$* 92 | -docker rmi $(IMAGE_REGISTRY)/$*:$(VERSION) 93 | -docker rmi $(IMAGE_REGISTRY)/$*:$(VERSION_MAJOR) 94 | 95 | lint: 96 | cd rootfs && shellcheck --external-sources *.sh ./opencast/docker/scripts/*.sh 97 | cd rootfs-build/usr/local/bin && shellcheck --external-sources * 98 | .PHONY: lint 99 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | ## Docker Opencast 2 | 3 | Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | 5 | Licensed under the Educational Community License, Version 2.0 6 | (the "License"); you may not use this file except in compliance with 7 | the License. You may obtain a copy of the License at 8 | 9 | http://opensource.org/licenses/ECL-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [Opencast Container Images](https://quay.io/organization/opencast) 2 | 3 | - [Introduction](#introduction) 4 | - [Installation](#installation) 5 | - [Build](#build) 6 | - [NVIDIA CUDA Support](#nvidia-cuda-support) 7 | - [Quick Start](#quick-start) 8 | - [Images](#images) 9 | - [`allinone`](#allinone) 10 | - [`admin`, `worker`, `adminpresentation`, `ingest` and `presentation`](#admin-worker-adminpresentation-ingest-and-presentation) 11 | - [`build`](#build) 12 | - [Usage](#usage) 13 | - [Configuration](#configuration) 14 | - [Opencast](#opencast) 15 | - [Elasticsearch](#elasticsearch) 16 | - [Database](#database) 17 | - [H2](#h2) 18 | - [MariaDB and PostgreSQL](#mariadb-and-postgresql) 19 | - [whisper.cpp](#whisper.cpp) 20 | - [Miscellaneous](#miscellaneous) 21 | - [Data](#data) 22 | - [Languages](#languages) 23 | - [References](#references) 24 | 25 | ## Introduction 26 | 27 | This repository holds `Dockerfiles` for creating [Opencast](http://www.opencast.org/) container images. 28 | 29 | ## Installation 30 | 31 | All images are available on [Quay](https://quay.io/organization/opencast). To install the image simply pull the distribution you want: 32 | 33 | ```sh 34 | $ docker pull "quay.io/opencast/" 35 | ``` 36 | 37 | To install a specific version, use the following command: 38 | 39 | ```sh 40 | $ docker pull "quay.io/opencast/:" 41 | ``` 42 | 43 | ## Build 44 | 45 | If you want to build the images yourself, there is a `Makefile` with the necessary `docker build` commands for all distributions. Running `make` in the root directory will create all images. To customize the build, you can override these variables: 46 | 47 | - `OPENCAST_REPO`
48 | The git repository to clone Opencast from. The default is the upstream repository, but you can use your own fork. 49 | - `OPENCAST_VERSION`
50 | The name of the Git branch, tag or commit hash to check out. Defaults to the content of the `VERSION_OPENCAST` file. 51 | - `FFMPEG_VERSION`
52 | The version of the Opencast FFmpeg build. Defaults to the content of the `VERSION_FFMPEG` file. 53 | - `WHISPER_CPP_VERSION`
54 | The version of whisper.cpp. Defaults to the content of the `VERSION_WHISPER_CPP` file. 55 | - `IMAGE_BASE`
56 | The base used for the images (either `default` or `nvidia-cuda`). Defaults to `default`. 57 | - `IMAGE_REGISTRY`
58 | The first part of the image name. It defaults to `quay.io/opencast` and will be extended by the name of the Opencast distribution. 59 | - `IMAGE_TAG`
60 | The tag of the image. Defaults to the content of the `VERSION` file. 61 | - `DOCKER_BUILD_ARGS`
62 | Custom arguments that should be passed to `docker build`, e.g. you can set this to `--no-cache` to force an image build. By default empty. 63 | - `GIT_COMMIT`
64 | Overwrites the Git commit hash that is set as image label. 65 | - `BUILD_DATE`
66 | Overwrites the build date that is set as image label. 67 | 68 | ### NVIDIA CUDA Support 69 | 70 | Currently, there are not pre-built images for NVIDIA CUDA, but you can easily build them yourself: 71 | 72 | ```sh 73 | $ make IMAGE_BASE=nvidia-cuda build-worker 74 | ``` 75 | 76 | Note that only whisper.cpp is compiled for NVIDIA CUDA; the included FFmpeg binary does not support NVIDIA CUDA at the moment. 77 | 78 | ## Quick Start 79 | 80 | A quick local test system can be started using [`docker compose`](https://docs.docker.com/compose/). After cloning this repository you can run this command from the root directory: 81 | 82 | ```sh 83 | $ docker compose -p opencast-allinone -f compose/compose.allinone.h2.yaml up 84 | ``` 85 | 86 | This will run Opencast using the `allinone` distribution configured to use the bundled [H2 Database Engine](http://www.h2database.com/html/main.html). 87 | 88 | In the `./compose` directory there are also compose files for more production-like setups. `compose.allinone.mariadb.yaml` and `compose.allinone.postgresql.yaml` uses the MariaDB and PostgreSQL databases, respectively, while `compose.multiserver.mariadb.yaml` and `compose.multiserver.postgresql.yaml` demonstrate how to connect the different distributions. Replace the compose file in the command above if you want to use them instead. You can find more information about the compose files [here](docker-compose/README.md). 89 | 90 | ## Images 91 | 92 | Opencast comes in different distributions. For each of the official distributions, there is a specific container image. Each version is tagged. For example, the full image name containing the `admin` distribution at version `18-dev` is `quay.io/opencast/admin:18-dev`. Leaving the version out will install the latest one. 93 | 94 | ### `allinone` 95 | 96 | This image contains all Opencast modules necessary to run a full Opencast installation. It's useful for small and local test setups. If you, however, want to run Opencast in a distributed fashion, you probably should use a combination of `admin`, `worker` and `presentation` containers. 97 | 98 | ### `admin`, `adminpresentation`, `ingest`, `presentation` and `worker`, 99 | 100 | These images contain the Opencast modules of the corresponding Opencast distributions. 101 | 102 | ### `build` 103 | 104 | This image helps you set up a development environment for Opencast: 105 | 106 | ```sh 107 | $ export OPENCAST_SRC= 108 | $ export OPENCAST_BUILD_USER_UID=$(id -u) 109 | $ export OPENCAST_BUILD_USER_GID=$(id -g) 110 | 111 | $ docker compose -p opencast-build -f compose/compose.build.yaml up -d 112 | $ docker compose -p opencast-build -f compose/compose.build.yaml exec --user opencast-builder opencast bash 113 | ``` 114 | 115 | After attaching you can press enter to force the shell to output a prompt. 116 | 117 | Starting with `2.2.2` there will be a `build` image for every release of Opencast. It will know how to build this specific version within the container. While you can use `git` to check out different versions of Opencast, we recommend that with it you then also change the version of the `build` container. 118 | 119 | ## Usage 120 | 121 | The images come with multiple commands. You can see a full list with description by running: 122 | 123 | ```sh 124 | $ docker run --rm quay.io/opencast/ app:help 125 | Usage: 126 | app:help Prints the usage information 127 | app:init Checks and configures Opencast but does not run it 128 | app:start Starts Opencast 129 | [cmd] [args...] Runs [cmd] with given arguments 130 | ``` 131 | 132 | ## Configuration 133 | 134 | It's recommended to configure Opencast by using [Docker Volumes](https://docs.docker.com/engine/containers/run/#filesystem-mounts): 135 | 136 | ```sh 137 | $ docker run -v "/path/to/opencast-etc:/etc/opencast" quay.io/opencast/ 138 | ``` 139 | 140 | Note that `/path/to/opencast-etc` only needs to contain configuration files you changed. During startup, those will be complement with the additional default configuration files. 141 | 142 | The most important settings can also be configured with [environment variables](https://docs.docker.com/engine/containers/run/#environment-variables). You can use this functionally to generate new configuration files. For this, start a new container with specific variables and execute the `app:init` command. This will ensure you haven't missed anything, write the configuration files and exit. Then you can copy the files to a target directory: 143 | 144 | ```sh 145 | $ docker run --name opencast_generate_config \ 146 | -e "ORG_OPENCASTPROJECT_SERVER_URL=http://localhost:8080" \ 147 | -e "ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER=admin" \ 148 | -e "ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS=opencast" \ 149 | -e "ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER=opencast_system_account" \ 150 | -e "ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS=CHANGE_ME" \ 151 | quay.io/opencast/ "app:init" 152 | $ docker cp opencast_generate_config:/opencast/etc opencast-config 153 | $ docker rm opencast_generate_config 154 | ``` 155 | 156 | Make sure to use the correct Opencast distribution as there are small differences. 157 | 158 | ### Opencast 159 | 160 | - `ORG_OPENCASTPROJECT_SERVER_URL` Optional
161 | The HTTP-URL where Opencast is accessible. The default is `http://:8080`. 162 | - `ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER` **Required**
163 | Username of the admin user. 164 | - `ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS` **Required**
165 | Password of the admin user. You may alternatively set `ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS_FILE` to the location of a file within the container that contains the password. 166 | - `ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER` **Required**
167 | Username for the communication between Opencast nodes and capture agents. 168 | - `ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS` **Required**
169 | Password for the communication between Opencast nodes and capture agents. You may alternatively set `ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS_FILE` to the location of a file within the container that contains the password. 170 | - `ORG_OPENCASTPROJECT_DOWNLOAD_URL` Optional
171 | The HTTP-URL to use for downloading media files, e.g. for the player. Defaults to `${org.opencastproject.server.url}/static`. 172 | - `ORG_OPENCASTPROJECT_ADMIN_EMAIL` Optional
173 | Email address of the server's admin. Defaults to `example@opencast.org`. 174 | 175 | For an installation with multiple nodes you can also set: 176 | 177 | - `PROP_ORG_OPENCASTPROJECT_FILE_REPO_URL` Optional
178 | HTTP-URL of the file repository. Defaults to `${org.opencastproject.server.url}` in the `allinone` distribution and `${org.opencastproject.admin.ui.url}` for every other one. 179 | - `PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL` **Required for all but `allinone`**
180 | HTTP-URL of the admin node. 181 | - `PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL` **Required for all but `allinone`**
182 | HTTP-URL of the engage node. 183 | 184 | ### Elasticsearch 185 | 186 | - `ELASTICSEARCH_SERVER_HOST` **Required for `allinone`, `develop` and `admin`**
187 | Hostname to Elasticsearch. 188 | - `ELASTICSEARCH_SERVER_SCHEME` Optional
189 | Protocol to use when accessing Elasticsearch. Either `http` or `https`. The default is `http`. 190 | - `ELASTICSEARCH_SERVER_PORT` Optional
191 | Port number of Elasticsearch. The default is `9200`. 192 | - `ELASTICSEARCH_USERNAME` Optional
193 | Username to use when accessing Elasticsearch. The default is none. 194 | - `ELASTICSEARCH_PASSWORD` Optional
195 | Password to use when accessing Elasticsearch. The default is none. 196 | - `NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_ELASTICSEARCH` Optional
197 | Specifies how often Opencast is going to try to establish a TCP connection to the specified Elasticsearch cluster before giving up. The waiting time between tries is 5 seconds. The default number of tries is 25. Setting this to 0 skips the check. 198 | 199 | ### Database 200 | 201 | - `ORG_OPENCASTPROJECT_DB_VENDOR` Optional
202 | The type of database to use. Currently, you can set this to either `H2`, `MariaDB`, or `PostgreSQL`. The default is `H2`. 203 | - `NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_DB` Optional
204 | Specifies how often Opencast is going to try to connect to the specified database before giving up. The waiting time between tries is 5 seconds. The default number of tries is 25. This configuration only applies if the database is not H2. Setting this to 0 skips the check. 205 | 206 | #### H2 207 | 208 | There are no additional environment variables you can set if you are using the H2 database. 209 | 210 | #### MariaDB and PostgreSQL 211 | 212 | - `ORG_OPENCASTPROJECT_DB_JDBC_URL` **Required**
213 | [JDBC](http://www.oracle.com/technetwork/java/javase/jdbc/index.html) connection string. 214 | - `ORG_OPENCASTPROJECT_DB_JDBC_USER` **Required**
215 | Database username. 216 | - `ORG_OPENCASTPROJECT_DB_JDBC_PASS` **Required**
217 | Password of the database user. You may alternatively set `ORG_OPENCASTPROJECT_DB_JDBC_PASS_FILE` to the location of a file within the container that contains the password. 218 | 219 | ### whisper.cpp 220 | 221 | - `WHISPER_CPP_DOWNLOAD_MODEL` Optional
222 | Download the specified whisper.cpp model. Note that models are downloaded in parallel to the startup of Opencast. Not waiting for model downloads greatly improves the Opencast startup time. However, transcription operations may fail if models are not available yet. The default is an empty string, i.e. no model is downloaded. 223 | 224 | ### Miscellaneous 225 | 226 | - `TIMEZONE` Optional
227 | Set the timezone within the container. Valid timezones are represented by files in `/usr/share/zoneinfo/`, for example, `Europe/Berlin`. The default is `UTC`. 228 | 229 | ## Data 230 | 231 | The data directory is located at `/data`. Use [Docker Volumes](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) to mount this directory on your host. 232 | 233 | ## Languages 234 | 235 | Opencast makes use of [Tesseract](https://github.com/tesseract-ocr/tesseract) to recognize text in videos (ORC). For this, [training data files](https://github.com/tesseract-ocr/tessdata) are needed. These images come with files for the English language. If you need other or more languages you can extend these images or use Docker Volumes to mount them in the appropriate directories `/usr/share/tessdata`. 236 | 237 | ## References 238 | 239 | - [Project site](https://github.com/opencast/opencast-docker) 240 | - [Opencast documentation](https://docs.opencast.org/develop/admin/) 241 | - [Images on Quay](https://quay.io/organization/opencast) 242 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 18-dev 2 | -------------------------------------------------------------------------------- /VERSION_FFMPEG: -------------------------------------------------------------------------------- 1 | 7.0.2 2 | -------------------------------------------------------------------------------- /VERSION_MAJOR: -------------------------------------------------------------------------------- 1 | dev 2 | -------------------------------------------------------------------------------- /VERSION_OPENCAST: -------------------------------------------------------------------------------- 1 | develop 2 | -------------------------------------------------------------------------------- /VERSION_WHISPER_CPP: -------------------------------------------------------------------------------- 1 | v1.7.5 2 | -------------------------------------------------------------------------------- /compose/README.md: -------------------------------------------------------------------------------- 1 | # Compose Files 2 | 3 | These compose files can be used to quickly try out the Opencast system in different configurations. They are not 4 | designed to be production instances, but rather quick and dirty dev/demo instances. 5 | 6 | ## Usage 7 | 8 | Within this directory you simply can run these commands to startup an Opencast system: 9 | 10 | ```sh 11 | $ docker compose -f .yaml up 12 | ``` 13 | 14 | There are multiple compose files you can choose from, showcasing the different ways one can use the container images: 15 | 16 | - [**`compose.allinone.h2.yaml`**](compose.allinone.h2.yaml)
17 | This setup starts a simple allinone Opencast distribution including OpenSearch and the internal H2 database. 18 | 19 | - [**`compose.allinone.h2+pyca.yaml`**](compose.allinone.h2+pyca.yaml)
20 | This setup starts a simple allinone Opencast distribution including OpenSearch, the internal H2 database, and pyCA 21 | as capture agent. 22 | 23 | - [**`compose.allinone.mariadb.yaml`**](compose.allinone.mariadb.yaml)
24 | This setup starts a simple allinone Opencast distribution including OpenSearch and MariaDB. 25 | 26 | - [**`compose.allinone.postgres.yaml`**](compose.allinone.postgres.yaml)
27 | This setup starts a simple allinone Opencast distribution including OpenSearch and PostgreSQL. 28 | 29 | - [**`compose.build.yaml`**](compose.build.yaml)
30 | This setup starts a simple allinone Opencast distribution including OpenSearch and the internal H2 database using 31 | the `build` container image. This is useful for development and testing. 32 | 33 | - [**`compose.multiserver.build.yaml`**](compose.multiserver.build.yaml)
34 | This setup starts a multiserver Opencast distribution with one admin, worker and presentation including OpenSearch 35 | and MariaDB using the `build` container image. This is useful for development and testing. 36 | 37 | - [**`compose.multiserver.mariadb.yaml`**](compose.multiserver.mariadb.yaml)
38 | This setup starts a multiserver Opencast distribution with one admin, worker and presentation including OpenSearch 39 | and MariaDB. 40 | 41 | - [**`compose.multiserver.postgres.yaml`**](compose.multiserver.postgres.yaml)
42 | This setup starts a multiserver Opencast distribution with one admin, worker and presentation including OpenSearch 43 | and PostgreSQL. 44 | -------------------------------------------------------------------------------- /compose/assets/pyca.conf: -------------------------------------------------------------------------------- 1 | ### 2 | # pyCA Configuration 3 | ## 4 | 5 | # Notice: Most properties do have sensible defaults. Things that should be 6 | # changed are those properties that are not commented out in this file. 7 | 8 | 9 | [agent] 10 | 11 | # Name of the capture agent 12 | # Type: string 13 | # Default: pyca@ 14 | name = 'pyca-container' 15 | 16 | # How often (in seconds) should the capture agent try to get an updated 17 | # schedule from the core. 18 | # Type: integer 19 | # Default: 60 20 | #update_frequency = 60 21 | 22 | # For how many days in advance shall the capture agent get the schedule. A 23 | # smaller value will be faster and less memory consuming. Setting this to 0 24 | # will make pyCA request all scheduled events. 25 | # Type: integer 26 | # Default: 14 27 | #cal_lookahead = 14 28 | 29 | # In backup mode, the pyCA will not register itself or ingest anything to the 30 | # core. It is useful if you want pyCA act as backup to another capture agent. 31 | # To get the events for another agent, also set the name of the agent to the 32 | # one that should be backed up. 33 | # Type: boolean 34 | # Default: False 35 | #backup_mode = False 36 | 37 | # Location of the database file to cache scheduled events in and keep a 38 | # history of recordings. This can be any database supported by SQLAlchemy. 39 | # Type: String 40 | # Default: sqlite:///pyca.db 41 | #database = sqlite:///pyca.db 42 | 43 | 44 | [capture] 45 | 46 | # Base directory to store recordings in. For each recording a subdirectory 47 | # will be created. 48 | # Type: string 49 | # Default: ./recordings 50 | directory = './recordings' 51 | 52 | # Command to use for capturing. This may also be a script file. The only 53 | # requirement is that the command terminates itself in time. 54 | # 55 | # Possible string substitutions you can use are: 56 | # {{time}} Time to capture in seconds 57 | # {{dir}} Directory to put recordings in 58 | # {{name}} Autogenerated name of the recording. 59 | # {{previewdir}} Directory to put preview images in 60 | # 61 | # Examples: 62 | # 63 | # Record pulseaudio source using FFmpeg: 64 | # ffmpeg -f pulse -i default -t %(time)s -c:a flac -ac 1 {{dir}}/{{name}}.flac 65 | # 66 | # Record video stream on a Reaspberry Pi using the camera module: 67 | # raspivid -n -t %(time)s000 -b 6000000 -fps 30 -o {{dir}}/{{name}}.h264 68 | # 69 | # Record audio using arecord (alsa recorder): 70 | # arecord -c 2 -d {{time}} -r 44100 -f S16_LE -D hw:0 {{dir}}/{{name}}.wav 71 | # 72 | # Run custom shell script: 73 | # /opt/rec.sh "{{dir}}" {{name}} {{time}} 74 | # 75 | # For more examples, have a look at the pyCA wiki. 76 | # 77 | # Type: string 78 | # Default: ffmpeg -nostats -re -f lavfi -r 25 -i testsrc -t {{time}} {{dir}}/{{name}}.webm' 79 | command = 'ffmpeg -nostats -re -f lavfi -r 25 -i testsrc -f lavfi -i sine -t {{time}} {{dir}}/{{name}}.webm' 80 | 81 | # Flavors of output files produced by the capture command. One flavors should 82 | # be specified for every output file. 83 | # Type: list of strings (write as '...', '...') 84 | # Default: 'presenter/source' 85 | #flavors = 'presenter/source' 86 | 87 | # Output files produces by the capture command. 88 | # Type: list of strings (write as '...', '...') 89 | # Default: '{{dir}}/{{name}}.webm' 90 | #files = '{{dir}}/{{name}}.webm' 91 | 92 | # Base directory for preview images generated by the capture command. They can 93 | # be as confidence monitoring in the web ui. 94 | # Type: String 95 | # Default: ./recordings 96 | #preview_dir = './recordings' 97 | 98 | # List of preview images to be included in the web ui. 99 | # Type: list of strings (write as '...', '...') 100 | # Default: 101 | #preview = 102 | 103 | # Custom signal value that is sent to the capture process to gracefully finish the 104 | # recording. Common signal values can be found in 'man 7 signal'. 105 | # Type: Integer 106 | # Default: 2 (SIGINT) 107 | #sigcustom = 2 108 | 109 | # Time in seconds after an events end when the custom signal is sent to the capture 110 | # process. Setting this to -1 will disable the signal. 111 | # Type: Integer 112 | # Default: -1 (disabled) 113 | #sigcustom_time = -1 114 | 115 | # Time in seconds after an events end when a SIGTERM is sent to the capture 116 | # process to shut it down in case it does not do that by itself. Setting this 117 | # to -1 will disable the signal. 118 | # Type: Integer 119 | # Default: -1 (disabled) 120 | #sigterm_time = -1 121 | 122 | # Time in seconds after an events end when a SIGKILL is sent to the capture 123 | # process to ensure it terminates and does not block further recordings. Note 124 | # that setting this lower than `sigterm_time` will set this to `sigterm_time`. 125 | # Setting this to -1 will disable the signal. 126 | # Type: Integer 127 | # Default: 120 128 | #sigkill_time = 120 129 | 130 | # An additional exit code to 0 indicating that the capture process has 131 | # been completed successfully. 132 | # Type: integer 133 | # Default: 0 134 | #exit_code = 0 135 | 136 | 137 | [ingest] 138 | 139 | # Delete recordings after they have been successfully uploaded. This does only 140 | # apply to the content of the recording directory, not the metadata. 141 | # Type: boolean 142 | # Default: False 143 | #delete_after_upload = False 144 | 145 | 146 | [server] 147 | 148 | # Base URL of the admin server. This corresponds to the 149 | # org.opencastproject.server.url setting of Opencast. 150 | # Type: string 151 | # Default: https://develop.opencast.org 152 | url = 'http://opencast:8080' 153 | 154 | # Analogue of -k, --insecure option in curl. Allows insercure SSL connections 155 | # while using HTTPS on the server. 156 | # Type: boolean 157 | # Default: False 158 | #insecure = False 159 | 160 | # Authentication Method 161 | # 162 | # Historically, capture agents use HTTP digest authentication. The downside of 163 | # this is, that all users need to be specified in the backend configuration 164 | # files. Instead, HTTP Basic authentication can be used with front-end users 165 | # (users created in the web interface). Whatever you use, make sure the user 166 | # has appropriate rights (e.g. ROLE_CAPTURE_AGENT) to communicate with the 167 | # capture agent API in Opencast. 168 | # 169 | # Type: options 170 | # Allowed values: basic, digest 171 | # Default: digest 172 | #auth_method = 'digest' 173 | 174 | # Username for the admin server 175 | # Type: string 176 | # Default: opencast_system_account 177 | username = 'opencast_system_account' 178 | 179 | # Password for the admin server 180 | # Type: string 181 | # Default: CHANGE_ME 182 | password = 'CHANGE_ME' 183 | 184 | # HTTPS certificates for verification. If signed by a certificate authority 185 | # through an intermediate certificate, make sure to import the whole 186 | # certificate chain. 187 | # Type: string 188 | # Default: '' 189 | #certificate = '' 190 | 191 | 192 | [ui] 193 | 194 | # Username for the pyCA web interface 195 | # Type: string 196 | # Default: admin 197 | #username = 'admin' 198 | 199 | # Password for the pyCA web interface 200 | # Type: string 201 | # Default: opencast 202 | #password = 'opencast' 203 | 204 | # How often (seconds) should the web interface refresh itself. 205 | # Type: integer 206 | # Default: 10 207 | #refresh_rate = 10 208 | 209 | # URL where the web interface is reachable. This will be sent to the Matterhorn 210 | # core and displayed in the admin interface. 211 | # Type: string 212 | # Default: http://localhost:5000 213 | #url = 'http://localhost:5000' 214 | 215 | # Command to execute for gathering logs which are then published via the 216 | # web API. The command is executed whenever the JSON API endpoint is 217 | # requested. 218 | # Defining no command will effectively disable the endpoint. 219 | # Type: string 220 | # Default: no command 221 | #log_command = 'journalctl --no-hostname -n 50 -u "pyca*"' 222 | 223 | 224 | [logging] 225 | 226 | # Log to the system logger. Note that this will use /dev/log which may not be 227 | # available on non Linux systems. 228 | # Type: boolean 229 | # Default: False 230 | #syslog = False 231 | 232 | # Log to stderr 233 | # Type: boolean 234 | # Default: True 235 | #stderr = True 236 | 237 | # Log to file. An empty string will deactivate this log handler. 238 | # Type: String 239 | # Default: '' 240 | #file = '' 241 | 242 | # Configure the log level 243 | # Possible values are: debug, info, warning and error 244 | # Default: info 245 | #level = info 246 | 247 | # Log format configuration 248 | # Default: [%(name)s:%(lineno)s:%(funcName)s()] [%(levelname)s] %(message)s 249 | #format = [%(name)s:%(lineno)s:%(funcName)s()] [%(levelname)s] %(message)s 250 | -------------------------------------------------------------------------------- /compose/compose.allinone.h2+pyca.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | volumes: 16 | opensearch: {} 17 | data: {} 18 | pyca: {} 19 | 20 | services: 21 | opensearch: 22 | image: opencast/opensearch:1 23 | build: 24 | dockerfile_inline: | 25 | FROM docker.io/opensearchproject/opensearch:1 26 | RUN bin/opensearch-plugin install analysis-icu 27 | environment: 28 | discovery.type: single-node 29 | bootstrap.memory_lock: 'true' 30 | OPENSEARCH_JAVA_OPTS: -Xms128m -Xmx512m 31 | DISABLE_INSTALL_DEMO_CONFIG: 'true' 32 | DISABLE_SECURITY_PLUGIN: 'true' 33 | volumes: 34 | - opensearch:/usr/share/opensearch/data 35 | 36 | opencast: 37 | image: quay.io/opencast/allinone:18-dev 38 | environment: 39 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast:8080 40 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static 41 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 42 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 43 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 44 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 45 | ELASTICSEARCH_SERVER_HOST: opensearch 46 | ports: 47 | - "8080:8080" 48 | volumes: 49 | - data:/data 50 | 51 | pyca-schedule: 52 | command: schedule 53 | image: quay.io/opencast/pyca 54 | restart: always 55 | volumes: 56 | - ./assets/pyca.conf:/etc/pyca/pyca.conf:ro 57 | - pyca:/var/lib/pyca 58 | 59 | pyca-ingest: 60 | command: ingest 61 | image: quay.io/opencast/pyca 62 | restart: always 63 | volumes: 64 | - ./assets/pyca.conf:/etc/pyca/pyca.conf:ro 65 | - pyca:/var/lib/pyca 66 | 67 | pyca-capture: 68 | command: capture 69 | image: quay.io/opencast/pyca 70 | restart: always 71 | volumes: 72 | - ./assets/pyca.conf:/etc/pyca/pyca.conf:ro 73 | - pyca:/var/lib/pyca 74 | 75 | pyca-agentstate: 76 | command: agentstate 77 | image: quay.io/opencast/pyca 78 | restart: always 79 | volumes: 80 | - ./assets/pyca.conf:/etc/pyca/pyca.conf:ro 81 | - pyca:/var/lib/pyca 82 | 83 | pyca-ui: 84 | entrypoint: ["gunicorn", "--config=/etc/pyca/gunicorn.conf.py", "pyca.ui:app"] 85 | image: quay.io/opencast/pyca 86 | restart: always 87 | volumes: 88 | - ./assets/pyca.conf:/etc/pyca/pyca.conf:ro 89 | - pyca:/var/lib/pyca 90 | ports: 91 | - "8000:8000" 92 | -------------------------------------------------------------------------------- /compose/compose.allinone.h2.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | volumes: 16 | opensearch: {} 17 | data: {} 18 | 19 | services: 20 | opensearch: 21 | image: opencast/opensearch:1 22 | build: 23 | dockerfile_inline: | 24 | FROM docker.io/opensearchproject/opensearch:1 25 | RUN bin/opensearch-plugin install analysis-icu 26 | environment: 27 | discovery.type: single-node 28 | bootstrap.memory_lock: 'true' 29 | OPENSEARCH_JAVA_OPTS: -Xms128m -Xmx512m 30 | DISABLE_INSTALL_DEMO_CONFIG: 'true' 31 | DISABLE_SECURITY_PLUGIN: 'true' 32 | volumes: 33 | - opensearch:/usr/share/opensearch/data 34 | 35 | opencast: 36 | image: quay.io/opencast/allinone:18-dev 37 | environment: 38 | ORG_OPENCASTPROJECT_SERVER_URL: http://localhost:8080 39 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static 40 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 41 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 42 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 43 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 44 | ELASTICSEARCH_SERVER_HOST: opensearch 45 | ports: 46 | - "8080:8080" 47 | volumes: 48 | - data:/data 49 | -------------------------------------------------------------------------------- /compose/compose.allinone.mariadb.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | volumes: 16 | db: {} 17 | opensearch: {} 18 | data: {} 19 | 20 | services: 21 | mariadb: 22 | image: docker.io/library/mariadb:10.5 23 | environment: 24 | MYSQL_ROOT_PASSWORD: root 25 | MYSQL_DATABASE: opencast 26 | MYSQL_USER: opencast 27 | MYSQL_PASSWORD: opencast 28 | command: "--wait_timeout=28800" 29 | volumes: 30 | - db:/var/lib/mysql 31 | 32 | opensearch: 33 | image: opencast/opensearch:1 34 | build: 35 | dockerfile_inline: | 36 | FROM docker.io/opensearchproject/opensearch:1 37 | RUN bin/opensearch-plugin install analysis-icu 38 | environment: 39 | discovery.type: single-node 40 | bootstrap.memory_lock: 'true' 41 | OPENSEARCH_JAVA_OPTS: -Xms128m -Xmx512m 42 | DISABLE_INSTALL_DEMO_CONFIG: 'true' 43 | DISABLE_SECURITY_PLUGIN: 'true' 44 | volumes: 45 | - opensearch:/usr/share/opensearch/data 46 | 47 | opencast: 48 | image: quay.io/opencast/allinone:18-dev 49 | environment: 50 | ORG_OPENCASTPROJECT_SERVER_URL: http://localhost:8080 51 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static 52 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 53 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 54 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 55 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 56 | ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB 57 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://mariadb/opencast?useMysqlMetadata=true 58 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 59 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 60 | ELASTICSEARCH_SERVER_HOST: opensearch 61 | ports: 62 | - "8080:8080" 63 | volumes: 64 | - data:/data 65 | -------------------------------------------------------------------------------- /compose/compose.allinone.postgres.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | volumes: 16 | db: {} 17 | opensearch: {} 18 | data: {} 19 | 20 | services: 21 | postgresql: 22 | image: docker.io/library/postgres:13-alpine 23 | environment: 24 | POSTGRES_DB: opencast 25 | POSTGRES_USER: opencast 26 | POSTGRES_PASSWORD: opencast 27 | volumes: 28 | - db:/var/lib/postgresql/data 29 | 30 | opensearch: 31 | image: opencast/opensearch:1 32 | build: 33 | dockerfile_inline: | 34 | FROM docker.io/opensearchproject/opensearch:1 35 | RUN bin/opensearch-plugin install analysis-icu 36 | environment: 37 | discovery.type: single-node 38 | bootstrap.memory_lock: 'true' 39 | OPENSEARCH_JAVA_OPTS: -Xms128m -Xmx512m 40 | DISABLE_INSTALL_DEMO_CONFIG: 'true' 41 | DISABLE_SECURITY_PLUGIN: 'true' 42 | volumes: 43 | - opensearch:/usr/share/opensearch/data 44 | 45 | opencast: 46 | image: quay.io/opencast/allinone:18-dev 47 | environment: 48 | ORG_OPENCASTPROJECT_SERVER_URL: http://localhost:8080 49 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static 50 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 51 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 52 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 53 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 54 | ORG_OPENCASTPROJECT_DB_VENDOR: PostgreSQL 55 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:postgresql://postgresql/opencast 56 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 57 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 58 | ELASTICSEARCH_SERVER_HOST: opensearch 59 | ports: 60 | - "8080:8080" 61 | volumes: 62 | - data:/data 63 | -------------------------------------------------------------------------------- /compose/compose.build.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | volumes: 16 | opensearch: {} 17 | data: {} 18 | 19 | services: 20 | opensearch: 21 | image: opencast/opensearch:1 22 | build: 23 | dockerfile_inline: | 24 | FROM docker.io/opensearchproject/opensearch:1 25 | RUN bin/opensearch-plugin install analysis-icu 26 | environment: 27 | discovery.type: single-node 28 | bootstrap.memory_lock: 'true' 29 | OPENSEARCH_JAVA_OPTS: -Xms128m -Xmx512m 30 | DISABLE_INSTALL_DEMO_CONFIG: 'true' 31 | DISABLE_SECURITY_PLUGIN: 'true' 32 | volumes: 33 | - opensearch:/usr/share/opensearch/data 34 | 35 | opencast: 36 | image: quay.io/opencast/build:18-dev 37 | tty: true 38 | stdin_open: true 39 | environment: 40 | OPENCAST_BUILD_USER_UID: ${OPENCAST_BUILD_USER_UID:-1000} 41 | OPENCAST_BUILD_USER_GID: ${OPENCAST_BUILD_USER_GID:-1000} 42 | ORG_OPENCASTPROJECT_SERVER_URL: http://localhost:8080 43 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8080/static 44 | ELASTICSEARCH_SERVER_HOST: opensearch 45 | ports: 46 | - "8080:8080" 47 | - "5005:5005" 48 | volumes: 49 | - data:/data 50 | - "${M2_REPO:-~/.m2}:/home/opencast-builder/.m2" 51 | - "${OPENCAST_SRC}:/usr/src/opencast" 52 | -------------------------------------------------------------------------------- /compose/compose.multiserver.build.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | volumes: 16 | db: {} 17 | opensearch: {} 18 | data: {} 19 | 20 | services: 21 | mariadb: 22 | image: docker.io/library/mariadb:10.5 23 | environment: 24 | MYSQL_ROOT_PASSWORD: root 25 | MYSQL_DATABASE: opencast 26 | MYSQL_USER: opencast 27 | MYSQL_PASSWORD: opencast 28 | command: "--wait_timeout=28800" 29 | volumes: 30 | - db:/var/lib/mysql 31 | 32 | opensearch: 33 | image: opencast/opensearch:1 34 | build: 35 | dockerfile_inline: | 36 | FROM docker.io/opensearchproject/opensearch:1 37 | RUN bin/opensearch-plugin install analysis-icu 38 | environment: 39 | discovery.type: single-node 40 | bootstrap.memory_lock: 'true' 41 | OPENSEARCH_JAVA_OPTS: -Xms128m -Xmx512m 42 | DISABLE_INSTALL_DEMO_CONFIG: 'true' 43 | DISABLE_SECURITY_PLUGIN: 'true' 44 | volumes: 45 | - opensearch:/usr/share/opensearch/data 46 | 47 | opencast-admin: 48 | image: quay.io/opencast/build:18-dev 49 | tty: true 50 | stdin_open: true 51 | environment: 52 | OPENCAST_BUILD_USER_UID: ${OPENCAST_BUILD_USER_UID:-1000} 53 | OPENCAST_BUILD_USER_GID: ${OPENCAST_BUILD_USER_GID:-1000} 54 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-admin:8080 55 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 56 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 57 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 58 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 59 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 60 | ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB 61 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://mariadb/opencast?useMysqlMetadata=true 62 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 63 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 64 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 65 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 66 | ELASTICSEARCH_SERVER_HOST: opensearch 67 | ports: 68 | - "8080:8080" 69 | - "5005:5005" 70 | volumes: 71 | - data:/data 72 | - "${M2_REPO:-~/.m2}:/home/opencast-builder/.m2" 73 | - "${OPENCAST_SRC}:/usr/src/opencast" 74 | 75 | opencast-presentation: 76 | image: quay.io/opencast/build:18-dev 77 | tty: true 78 | stdin_open: true 79 | environment: 80 | OPENCAST_BUILD_USER_UID: ${OPENCAST_BUILD_USER_UID:-1000} 81 | OPENCAST_BUILD_USER_GID: ${OPENCAST_BUILD_USER_GID:-1000} 82 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-presentation:8080 83 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 84 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 85 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 86 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 87 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 88 | ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB 89 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://mariadb/opencast?useMysqlMetadata=true 90 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 91 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 92 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 93 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 94 | ports: 95 | - "8081:8080" 96 | - "5006:5005" 97 | volumes: 98 | - data:/data 99 | - "${M2_REPO:-~/.m2}:/home/opencast-builder/.m2" 100 | - "${OPENCAST_SRC}:/usr/src/opencast" 101 | 102 | opencast-worker: 103 | image: quay.io/opencast/build:18-dev 104 | tty: true 105 | stdin_open: true 106 | environment: 107 | OPENCAST_BUILD_USER_UID: ${OPENCAST_BUILD_USER_UID:-1000} 108 | OPENCAST_BUILD_USER_GID: ${OPENCAST_BUILD_USER_GID:-1000} 109 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-worker:8080 110 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 111 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 112 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 113 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 114 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 115 | ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB 116 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://mariadb/opencast?useMysqlMetadata=true 117 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 118 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 119 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 120 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 121 | ports: 122 | - "8082:8080" 123 | - "5007:5005" 124 | volumes: 125 | - data:/data 126 | - "${M2_REPO:-~/.m2}:/home/opencast-builder/.m2" 127 | - "${OPENCAST_SRC}:/usr/src/opencast" 128 | -------------------------------------------------------------------------------- /compose/compose.multiserver.mariadb.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | volumes: 16 | db: {} 17 | opensearch: {} 18 | data: {} 19 | 20 | services: 21 | mariadb: 22 | image: docker.io/library/mariadb:10.5 23 | environment: 24 | MYSQL_ROOT_PASSWORD: root 25 | MYSQL_DATABASE: opencast 26 | MYSQL_USER: opencast 27 | MYSQL_PASSWORD: opencast 28 | command: "--wait_timeout=28800" 29 | volumes: 30 | - db:/var/lib/mysql 31 | 32 | opensearch: 33 | image: opencast/opensearch:1 34 | build: 35 | dockerfile_inline: | 36 | FROM docker.io/opensearchproject/opensearch:1 37 | RUN bin/opensearch-plugin install analysis-icu 38 | environment: 39 | discovery.type: single-node 40 | bootstrap.memory_lock: 'true' 41 | OPENSEARCH_JAVA_OPTS: -Xms128m -Xmx512m 42 | DISABLE_INSTALL_DEMO_CONFIG: 'true' 43 | DISABLE_SECURITY_PLUGIN: 'true' 44 | volumes: 45 | - opensearch:/usr/share/opensearch/data 46 | 47 | opencast-admin: 48 | image: quay.io/opencast/admin:18-dev 49 | environment: 50 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-admin:8080 51 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 52 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 53 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 54 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 55 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 56 | ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB 57 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://mariadb/opencast?useMysqlMetadata=true 58 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 59 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 60 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 61 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 62 | ELASTICSEARCH_SERVER_HOST: opensearch 63 | ports: 64 | - "8080:8080" 65 | volumes: 66 | - data:/data 67 | 68 | opencast-presentation: 69 | image: quay.io/opencast/presentation:18-dev 70 | environment: 71 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-presentation:8080 72 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 73 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 74 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 75 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 76 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 77 | ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB 78 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://mariadb/opencast?useMysqlMetadata=true 79 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 80 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 81 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 82 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 83 | ports: 84 | - "8081:8080" 85 | volumes: 86 | - data:/data 87 | 88 | opencast-worker: 89 | image: quay.io/opencast/worker:18-dev 90 | environment: 91 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-worker:8080 92 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 93 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 94 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 95 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 96 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 97 | ORG_OPENCASTPROJECT_DB_VENDOR: MariaDB 98 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:mariadb://mariadb/opencast?useMysqlMetadata=true 99 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 100 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 101 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 102 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 103 | volumes: 104 | - data:/data 105 | -------------------------------------------------------------------------------- /compose/compose.multiserver.postgres.yaml: -------------------------------------------------------------------------------- 1 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | # 3 | # Licensed under the Educational Community License, Version 2.0 4 | # (the "License"); you may not use this file except in compliance with 5 | # the License. You may obtain a copy of the License at 6 | # 7 | # http://opensource.org/licenses/ECL-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | volumes: 16 | db: {} 17 | opensearch: {} 18 | data: {} 19 | 20 | services: 21 | postgresql: 22 | image: docker.io/library/postgres:13-alpine 23 | environment: 24 | POSTGRES_DB: opencast 25 | POSTGRES_USER: opencast 26 | POSTGRES_PASSWORD: opencast 27 | volumes: 28 | - db:/var/lib/postgresql/data 29 | 30 | opensearch: 31 | image: opencast/opensearch:1 32 | build: 33 | dockerfile_inline: | 34 | FROM docker.io/opensearchproject/opensearch:1 35 | RUN bin/opensearch-plugin install analysis-icu 36 | environment: 37 | discovery.type: single-node 38 | bootstrap.memory_lock: 'true' 39 | OPENSEARCH_JAVA_OPTS: -Xms128m -Xmx512m 40 | DISABLE_INSTALL_DEMO_CONFIG: 'true' 41 | DISABLE_SECURITY_PLUGIN: 'true' 42 | volumes: 43 | - opensearch:/usr/share/opensearch/data 44 | 45 | opencast-admin: 46 | image: quay.io/opencast/admin:18-dev 47 | environment: 48 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-admin:8080 49 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 50 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 51 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 52 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 53 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 54 | ORG_OPENCASTPROJECT_DB_VENDOR: PostgreSQL 55 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:postgresql://postgresql/opencast 56 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 57 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 58 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 59 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 60 | ELASTICSEARCH_SERVER_HOST: opensearch 61 | ports: 62 | - "8080:8080" 63 | volumes: 64 | - data:/data 65 | 66 | opencast-presentation: 67 | image: quay.io/opencast/presentation:18-dev 68 | environment: 69 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-presentation:8080 70 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 71 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 72 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 73 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 74 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 75 | ORG_OPENCASTPROJECT_DB_VENDOR: PostgreSQL 76 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:postgresql://postgresql/opencast 77 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 78 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 79 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 80 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 81 | ports: 82 | - "8081:8080" 83 | volumes: 84 | - data:/data 85 | 86 | opencast-worker: 87 | image: quay.io/opencast/worker:18-dev 88 | environment: 89 | ORG_OPENCASTPROJECT_SERVER_URL: http://opencast-worker:8080 90 | ORG_OPENCASTPROJECT_DOWNLOAD_URL: http://localhost:8081/static 91 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER: admin 92 | ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS: opencast 93 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER: opencast_system_account 94 | ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS: CHANGE_ME 95 | ORG_OPENCASTPROJECT_DB_VENDOR: PostgreSQL 96 | ORG_OPENCASTPROJECT_DB_JDBC_URL: jdbc:postgresql://postgresql/opencast 97 | ORG_OPENCASTPROJECT_DB_JDBC_USER: opencast 98 | ORG_OPENCASTPROJECT_DB_JDBC_PASS: opencast 99 | PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL: http://localhost:8080 100 | PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL: http://localhost:8081 101 | volumes: 102 | - data:/data 103 | -------------------------------------------------------------------------------- /rootfs-build/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | # Options 20 | OPENCAST_BUILD_USER_UID="${OPENCAST_BUILD_USER_UID:-1000}" 21 | OPENCAST_BUILD_USER_GID="${OPENCAST_BUILD_USER_GID:-1000}" 22 | 23 | SET_PERM=false 24 | 25 | # Create group 26 | if ! getent group "${OPENCAST_BUILD_USER_GID}" >/dev/null 2>&1; then 27 | groupadd -g "${OPENCAST_BUILD_USER_GID}" opencast-builder 28 | SET_PERM=true 29 | fi 30 | 31 | # Create user 32 | if ! getent passwd opencast-builder >/dev/null 2>&1; then 33 | useradd \ 34 | --no-user-group \ 35 | --gid "${OPENCAST_BUILD_USER_GID}" \ 36 | --uid "${OPENCAST_BUILD_USER_UID}" \ 37 | opencast-builder 38 | mkdir -p /home/opencast-builder 39 | SET_PERM=true 40 | fi 41 | 42 | # Make sure the user can read the Opencast source and home directory files 43 | if test "${SET_PERM}" = "true"; then 44 | chown -R "${OPENCAST_BUILD_USER_UID}:${OPENCAST_BUILD_USER_GID}" "${OPENCAST_SRC}" /home/opencast-builder 45 | fi 46 | 47 | gosu "${OPENCAST_BUILD_USER_UID}:${OPENCAST_BUILD_USER_GID}" "$@" 48 | -------------------------------------------------------------------------------- /rootfs-build/docker/opencast/etc/org.ops4j.pax.logging.cfg-develop: -------------------------------------------------------------------------------- 1 | # Colors for log level rendering 2 | color.fatal = bright red 3 | color.error = bright red 4 | color.warn = bright yellow 5 | color.info = bright green 6 | color.debug = cyan 7 | color.trace = cyan 8 | 9 | # Common pattern layout for appenders 10 | # see: https://logging.apache.org/log4j/2.x/manual/layouts.html#Patterns 11 | log4j2.pattern = %d{ISO8601} | %-5.5p | (%C{1}:%L) - %m%n 12 | 13 | # Root logger 14 | log4j2.rootLogger.level = WARN 15 | log4j2.rootLogger.appenderRef.File.ref = File 16 | log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi 17 | log4j2.rootLogger.appenderRef.Console.ref = Console 18 | log4j2.rootLogger.appenderRef.Console.filter.threshold.type = ThresholdFilter 19 | log4j2.rootLogger.appenderRef.Console.filter.threshold.level = ${karaf.log.console:-OFF} 20 | 21 | # Loggers configuration 22 | 23 | # Loglevel configuration for all opencast modules. Usually, INFO is a quite sane log level. If you need a different 24 | # detail level of logs, you can adjust this to: ERROR, WARN, INFO, DEBUG, TRACE. 25 | log4j2.logger.opencast.name = org.opencastproject 26 | log4j2.logger.opencast.level = DEBUG 27 | 28 | # You can specify different log levels for different packages/modules by specifying their package component names. For 29 | # example, to raise the log level to DEBUG for the rest endpoints contained in the kernel module, set: 30 | #log4j2.logger.ingest.name = org.opencastproject.ingest 31 | #log4j2.logger.ingest.level = DEBUG 32 | 33 | # For Karaf, Felix & CXF, we want to see some more details in the logs 34 | log4j2.logger.karaf.name = org.apache.karaf 35 | log4j2.logger.karaf.level = WARN 36 | log4j2.logger.felix.name = org.apache.felix 37 | log4j2.logger.felix.level = WARN 38 | log4j2.logger.cxf.name = org.apache.cxf 39 | log4j2.logger.cxf.level = WARN 40 | 41 | # Appenders configuration 42 | 43 | # Console appender not used by default (see log4j2.rootLogger.appenderRefs) 44 | log4j2.appender.console.type = Console 45 | log4j2.appender.console.name = Console 46 | log4j2.appender.console.layout.type = PatternLayout 47 | log4j2.appender.console.layout.pattern = ${log4j2.out.pattern} 48 | 49 | # Rolling file appender 50 | log4j2.appender.out.type = File 51 | log4j2.appender.out.name = File 52 | log4j2.appender.out.fileName = ${karaf.data}/log/opencast.log 53 | log4j2.appender.out.append = true 54 | log4j2.appender.out.layout.type = PatternLayout 55 | log4j2.appender.out.layout.pattern = ${log4j2.pattern} 56 | 57 | # OSGi appender 58 | log4j2.appender.osgi.type = PaxOsgi 59 | log4j2.appender.osgi.name = PaxOsgi 60 | log4j2.appender.osgi.filter = * 61 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/is_git_repo: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | test -d "$1/.git" 18 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/is_oc_dist: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | for dist in \ 18 | "allinone" \ 19 | "admin" \ 20 | "adminpresentation" \ 21 | "develop" \ 22 | "ingest" \ 23 | "presentation" \ 24 | "worker" \ 25 | ; do 26 | test "$1" = "$dist" && exit 0 27 | done 28 | 29 | exit 1 30 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/is_oc_installed: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | test -n "$(ls -A "${OPENCAST_HOME}")" 18 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/log: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | echo "==> [$1] $2" 20 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/log_err: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | log "$1" "$2" 1>&2 20 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/oc_build: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | log "oc_build" "Start building Opencast" 20 | 21 | opts="-Pdev" 22 | if test "$1" = "all"; then 23 | log "oc_build" "Activating 'all' build mode" 24 | opts="" 25 | fi 26 | 27 | cd "${OPENCAST_SRC}" 28 | # shellcheck disable=SC2086 29 | ./mvnw install $opts 30 | 31 | log "oc_build" "End building Opencast" 32 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/oc_clean_data: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | log "oc_clean_data" "Start cleaning data" 20 | 21 | sudo find "${OPENCAST_DATA:?}" -mindepth 1 -delete 22 | 23 | log "oc_clean_data" "End cleaning data" 24 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/oc_clone: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | if is_git_repo "${OPENCAST_SRC}"; then 20 | log_err "oc_clone" "You are already in a Git repository. Cannot clone here." 21 | exit 1 22 | fi 23 | 24 | cd "${OPENCAST_SRC}" 25 | git clone --recursive "${OPENCAST_REPO}" . 26 | git checkout "${OPENCAST_VERSION}" 27 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/oc_install: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | dist="$1" 20 | if test -z "$dist"; then 21 | log "oc_install" "No distribution given as first argument. Using 'develop'." 22 | dist=develop 23 | fi 24 | 25 | if ! is_oc_dist "$dist"; then 26 | log_err "oc_install" "$dist is not an Opencast distribution." 27 | exit 1 28 | fi 29 | 30 | if is_oc_installed "$dist"; then 31 | log_err "oc_install" "There is already an installation. Uninstall first." 32 | exit 1 33 | fi 34 | 35 | log "oc_install" "Start installation" 36 | cd "${OPENCAST_SRC}" 37 | 38 | if test "$dist" = "develop"; then 39 | log "oc_install" "Copy develop" 40 | sudo cp -R build/opencast-dist-develop-*/. "${OPENCAST_HOME}" 41 | else 42 | log "oc_install" "Extract archive" 43 | sudo tar -xzf build/opencast-dist-"$dist"-*.tar.gz --strip 1 -C "${OPENCAST_HOME}" 44 | fi 45 | 46 | log "oc_install" "Create folders" 47 | sudo mkdir -p "${OPENCAST_CONFIG}" "${OPENCAST_SCRIPTS}" 48 | 49 | log "oc_install" "Copy Docker scripts" 50 | sudo cp -R "${OPENCAST_BUILD_ASSETS}${OPENCAST_SCRIPTS}"/* "${OPENCAST_SCRIPTS}/" 51 | sudo env "PATH=$PATH" javac "${OPENCAST_SCRIPTS}/TryToConnectToDb.java" 52 | 53 | log "oc_install" "Copy configuration" 54 | sudo cp -R "${OPENCAST_BUILD_ASSETS}${OPENCAST_CONFIG}"/* "${OPENCAST_CONFIG}/" 55 | case "$dist" in 56 | develop) 57 | sudo mv -f "${OPENCAST_CONFIG}/org.ops4j.pax.logging.cfg-develop" "${OPENCAST_CONFIG}/org.ops4j.pax.logging.cfg" 58 | ;& 59 | allinone) 60 | sudo rm -f "${OPENCAST_CONFIG}/org.opencastproject.organization-mh_default_org.cfg-clustered" 61 | ;; 62 | *) 63 | sudo mv -f "${OPENCAST_CONFIG}/org.opencastproject.organization-mh_default_org.cfg-clustered" "${OPENCAST_CONFIG}/org.opencastproject.organization-mh_default_org.cfg" 64 | ;; 65 | esac 66 | sudo rm -f "${OPENCAST_CONFIG}/org.ops4j.pax.logging.cfg-develop" 67 | sudo mkdir -p "${OPENCAST_STAGE_BASE_HOME}" 68 | sudo rsync -vrlog --chown=0:0 "${OPENCAST_CONFIG}" "${OPENCAST_STAGE_BASE_HOME}" 69 | 70 | log "oc_install" "Write environment file" 71 | echo "export OPENCAST_DISTRIBUTION=$dist" | sudo tee "${OPENCAST_SCRIPTS}/env" > /dev/null 72 | 73 | log "oc_install" "Set permissions" 74 | sudo chown "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_HOME}" "${OPENCAST_CONFIG}" 75 | sudo chown -R "${OPENCAST_USER}:${OPENCAST_GROUP}" "${OPENCAST_HOME}/data" 76 | 77 | log "oc_install" "End installation" 78 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/oc_run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | log "oc_run" "Start run" 20 | 21 | sudo -E "PATH=$PATH" sh -c '. "${OPENCAST_SCRIPTS}/env" && cd "${OPENCAST_HOME}" && "${OPENCAST_BUILD_ASSETS}/docker-entrypoint.sh" app:start' 22 | 23 | log "oc_run" "End run" 24 | -------------------------------------------------------------------------------- /rootfs-build/usr/local/bin/oc_uninstall: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | log "oc_uninstall" "Start uninstallation" 20 | 21 | sudo find "${OPENCAST_HOME:?}" -mindepth 1 -delete 22 | 23 | log "oc_uninstall" "End uninstallation" 24 | -------------------------------------------------------------------------------- /rootfs/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | # shellcheck source=./opencast/docker/scripts/helper.sh 20 | . "${OPENCAST_SCRIPTS}/helper.sh" 21 | # shellcheck source=./opencast/docker/scripts/tz.sh 22 | . "${OPENCAST_SCRIPTS}/tz.sh" 23 | # shellcheck source=./opencast/docker/scripts/opencast.sh 24 | . "${OPENCAST_SCRIPTS}/opencast.sh" 25 | # shellcheck source=./opencast/docker/scripts/elasticsearch.sh 26 | . "${OPENCAST_SCRIPTS}/elasticsearch.sh" 27 | # shellcheck source=./opencast/docker/scripts/db.sh 28 | . "${OPENCAST_SCRIPTS}/db.sh" 29 | # shellcheck source=./opencast/docker/scripts/h2.sh 30 | . "${OPENCAST_SCRIPTS}/h2.sh" 31 | # shellcheck source=./opencast/docker/scripts/jdbc.sh 32 | . "${OPENCAST_SCRIPTS}/jdbc.sh" 33 | # shellcheck source=./opencast/docker/scripts/mariadb.sh 34 | . "${OPENCAST_SCRIPTS}/mariadb.sh" 35 | # shellcheck source=./opencast/docker/scripts/postgresql.sh 36 | . "${OPENCAST_SCRIPTS}/postgresql.sh" 37 | # shellcheck source=./opencast/docker/scripts/whisper.sh 38 | . "${OPENCAST_SCRIPTS}/whisper.sh" 39 | 40 | 41 | opencast_main_check() { 42 | echo "Run opencast_main_check" 43 | 44 | opencast_opencast_check 45 | if opencast_helper_dist_allinone \ 46 | || opencast_helper_dist_develop \ 47 | || opencast_helper_dist_admin \ 48 | || opencast_helper_dist_adminpresentation \ 49 | || opencast_helper_dist_presentation; then 50 | opencast_elasticsearch_check 51 | fi 52 | opencast_db_check 53 | } 54 | 55 | opencast_main_configure() { 56 | echo "Run opencast_main_configure" 57 | 58 | opencast_opencast_configure 59 | opencast_elasticsearch_configure 60 | opencast_db_configure 61 | } 62 | 63 | opencast_file_env() { 64 | file_env ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS 65 | file_env ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS 66 | file_env ORG_OPENCASTPROJECT_DB_JDBC_PASS 67 | } 68 | 69 | opencast_main_update_ca() { 70 | echo "Run opencast_main_update_ca" 71 | 72 | update-ca-certificates 73 | trust extract --overwrite --format=java-cacerts --filter=ca-anchors --purpose=server-auth "$JAVA_HOME/lib/security/cacerts" 74 | } 75 | 76 | opencast_main_init() { 77 | echo "Run opencast_main_init" 78 | 79 | opencast_file_env 80 | opencast_tz_set 81 | opencast_main_update_ca 82 | opencast_whisper_init 83 | 84 | if opencast_helper_customconfig; then 85 | echo "Found custom config in ${OPENCAST_CUSTOM_CONFIG}" 86 | opencast_main_sync_config 87 | else 88 | echo "No custom config found" 89 | opencast_main_check 90 | opencast_main_configure 91 | fi 92 | } 93 | 94 | opencast_main_sync_config() { 95 | echo "Run opencast_main_sync_config" 96 | 97 | # Create new staged output directory 98 | rm -rf "${OPENCAST_STAGE_OUT_HOME}" 99 | mkdir -p "${OPENCAST_STAGE_OUT_HOME}" 100 | 101 | # Order is important: 102 | # 1. stage base (config) 103 | # 2. stage custom config 104 | # 3. configure staged config 105 | # 4. deploy staged config 106 | opencast_helper_stage_base 107 | opencast_helper_stage_customconfig 108 | OPENCAST_HOME="${OPENCAST_STAGE_OUT_HOME}" opencast_main_configure 109 | opencast_helper_deploy_staged_config 110 | } 111 | 112 | opencast_main_watch_customconfig_job() { 113 | while true; do 114 | if opencast_helper_customconfig; then 115 | opencast_helper_customconfig_wait_for_change 116 | opencast_main_sync_config 117 | else 118 | sleep 60 119 | fi 120 | done 121 | } 122 | 123 | opencast_main_start() { 124 | echo "Run opencast_main_start" 125 | 126 | # In some corner cases, when the container is restarted, the pid file of the 127 | # previous Opencast process is still present preventing a normal start. This 128 | # function will only be called once per container start when no other 129 | # processes are running. We therefore can just clean up the old pid file. 130 | rm -rf /opencast/data/pid /opencast/instances/instance.properties 131 | 132 | opencast_main_watch_customconfig_job & 133 | export OC_WATCH_CUSTOM_CONFIG_PID=$! 134 | 135 | if opencast_helper_dist_develop; then 136 | exec gosu "${OPENCAST_USER}":"${OPENCAST_GROUP}" bin/start-opencast debug 137 | fi 138 | 139 | gosu "${OPENCAST_USER}":"${OPENCAST_GROUP}" bin/start-opencast daemon & 140 | OC_PID=$! 141 | trap opencast_main_stop TERM INT 142 | 143 | status=0 144 | 145 | set +e 146 | while kill -0 "$OC_PID" >/dev/null 2>&1; do 147 | wait "$OC_PID" 148 | status=$? 149 | done 150 | set -e 151 | 152 | return $status 153 | } 154 | 155 | opencast_main_stop() { 156 | echo "Run opencast_main_stop" 157 | 158 | bin/stop-opencast & 159 | kill "$OC_WATCH_CUSTOM_CONFIG_PID" 160 | } 161 | 162 | case ${1} in 163 | app:init) 164 | opencast_main_init 165 | ;; 166 | app:start) 167 | opencast_main_init 168 | opencast_db_trytoconnect 169 | if opencast_helper_dist_allinone \ 170 | || opencast_helper_dist_develop \ 171 | || opencast_helper_dist_admin \ 172 | || opencast_helper_dist_adminpresentation \ 173 | || opencast_helper_dist_presentation; then 174 | opencast_elasticsearch_trytoconnect 175 | fi 176 | opencast_main_start 177 | ;; 178 | app:help) 179 | echo "Usage:" 180 | echo " app:help Prints the usage information" 181 | echo " app:init Checks and configures Opencast but does not run it" 182 | echo " app:start Starts Opencast" 183 | echo " [cmd] [args...] Runs [cmd] with given arguments" 184 | ;; 185 | *) 186 | exec "$@" 187 | ;; 188 | esac 189 | -------------------------------------------------------------------------------- /rootfs/docker-healthcheck.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -o pipefail 18 | 19 | OPENCAST_API="http://127.0.0.1:8080" 20 | 21 | STATUS=$(curl -sf --max-time 5 "${OPENCAST_API}/info/health" | jq -r '.status') 22 | 23 | [ $? ] || exit 1 24 | [ "${STATUS}" != "fail" ] || exit 1 25 | 26 | exit 0 27 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/TryToConnectToDb.java: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The University of Münster eLectures Team All rights reserved. 2 | // 3 | // Licensed under the Educational Community License, Version 2.0 4 | // (the "License"); you may not use this file except in compliance with 5 | // the License. You may obtain a copy of the License at 6 | // 7 | // http://opensource.org/licenses/ECL-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | import java.sql.Connection; 16 | import java.sql.DriverManager; 17 | import java.sql.SQLException; 18 | 19 | /** 20 | * Console application that tries multiple times to connect to a JDBC URL. 21 | */ 22 | public class TryToConnectToDb { 23 | private static final int SLEEP_TIME = 5 * 1000; 24 | 25 | public static void main(String[] args) throws InterruptedException { 26 | if (args.length != 5) { 27 | System.err.println("Wrong number of arguments provided"); 28 | printUsage(); 29 | System.exit(1); 30 | } 31 | 32 | final String 33 | driver = args[0], 34 | url = args[1], 35 | user = args[2], 36 | password = args[3]; 37 | final int numberOfTries = Integer.parseInt(args[4]); 38 | 39 | if (numberOfTries == 0) { 40 | System.out.println("Skip DB connection check"); 41 | System.exit(0); 42 | } 43 | 44 | // 1. Check if driver is available 45 | try { 46 | Class.forName(driver); 47 | } catch (ClassNotFoundException e) { 48 | System.err.println("Driver could not be found"); 49 | System.exit(1); 50 | } 51 | 52 | // 2. Try to connect to DB 53 | Connection conn = null; 54 | boolean failed = true; 55 | for (int i = 1; failed && i <= numberOfTries; i++) { 56 | failed = false; 57 | try { 58 | System.out.print("Try to connect to DB (" + i + "/" + numberOfTries + ") "); 59 | conn = DriverManager.getConnection(url, user, password); 60 | } catch (SQLException e) { 61 | failed = true; 62 | System.out.println("FAILED"); 63 | } finally { 64 | if (conn != null) { 65 | try { 66 | conn.close(); 67 | } catch (Exception e) { 68 | // ignore 69 | } 70 | } 71 | } 72 | 73 | if (failed && i < numberOfTries) { 74 | Thread.sleep(SLEEP_TIME); 75 | } else if (!failed) { 76 | System.out.println("SUCCEEDED"); 77 | } 78 | } 79 | 80 | if (failed) { 81 | System.err.println("Could not connect to DB"); 82 | System.exit(1); 83 | } 84 | } 85 | 86 | private static void printUsage() { 87 | System.out.println("Usage: java TryToConnectToDb DRIVER URL USER PASSWORD NUMBER_OF_TRIES"); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/db.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | export ORG_OPENCASTPROJECT_DB_VENDOR="${ORG_OPENCASTPROJECT_DB_VENDOR:-H2}" 20 | export NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_DB="${NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_DB:-25}" 21 | 22 | opencast_db_check() { 23 | echo "Run opencast_db_check" 24 | 25 | case "$ORG_OPENCASTPROJECT_DB_VENDOR" in 26 | H2) 27 | opencast_h2_check 28 | ;; 29 | MariaDB) 30 | opencast_mariadb_check 31 | opencast_jdbc_check 32 | ;; 33 | PostgreSQL) 34 | opencast_postgresql_check 35 | opencast_jdbc_check 36 | ;; 37 | *) 38 | echo >&2 "error: ${ORG_OPENCASTPROJECT_DB_VENDOR} is currently not supported as database vendor" 39 | exit 1 40 | ;; 41 | esac 42 | } 43 | 44 | opencast_db_configure() { 45 | echo "Run opencast_db_configure" 46 | 47 | case "$ORG_OPENCASTPROJECT_DB_VENDOR" in 48 | H2) 49 | opencast_h2_configure 50 | ;; 51 | MariaDB) 52 | opencast_mariadb_configure 53 | opencast_jdbc_configure 54 | ;; 55 | PostgreSQL) 56 | opencast_postgresql_configure 57 | opencast_jdbc_configure 58 | ;; 59 | *) 60 | echo >&2 "error: ${ORG_OPENCASTPROJECT_DB_VENDOR} is currently not supported as database vendor" 61 | exit 1 62 | ;; 63 | esac 64 | } 65 | 66 | opencast_db_trytoconnect() { 67 | echo "Run opencast_db_trytoconnect" 68 | 69 | case "$ORG_OPENCASTPROJECT_DB_VENDOR" in 70 | H2) 71 | opencast_h2_trytoconnect 72 | ;; 73 | MariaDB|PostgreSQL) 74 | opencast_jdbc_trytoconnect 75 | ;; 76 | *) 77 | echo >&2 "error: ${ORG_OPENCASTPROJECT_DB_VENDOR} is currently not supported as database vendor" 78 | exit 1 79 | ;; 80 | esac 81 | } 82 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/elasticsearch.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | export ELASTICSEARCH_SERVER_SCHEME="${ELASTICSEARCH_SERVER_SCHEME:-http}" 20 | export ELASTICSEARCH_SERVER_PORT="${ELASTICSEARCH_SERVER_PORT:-9200}" 21 | export NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_ELASTICSEARCH="${NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_ELASTICSEARCH:-25}" 22 | 23 | opencast_elasticsearch_check() { 24 | echo "Run opencast_elasticsearch_check" 25 | 26 | opencast_helper_checkforvariables \ 27 | "ELASTICSEARCH_SERVER_HOST" \ 28 | "ELASTICSEARCH_SERVER_SCHEME" \ 29 | "ELASTICSEARCH_SERVER_PORT" 30 | } 31 | 32 | opencast_elasticsearch_configure() { 33 | echo "Run opencast_elasticsearch_configure" 34 | 35 | opencast_helper_replaceinfile "${OPENCAST_HOME}/etc/custom.properties" \ 36 | "ELASTICSEARCH_SERVER_HOST" \ 37 | "ELASTICSEARCH_SERVER_SCHEME" \ 38 | "ELASTICSEARCH_SERVER_PORT" \ 39 | "ELASTICSEARCH_USERNAME" \ 40 | "ELASTICSEARCH_PASSWORD" 41 | 42 | [ -n "$ELASTICSEARCH_SERVER_HOST" ] || 43 | opencast_helper_deleteinfile "${OPENCAST_HOME}/etc/custom.properties" "ELASTICSEARCH_SERVER_HOST" 44 | 45 | [ -n "$ELASTICSEARCH_USERNAME" ] || 46 | opencast_helper_deleteinfile "${OPENCAST_HOME}/etc/custom.properties" "ELASTICSEARCH_USERNAME" 47 | 48 | [ -n "$ELASTICSEARCH_PASSWORD" ] || 49 | opencast_helper_deleteinfile "${OPENCAST_HOME}/etc/custom.properties" "ELASTICSEARCH_PASSWORD" 50 | } 51 | 52 | opencast_elasticsearch_trytoconnect() { 53 | echo "Run opencast_elasticsearch_trytoconnect" 54 | 55 | if [ "$NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_ELASTICSEARCH" -eq 0 ]; then 56 | echo "Skip Elasticsearch connection check" 57 | return 58 | fi 59 | 60 | server_host=$( grep "^org.opencastproject.elasticsearch.server.hostname" "${OPENCAST_HOME}/etc/custom.properties" | tr -d ' ' | cut -d '=' -f 2- ) 61 | server_port=$( grep "^org.opencastproject.elasticsearch.server.port" "${OPENCAST_HOME}/etc/custom.properties" | tr -d ' ' | cut -d '=' -f 2- ) 62 | 63 | i=1 64 | while [ "$i" -le "$NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_ELASTICSEARCH" ]; do 65 | printf "Try to connect to Elasticsearch (%s/%s) " "$i" "$NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_ELASTICSEARCH" 66 | 67 | # We only check if a TCP connection can be established since we don't know what permissions the configured 68 | # Elasticsearch user has and thus what requests are allowed. 69 | 70 | if nc -z -w 2 "$server_host" "$server_port"; then 71 | echo "SUCCEEDED" 72 | return 73 | else 74 | echo "FAILED" 75 | sleep 5 76 | fi 77 | i="$(( i + 1 ))" 78 | done 79 | 80 | echo "Could not connect to Elasticsearch" 81 | return 1 82 | } 83 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/h2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | opencast_h2_check() { 20 | echo "Run opencast_h2_check" 21 | } 22 | 23 | opencast_h2_configure() { 24 | echo "Run opencast_h2_configure" 25 | 26 | opencast_helper_deleteinfile "${OPENCAST_HOME}/etc/custom.properties" \ 27 | "ORG_OPENCASTPROJECT_DB_JDBC_DRIVER" \ 28 | "ORG_OPENCASTPROJECT_DB_JDBC_URL" \ 29 | "ORG_OPENCASTPROJECT_DB_JDBC_USER" \ 30 | "ORG_OPENCASTPROJECT_DB_JDBC_PASS" 31 | } 32 | 33 | opencast_h2_trytoconnect() { 34 | echo "Run opencast_h2_trytoconnect" 35 | } 36 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/helper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | opencast_helper_dist_allinone() { 20 | test "${OPENCAST_DISTRIBUTION}" = "allinone" 21 | } 22 | 23 | opencast_helper_dist_develop() { 24 | test "${OPENCAST_DISTRIBUTION}" = "develop" 25 | } 26 | 27 | opencast_helper_dist_admin() { 28 | test "${OPENCAST_DISTRIBUTION}" = "admin" 29 | } 30 | 31 | opencast_helper_dist_adminpresentation() { 32 | test "${OPENCAST_DISTRIBUTION}" = "adminpresentation" 33 | } 34 | 35 | opencast_helper_dist_presentation() { 36 | test "${OPENCAST_DISTRIBUTION}" = "presentation" 37 | } 38 | 39 | opencast_helper_dist_worker() { 40 | test "${OPENCAST_DISTRIBUTION}" = "worker" 41 | } 42 | 43 | opencast_helper_dist_ingest() { 44 | test "${OPENCAST_DISTRIBUTION}" = "ingest" 45 | } 46 | 47 | opencast_helper_customconfig() { 48 | test -d "${OPENCAST_CUSTOM_CONFIG}" 49 | } 50 | 51 | opencast_helper_customconfig_wait_for_change() { 52 | inotifywait -q -r -e modify,close_write,create,move,delete "${OPENCAST_CUSTOM_CONFIG}" 53 | 54 | # One change seldom comes alone. Wait for good measure. 55 | sleep 2 56 | } 57 | 58 | opencast_helper_stage_base() { 59 | rsync -qcrlog --chown=0:0 "${OPENCAST_STAGE_BASE_HOME}/" "${OPENCAST_STAGE_OUT_HOME}" 60 | } 61 | 62 | opencast_helper_stage_customconfig() { 63 | # Kubernetes will create symlinked files to folders to change out mounted configuration simultaneously. The folder 64 | # names start with two dots. Let's ignore them and dereference the symbolic links. 65 | rsync -qcrLKog --chown=0:0 --exclude="..*" "${OPENCAST_CUSTOM_CONFIG}/" "${OPENCAST_STAGE_OUT_HOME}/etc" 66 | } 67 | 68 | opencast_helper_deploy_staged_config() { 69 | rsync -qcrlog --chown="${OPENCAST_UID}:${OPENCAST_GID}" --delete "${OPENCAST_STAGE_OUT_HOME}/etc/" "${OPENCAST_CONFIG}" 70 | } 71 | 72 | opencast_helper_checkforvariables() { 73 | for var in "$@"; do 74 | eval exp_var="\$${var}" 75 | # shellcheck disable=SC2154 76 | if test -z "${exp_var}"; then 77 | echo >&2 "error: missing Opencast ${var} environment variables" 78 | echo >&2 " Did you forget to -e ${var}=value ?" 79 | exit 1 80 | fi 81 | done 82 | } 83 | 84 | # Replaces {{$2...}} with $!2... in file $1 if $!2... exists 85 | opencast_helper_replaceinfile() { 86 | file="$1" 87 | shift 88 | for var in "$@"; do 89 | eval exp_var="\$${var}" 90 | # shellcheck disable=SC2154 91 | sed -ri "s/[{]{2}${var}[}]{2}/$( echo "${exp_var}" | sed -e 's/[\/&]/\\&/g' )/g" "${file}" 92 | done 93 | } 94 | 95 | # Deletes lines containing {{$2...}} in file $1 96 | opencast_helper_deleteinfile() { 97 | file="$1" 98 | shift 99 | for var in "$@"; do 100 | sed -ri "/[{]{2}${var}[}]{2}/d" "${file}" 101 | done 102 | } 103 | 104 | # Adopted from https://github.com/docker-library/postgres/blob/040949af1595f49f2242f6d1f9c42fb042b3eaed/11/docker-entrypoint.sh#L5-L25 105 | # 106 | # usage: file_env VAR [DEFAULT] 107 | # ie: file_env 'XYZ_DB_PASSWORD' 'example' 108 | # (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of 109 | # "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature) 110 | file_env() { 111 | var="$1" 112 | file_var="${var}_FILE" 113 | def="${2:-}" 114 | eval file_var_val="\${${file_var}:-}" 115 | eval var_val="\${${var}:-}" 116 | # shellcheck disable=SC2154 117 | if [ "${var_val}" ] && [ "${file_var_val}" ]; then 118 | echo >&2 "error: both $var and $file_var are set (but are exclusive)" 119 | exit 1 120 | fi 121 | val="$def" 122 | if [ "${var_val}" ]; then 123 | val="${var_val}" 124 | elif [ "${file_var_val}" ]; then 125 | val="$(cat "${file_var_val}")" 126 | fi 127 | if [ "$val" ]; then 128 | export "$var"="$val" 129 | fi 130 | unset "$file_var" 131 | } 132 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/jdbc.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | opencast_jdbc_check() { 20 | echo "Run opencast_jdbc_check" 21 | 22 | opencast_helper_checkforvariables \ 23 | "ORG_OPENCASTPROJECT_DB_JDBC_DRIVER" \ 24 | "ORG_OPENCASTPROJECT_DB_JDBC_URL" \ 25 | "ORG_OPENCASTPROJECT_DB_JDBC_USER" \ 26 | "ORG_OPENCASTPROJECT_DB_JDBC_PASS" 27 | } 28 | 29 | opencast_jdbc_configure() { 30 | echo "Run opencast_jdbc_configure" 31 | 32 | opencast_helper_replaceinfile "${OPENCAST_HOME}/etc/custom.properties" \ 33 | "ORG_OPENCASTPROJECT_DB_JDBC_DRIVER" \ 34 | "ORG_OPENCASTPROJECT_DB_JDBC_URL" \ 35 | "ORG_OPENCASTPROJECT_DB_JDBC_USER" \ 36 | "ORG_OPENCASTPROJECT_DB_JDBC_PASS" 37 | } 38 | 39 | opencast_jdbc_trytoconnect() { 40 | echo "Run opencast_jdbc_trytoconnect" 41 | 42 | driver=$( grep "^org.opencastproject.db.jdbc.driver" "${OPENCAST_HOME}/etc/custom.properties" | tr -d ' ' | cut -d '=' -f 2- ) 43 | url=$( grep "^org.opencastproject.db.jdbc.url" "${OPENCAST_HOME}/etc/custom.properties" | tr -d ' ' | cut -d '=' -f 2- ) 44 | user=$( grep "^org.opencastproject.db.jdbc.user" "${OPENCAST_HOME}/etc/custom.properties" | tr -d ' ' | cut -d '=' -f 2- ) 45 | password=$( grep "^org.opencastproject.db.jdbc.pass" "${OPENCAST_HOME}/etc/custom.properties" | tr -d ' ' | cut -d '=' -f 2- ) 46 | db_jar=$( find "${OPENCAST_HOME}/system/org/opencastproject" -name 'opencast-db-*.jar' ) 47 | 48 | java -cp "${OPENCAST_SCRIPTS}:${db_jar}" \ 49 | TryToConnectToDb \ 50 | "${driver}" \ 51 | "${url}" \ 52 | "${user}" \ 53 | "${password}" \ 54 | "${NUMBER_OF_TIMES_TRYING_TO_CONNECT_TO_DB}" 55 | } 56 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/mariadb.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | opencast_mariadb_check() { 20 | echo "Run opencast_mariadb_check" 21 | 22 | export ORG_OPENCASTPROJECT_DB_JDBC_DRIVER="org.mariadb.jdbc.Driver" 23 | } 24 | 25 | opencast_mariadb_configure() { 26 | echo "Run opencast_mariadb_configure" 27 | 28 | export ORG_OPENCASTPROJECT_DB_JDBC_DRIVER="org.mariadb.jdbc.Driver" 29 | } 30 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/opencast.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | export ORG_OPENCASTPROJECT_SERVER_URL="${ORG_OPENCASTPROJECT_SERVER_URL:-http://$(hostname -f):8080}" 20 | export ORG_OPENCASTPROJECT_ADMIN_EMAIL="${ORG_OPENCASTPROJECT_ADMIN_EMAIL:-example@opencast.org}" 21 | export ORG_OPENCASTPROJECT_DOWNLOAD_URL="${ORG_OPENCASTPROJECT_DOWNLOAD_URL:-\$\{org.opencastproject.server.url\}/static}" 22 | 23 | if opencast_helper_dist_allinone || opencast_helper_dist_develop; then 24 | export PROP_ORG_OPENCASTPROJECT_FILE_REPO_URL="${PROP_ORG_OPENCASTPROJECT_FILE_REPO_URL:-\$\{org.opencastproject.server.url\}}" 25 | export PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL="${PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL:-\$\{org.opencastproject.server.url\}}" 26 | export PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL="${PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL:-\$\{org.opencastproject.server.url\}}" 27 | else 28 | export PROP_ORG_OPENCASTPROJECT_FILE_REPO_URL="${PROP_ORG_OPENCASTPROJECT_FILE_REPO_URL:-\$\{prop.org.opencastproject.admin.ui.url\}}" 29 | fi 30 | 31 | opencast_opencast_check() { 32 | echo "Run opencast_opencast_check" 33 | opencast_helper_checkforvariables \ 34 | "ORG_OPENCASTPROJECT_SERVER_URL" \ 35 | "ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER" \ 36 | "ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS" \ 37 | "ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER" \ 38 | "ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS" \ 39 | "PROP_ORG_OPENCASTPROJECT_FILE_REPO_URL" \ 40 | "PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL" \ 41 | "PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL" 42 | } 43 | 44 | opencast_opencast_configure() { 45 | echo "Run opencast_opencast_configure" 46 | opencast_helper_replaceinfile "${OPENCAST_HOME}/etc/custom.properties" \ 47 | "ORG_OPENCASTPROJECT_ADMIN_EMAIL" \ 48 | "ORG_OPENCASTPROJECT_SERVER_URL" \ 49 | "ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER" \ 50 | "ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS" \ 51 | "ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER" \ 52 | "ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS" \ 53 | "ORG_OPENCASTPROJECT_DOWNLOAD_URL" 54 | 55 | opencast_helper_replaceinfile "${OPENCAST_HOME}/etc/org.opencastproject.organization-mh_default_org.cfg" \ 56 | "PROP_ORG_OPENCASTPROJECT_FILE_REPO_URL" \ 57 | "PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL" \ 58 | "PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL" 59 | } 60 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/postgresql.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | opencast_postgresql_check() { 20 | echo "Run opencast_postgresql_check" 21 | 22 | export ORG_OPENCASTPROJECT_DB_JDBC_DRIVER="org.postgresql.Driver" 23 | } 24 | 25 | opencast_postgresql_configure() { 26 | echo "Run opencast_postgresql_configure" 27 | 28 | export ORG_OPENCASTPROJECT_DB_JDBC_DRIVER="org.postgresql.Driver" 29 | } 30 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/tz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | TIMEZONE="${TIMEZONE:-UTC}" 20 | 21 | opencast_tz_set() { 22 | echo "Run opencast_tz_set" 23 | echo " Setting timezone to ${TIMEZONE}" 24 | 25 | ln -snf "/usr/share/zoneinfo/${TIMEZONE}" /etc/localtime 26 | echo "${TIMEZONE}" > /etc/timezone 27 | echo "${TIMEZONE}" > /etc/TIMEZONE 28 | } 29 | -------------------------------------------------------------------------------- /rootfs/opencast/docker/scripts/whisper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright 2016 The University of Münster eLectures Team All rights reserved. 4 | # 5 | # Licensed under the Educational Community License, Version 2.0 6 | # (the "License"); you may not use this file except in compliance with 7 | # the License. You may obtain a copy of the License at 8 | # 9 | # http://opensource.org/licenses/ECL-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | set -e 18 | 19 | WHISPER_CPP_DOWNLOAD_MODEL="${WHISPER_CPP_DOWNLOAD_MODEL:-}" 20 | 21 | opencast_whisper_init() { 22 | echo "Run opencast_whisper_init" 23 | 24 | if [ -n "${WHISPER_CPP_DOWNLOAD_MODEL}" ]; then 25 | opencast_whisper_cpp_download "$WHISPER_CPP_DOWNLOAD_MODEL" & 26 | fi 27 | } 28 | 29 | opencast_whisper_cpp_download() { 30 | model=$1 31 | echo "Run opencast_whisper_cpp_download '$model'" 32 | 33 | set +e 34 | out=$(whisper.cpp-model-download "$model" 2>&1) 35 | ec=$? 36 | set -e 37 | if [ $ec -ne 0 ]; then 38 | echo "Failed opencast_whisper_cpp_download '$model':" 39 | printf "%s\n" "$out" 40 | return $ec 41 | fi 42 | 43 | echo "Finished opencast_whisper_cpp_download '$model'" 44 | } 45 | -------------------------------------------------------------------------------- /rootfs/opencast/etc/custom.properties: -------------------------------------------------------------------------------- 1 | ######################################### 2 | ### Opencast configuration properties ### 3 | ######################################### 4 | 5 | # The internal URL of this Opencast installation, used to locate services running on this instance and for inter-node 6 | # communication in distributed setups. 7 | # 8 | # Note that while the server.url is the public url of this instance, there is the actual public url of an individual 9 | # tenant, which is configured in etc/load/org.opencastproject.organization-.cfg with the default tenant id 10 | # being "mh_default_org". 11 | # 12 | # Also note that if this felix installation is proxied behind an Apache HTTPD reverse proxy, and communication is meant 13 | # to go through that proxy, then server.url should point to the proxy's port (usually 80). 14 | # Related options (like listening addresses) are located in etc/org.ops4j.pax.web.cfg 15 | # 16 | # It is not supported for Opencast or it's tenants to be hosted in a subpath. Opencast or the tenants need to be served 17 | # from the root path element. The RFC 3986 URI path component needs to be empty. 18 | 19 | org.opencastproject.server.url={{ORG_OPENCASTPROJECT_SERVER_URL}} 20 | 21 | # The environment specified below will show up in the email subject when sending a notification about transcription 22 | # errors. Useful to differentiate among environments (dev, test, etc) and may be used by other services in the future. 23 | #org.opencastproject.environment.name= 24 | 25 | 26 | # The node name is a descriptive title for this Opencast instance, eg admin, worker01, etc. This is a useful alternative 27 | # to the using the server url in the Admin UI on cloud platforms where nodes may be dynamically generated and not have a 28 | # sensible hostname. 29 | org.opencastproject.server.nodename=AllInOne 30 | 31 | ######### USER/AUTHENTICATION ######### 32 | 33 | # The username and password for a system administrator account. If both `user` and `pass` are set, Opencast will create 34 | # or update that user when started up. If it is commented out, nothing will happen. 35 | # WARNING: Commenting this out later or renaming the user will *not* remove already created user. 36 | org.opencastproject.security.admin.user={{ORG_OPENCASTPROJECT_SECURITY_ADMIN_USER}} 37 | org.opencastproject.security.admin.pass={{ORG_OPENCASTPROJECT_SECURITY_ADMIN_PASS}} 38 | org.opencastproject.security.admin.roles=ROLE_ADMIN,ROLE_OAUTH_USER 39 | 40 | # Email address of the server's admin. 41 | org.opencastproject.admin.email={{ORG_OPENCASTPROJECT_ADMIN_EMAIL}} 42 | 43 | # Optional custom roles which can used in ACLs and granted to users or groups (comma-separated list of role names) 44 | #org.opencastproject.security.custom.roles=ROLE_ONE, ROLE_TWO, ROLE_THREE 45 | 46 | # Optional custom roles pattern (regular expression). Roles matching this pattern can be added to ACLs. 47 | #org.opencastproject.security.custom.roles.pattern=^[0-9a-f-]+_(Learner|Instructor)$ 48 | 49 | # The username and password to present to other Opencast servers when calling their REST endpoints. The remote server 50 | # must contain matching values. 51 | org.opencastproject.security.digest.user={{ORG_OPENCASTPROJECT_SECURITY_DIGEST_USER}} 52 | org.opencastproject.security.digest.pass={{ORG_OPENCASTPROJECT_SECURITY_DIGEST_PASS}} 53 | 54 | # The number of times to retry a request if the nonce expires. 55 | #org.opencastproject.security.digest.nonce.retries=12 56 | 57 | # The configuration property specifying the minimum amount of time in seconds wait before retrying a request after 58 | # a nonce timeout. Default is 300 seconds (5 minutes). 59 | #org.opencastproject.security.digest.nonce.base.time=300 60 | 61 | # The maximum amount of time to wait in addition to the base time for a random generator to add after a nonce timeout 62 | # so that requests that timeout won't all try again at exactly the same time. Default is 300 seconds (5 minutes). 63 | #org.opencastproject.security.digest.nonce.variable.time=300 64 | 65 | 66 | ######### STORAGE ######### 67 | 68 | # The directory where the system will store its processed files (including temporary files). This directory should 69 | # be persistent between reboots (i.e., not /tmp) 70 | org.opencastproject.storage.dir=/data/opencast 71 | 72 | # The path to the asset manager directory 73 | # Default: ${org.opencastproject.storage.dir}/archive 74 | #org.opencastproject.episode.rootdir=${org.opencastproject.storage.dir}/archive 75 | 76 | # You can specify additional asset manager directories. 77 | # This can be useful in case you want to use multiple nfs shares. 78 | # For each additional directory, write a line like `org.opencastproject.episode.rootdir.X=path`, 79 | # where "X" is a number starting at 1 and incrementing for each line. 80 | #org.opencastproject.episode.rootdir.1=${org.opencastproject.storage.dir}/archiveOriginal 81 | #org.opencastproject.episode.rootdir.2=/srv/opencast-zwei/archive 82 | 83 | # The path to the repository of files used during media processing. 84 | #org.opencastproject.file.repo.path=${org.opencastproject.storage.dir}/files 85 | 86 | # The path to the working files (recommend using fast, transient storage) 87 | org.opencastproject.workspace.rootdir=${org.opencastproject.storage.dir}/workspace 88 | 89 | # The location to store uploaded static files such as images and videos. 90 | org.opencastproject.staticfiles.rootdir=${org.opencastproject.storage.dir}/staticfiles 91 | 92 | # Location of the temporary directory to build zip archives. 93 | # Default: ${org.opencastproject.storage.dir}/tmp/zip 94 | #org.opencastproject.workflow.handler.workflow.ZipWorkflowOperationHandler.tmpdir=${org.opencastproject.storage.dir}/tmp/zip 95 | 96 | 97 | ######### STREAMING AND DOWNLOAD ######### 98 | # The mime types of streaming formats for which raw streaming URLs will be published automatically under the channel: 99 | # 'engage-player'. Use the character: '*' if all configured streaming URLs should be published. 100 | # The publication of streaming URI's is switched off by default 101 | # Default: * 102 | #org.opencastproject.publish.streaming.formats=* 103 | 104 | # For more streaming configuration see: 105 | # org.opencastproject.distribution.streaming.wowza.WowzaStreamingDistributionService.cfg 106 | 107 | # The base URL for media downloads. 108 | org.opencastproject.download.url={{ORG_OPENCASTPROJECT_DOWNLOAD_URL}} 109 | 110 | # The directory to store media, metadata, and attachments for download from the engage tool 111 | org.opencastproject.download.directory=${org.opencastproject.storage.dir}/downloads 112 | 113 | 114 | 115 | ######### DATABASE ######### 116 | 117 | # Relational Database configuration. 118 | # By default, Opencast uses an embedded H2 database. 119 | # Use a standalone database server for production systems. 120 | 121 | # Opencast comes with the jdbc drivers for MariaDB (org.mariadb.jdbc.Driver) and PostgreSQL (org.postgresql.Driver). 122 | # To add other jdbcDrivers to the Opencast runtime, rebuild the db module with your desired drivers. 123 | org.opencastproject.db.jdbc.driver={{ORG_OPENCASTPROJECT_DB_JDBC_DRIVER}} 124 | 125 | # The jdbc connection url, username, and password 126 | # Defaults: 127 | # .url=jdbc:h2:${org.opencastproject.storage.dir}/db 128 | # .user=sa 129 | # .pass=sa 130 | org.opencastproject.db.jdbc.url={{ORG_OPENCASTPROJECT_DB_JDBC_URL}} 131 | org.opencastproject.db.jdbc.user={{ORG_OPENCASTPROJECT_DB_JDBC_USER}} 132 | org.opencastproject.db.jdbc.pass={{ORG_OPENCASTPROJECT_DB_JDBC_PASS}} 133 | 134 | # The jdbc connection pool properties. See https://mchange.com/projects/c3p0/#basic_pool_configuration 135 | # and https://www.mchange.com/projects/c3p0/#configuration_properties 136 | #org.opencastproject.db.jdbc.pool.max.size=15 137 | #org.opencastproject.db.jdbc.pool.min.size=3 138 | #org.opencastproject.db.jdbc.pool.acquire.increment=3 139 | #org.opencastproject.db.jdbc.pool.max.statements=0 140 | #org.opencastproject.db.jdbc.pool.login.timeout=60 141 | # max.idle.time should be lower than the database server idle connection timeout duration (wait_timeout for MariaDB) 142 | #org.opencastproject.db.jdbc.pool.max.idle.time=1800 143 | #org.opencastproject.db.jdbc.pool.max.connection.age=28800 144 | # Idle connection testing documentation: https://www.mchange.com/projects/c3p0/#configuring_connection_testing 145 | #org.opencastproject.db.jdbc.pool.test.connection.on.checkin = false 146 | # Setting test.connection.on.checkout to true is the most costly choice from a client-performance perspective. 147 | # In most cases a combination of test.connection.on.checkin and idle.connection.test.period will be a better choice. 148 | #org.opencastproject.db.jdbc.pool.test.connection.on.checkout = false 149 | #org.opencastproject.db.jdbc.pool.idle.connection.test.period = 300 150 | 151 | 152 | ######### Workspace Cleanup ######### 153 | 154 | # The scheduled period in seconds, at which a workspace cleanup operation is performed. 155 | # 86400 seconds equals 24 hours. 156 | # Default value: -1 (Disable cleanup scheduler) 157 | org.opencastproject.workspace.cleanup.period=86400 158 | 159 | # The maximum age a file must reach in seconds before a deletion of the file in the workspace cleanup operation is 160 | # performed. 2592000 seconds equals 30 days. 161 | # Default value: -1 (max age will never be reached) 162 | org.opencastproject.workspace.cleanup.max.age=2592000 163 | 164 | 165 | ######### Working File Repository Cleanup ######### 166 | 167 | # The scheduled period in seconds, at which a working file repository cleanup operation is performed. 168 | # 86400 seconds equals 24 hours. 169 | # Default value: -1 (Disable cleanup scheduler) 170 | org.opencastproject.working.file.repository.cleanup.period=86400 171 | 172 | # The maximum age a file must reach in days before a deletion of the file in the workspace cleanup operation is 173 | # performed. 174 | # Default value: -1 (max age will never be reached) 175 | org.opencastproject.working.file.repository.cleanup.max.age=100 176 | 177 | # A comma separated lists of collections in the working file repository that shouldbe cleaned up. 178 | # Default value: Not provided (no collection will be cleaned up) 179 | org.opencastproject.working.file.repository.cleanup.collections=failed.zips 180 | 181 | 182 | ######### Elasticsearch ######### 183 | 184 | # The hostname of the Elasticsearch node for Opencast to use. 185 | # Default: localhost 186 | org.opencastproject.elasticsearch.server.hostname={{ELASTICSEARCH_SERVER_HOST}} 187 | 188 | # The scheme of the Elasticsearch node for Opencast to use. 189 | # Default: http 190 | org.opencastproject.elasticsearch.server.scheme={{ELASTICSEARCH_SERVER_SCHEME}} 191 | 192 | # The port of the Elasticsearch node for Opencast to use. 193 | # Default: 9200 194 | org.opencastproject.elasticsearch.server.port={{ELASTICSEARCH_SERVER_PORT}} 195 | 196 | # The username of Elasticsearch for Opencast to use. 197 | # Default: None 198 | org.opencastproject.elasticsearch.username={{ELASTICSEARCH_USERNAME}} 199 | 200 | # The password of Elasticsearch for Opencast to use. 201 | # Default: None 202 | org.opencastproject.elasticsearch.password={{ELASTICSEARCH_PASSWORD}} 203 | 204 | 205 | ######### Service Registry & Jobs ######### 206 | 207 | # The url of the remote service registry. This is used in cases where there is no direct connection to the service 208 | # registry database such as capture agens running in protected environments. This is typically true for capture agents 209 | # and should be set to the url of a server running the actual implementation of the service registry and the path to 210 | # the service registry(admin, worker, etc. See the build profiles in pom.xml for a complete list). 211 | #org.opencastproject.serviceregistry.url=${org.opencastproject.server.url}/services 212 | 213 | # The base URL to use for publishing job locations. If left commented out, the local server URL will be used. Set this 214 | # if you intend to support swapping servers with different IPs or host names. 215 | #org.opencastproject.jobs.url=${org.opencastproject.server.url} 216 | 217 | # Whether to accept a job whose load exceeds the host's max load 218 | # Default: true 219 | #org.opencastproject.job.load.acceptexceeding=true 220 | 221 | # The max load on this server. 222 | # Default: number of cores 223 | #org.opencastproject.server.maxload= 224 | 225 | ######### Capture and Ingest ######### 226 | 227 | # Timeout for capture agent status, in minutes. 228 | # Capture agents which have not sent status updates for this period will be marked as offline. 229 | # Default: 120 minutes (2 hours) 230 | #org.opencastproject.capture.admin.timeout=120 231 | 232 | # The ID of the default workflow definition to run when media are ingested 233 | #org.opencastproject.workflow.default.definition=schedule-and-upload 234 | 235 | # The max number of ingests to allow at the same time. If more ingests try than the max they will receive service 236 | # unavailable. A value of 0 means that the server will accept all ingests. 237 | # Default: 0 238 | #org.opencastproject.ingest.max.concurrent=0 239 | 240 | ######### Third-party Binaries ######### 241 | 242 | # Path to the ffmpeg binary. Its name is sufficient if the binary is in the 243 | # system path (default: ffmpeg) 244 | #org.opencastproject.composer.ffmpeg.path=/opt/ffmpeg/ffmpeg 245 | 246 | # Path to the ffprobe binary. Its name is sufficient if the binary is in the 247 | # system path (default: ffprobe) 248 | #org.opencastproject.inspection.ffprobe.path=/opt/ffmpeg/ffprobe 249 | 250 | # Path to the tesseract binary used by the text analyzer. Its name is 251 | # sufficient if the binary is in the system path (default: tesseract) 252 | #org.opencastproject.textanalyzer.tesseract.path=/opt/tesseract/tesseract 253 | 254 | # Additional options for Tesseract like language or page segmentation mode. 255 | # Tesseract allows you to specify multiple languages like this: 256 | # -l eng+deu --psm 3 257 | # The default are no additional options. 258 | #org.opencastproject.textanalyzer.tesseract.options=-l eng --psm 3 259 | 260 | # Path to the hunspell binary used by the dictionary-hunspell 261 | # module. The default ist just "hunspell" which requires hunspell to be in the 262 | # search path. 263 | #org.opencastproject.dictionary.hunspell.binary=/opt/hunspell/hunspell 264 | 265 | # Command to use for filtering text by the dictionary-hunspell 266 | # module. The command is appended to the hunspell binary path. It should filter 267 | # the text from stdin and print the recognized words to stdout. Usually this 268 | # should be a combination of "-G" and a list of dictionaries. The default is to 269 | # use "-d de_DE,en_GB,en_US -G". 270 | #org.opencastproject.dictionary.hunspell.command=-i utf-8 -d de_DE,en_GB,en_US -G 271 | 272 | # The path for SoX command line used by audio normalization 273 | #org.opencastproject.sox.path=/opt/sox/sox 274 | 275 | 276 | ######### Static Files ######### 277 | 278 | # True means to use a webserver to serve the static files but this will not secure 279 | # any of the files using user or organization security. If false it uses 280 | # Opencast endpoints to serve and secure the files. 281 | #org.opencastproject.staticfiles.webserver.enabled=false 282 | 283 | # The url to the location where the webserver serves the static file uploads from. It will add the organization and uuid 284 | # for the uploaded static file. If not set Opencast uses endpoints to serve and secure the files. 285 | #org.opencastproject.staticfiles.webserver.url=${org.opencastproject.server.url}/staticfiles/ 286 | 287 | # This is the maximum allowable size in bytes for a file to be uploaded. If the property is missing or set to 0 it is 288 | # disabled. 289 | # Default is 1000000000 which is 1GB. 290 | #org.opencastproject.staticfiles.upload.max.size=1000000000 291 | 292 | 293 | ######### User Directory ######### 294 | 295 | # The size of the user directory cache. 296 | # Default: 200 297 | #org.opencastproject.userdirectory.cache.size=200 298 | 299 | # The expiry time of entries in the user directory cache, in minutes 300 | # Default: 1 minute 301 | #org.opencastproject.userdirectory.cache.expiry=1 302 | 303 | # This regex is used to reduce the users in the filter selectbox. 304 | # A username that matches this regex will be listed in the filter selection 305 | # The filter is located in the top right corner in the admin ui. 306 | # Default (allow all users): .* 307 | #org.opencastproject.adminui.filter.user.regex = .* 308 | 309 | 310 | ######### KARAF CONFIGURATION ######### 311 | 312 | # The place for Karaf to put the lock file ensuring that Opencast is not run twice at the same time. 313 | karaf.lock.dir=${karaf.data} 314 | 315 | # Setting or deactivating the remote shutdown port in Apache Karaf. Commenting this out will make Karaf listen to a 316 | # random shutdown port on localhost, announcing it via ${karaf.shutdown.port.file}. Setting this to -1 will deactivate 317 | # the shutdown port. Note that the stop script is based on this and will not work any longer if the port is deactivated. 318 | #karaf.shutdown.port=-1 319 | 320 | # Specifies the location of the port file for Opencast. It is used by the shutdown script to send the shutdown command 321 | # to the main process. 322 | karaf.shutdown.port.file=${karaf.data}/port 323 | 324 | # Command for shutting down Opencast. If the shutdown port is enabled, Opencast will listen for this command to initiate 325 | # the shut down procedure. 326 | # Change this to something secret 327 | karaf.shutdown.command=CHANGE_ME 328 | 329 | # Specifies the location of the PID file for Opencast. It is used by the shutdown script to synchronously shut down 330 | # Opencast as it will wait for the process with the given process id. Removing this will cause the network port to be 331 | # used as fallback. 332 | karaf.pid.file=${karaf.data}/pid 333 | 334 | 335 | ######### Miscellaneous ######### 336 | 337 | # The mount point of the OAI-PMH servlet. 338 | # Please make sure that the path configured is accessible without any login (see security.xml) 339 | # This setting is configured here and not in the OAI-PMH server's config since it is shared amongst several 340 | # OAI-PMH related components. 341 | #org.opencastproject.oaipmh.mountpoint=/oaipmh 342 | 343 | # This changes the number of seconds from when an internal request is made until a signed URL will expire. More 344 | # specifically, the HTTP client needs access to internal storage areas such as the working file repository as well as to 345 | # distributed artifacts on the downloads and streaming servers, all of which are protected by verification components. 346 | # Default is 60 seconds as it shouldn't take longer than that to make a request to a server. This will have no impact on 347 | # a system where url signing is not configured. For more information please see: 348 | # https://docs.opencast.org/develop/admin/#configuration/stream-security/stream-security-config/#configuration-of-url-signing-timeout-values 349 | #org.opencastproject.security.internal.url.signing.duration=60 350 | 351 | # Allow episode ID based access control via roles. 352 | # If activated, users with a role like ROLE_EPISODE__ will have access to the episode with the given 353 | # identifier, without this having to be explicitly stated in the ACL attached to the episode. 354 | # 355 | # For example, ROLE_EPISODE_872dc4ec-ca8a-4e12-8dac-ce99784d6d29_READ will allow the user to get read access to episode 356 | # 872dc4ec-ca8a-4e12-8dac-ce99784d6d29. 357 | # 358 | # To make this work for the Admin UI and External API, the Elasticsearch index needs to be updated with modified 359 | # ACLs. You can achieve this by calling the /index/rebuild/AssetManager/ACL endpoint AFTER activating this feature. 360 | # The endpoint will reindex only event ACLs. 361 | # 362 | # Default: false 363 | #org.opencastproject.episode.id.role.access = false 364 | -------------------------------------------------------------------------------- /rootfs/opencast/etc/org.opencastproject.ingest.scanner.InboxScannerService-inbox.cfg: -------------------------------------------------------------------------------- 1 | # Specify user to use when ingesting media from the inbox 2 | user.name=admin 3 | user.organization=mh_default_org 4 | 5 | # Specify the workflow definition (by its identifier) to run for media, ingested from the inbox 6 | workflow.definition=schedule-and-upload 7 | 8 | # Specify flavor to use for ingested media files. This configuration has no effect on zipped mediapackages since they 9 | # contain the flavor information in their manifest xml file. 10 | media.flavor=presentation/source 11 | 12 | # Specify the workflow configuration 13 | # Example: 14 | # workflow.config.{key}={value} 15 | workflow.config.flagForReview=true 16 | workflow.config.straightToPublishing=false 17 | 18 | # Path to the Inbox directory 19 | inbox.path=/data/inbox 20 | 21 | # Inbox polling interval in milliseconds 22 | # Default: 5000 23 | #inbox.poll=5000 24 | 25 | # The maximum number of concurrent files to ingest from the inbox directory 26 | # Default: 1 27 | #inbox.threads=1 28 | 29 | # The maximum number of retries when ingesting from inbox 30 | # Default: 3 31 | #inbox.tries=3 32 | 33 | # The time between each retry in seconds 34 | # Default: 300 35 | #inbox.tries.between.sec=300 36 | 37 | ### 38 | # Metadata matching 39 | ## 40 | 41 | # Regular expression to extract metadata from filename. 42 | # 43 | # By default, the filename is used as title. 44 | # This option lets you specify a regular expression to extract metadata. 45 | # To match the metadata, specify named groups in the expression. 46 | # 47 | # The following matching groups will be mapped to metadata: 48 | # - title 49 | # - spatial (shown as location in Opencast's user interface) 50 | # - created (extracted value must match the formatter below) 51 | # 52 | # Example: 53 | # filename: 2021-12-10-11-15 hs1 Biology 101.mp4 54 | # regular expression: (?....-..-..-..-..) (?[^ ]+) (?.+)\\.mp4 55 | # matched metadata: 56 | # created: 2021-12-10-11-15 57 | # spatial: hs1 58 | # title: Biology 101 59 | # 60 | # Default: <empty> 61 | #inbox.metadata.regex = 62 | 63 | # Date and time format of the matched `created` metadata field. 64 | # This value is used to parse the date-time value. 65 | # It must match in order to properly recognize the recording time. 66 | # 67 | # Documentation about the format can be found at: 68 | # https://www.baeldung.com/java-string-to-date#3-common-date-and-time-patterns 69 | # 70 | # Example: 71 | # 72 | # matched string: 2021-12-10-11-15 73 | # format: yyyy-MM-dd-HH-mm 74 | # result: 2021-12-10 11:15:00 75 | # 76 | # Default: <empty> 77 | #inbox.datetime.format = 78 | 79 | # Extract metadata via ffprobe 80 | # 81 | # If enabled, the inbox will use ffprobe to determine additional metadata like creation date and duration. 82 | # This will overwrite metadata possibly extracted from the filename. 83 | # Only metadata from the media container will be used. 84 | # 85 | # Default: false 86 | #inbox.metadata.ffprobe = false 87 | 88 | # Match scheduled events 89 | # 90 | # If this is turned on, Opencast will try matching inbox files to scheduled events. 91 | # This requires both the `created` and the `spatial` (capture agent id) metadata fields to match. 92 | # For details about matching see `inbox.metadata.regex` above. 93 | # 94 | # If `spatial` and `created` can identify exactly one scheduled event, the inbox will behave like a capture agent, 95 | # ingesting into the previously scheduled event, using all metadata and workflow configuration set when scheduling. 96 | # Metadata extracted from the filename and the default inbox workflows will be discarded. 97 | # 98 | # If ffprobe is used to extract a duration, events from the whole duration will be matched. 99 | # See next option for more control over what is being matched. 100 | # 101 | # If conditions are not met, files will still be ingested by creating a new event as usual. 102 | # 103 | # Default: false 104 | #inbox.schedule.match = false 105 | 106 | # Overlap match threshold 107 | # 108 | # By default, a recording will match all scheduled events in its duration. 109 | # This may lead to problems in some situations where events may start a little bit early 110 | # or run a little bit late. 111 | # 112 | # In the following example, the recording would match two scheduled events, 113 | # leading to an error and none of them being matched: 114 | # 115 | # |--Schedule A----| |--Schedule B----| 116 | # |--Event--------| 117 | # 118 | # To prevent such situations, you can define a threshold of how much overlap an event must have to count as a match. 119 | # This threshold is used *only* if multiple events are matched before the threshold is applied. 120 | # 121 | # Default: -1 (off) 122 | #inbox.schedule.match.threshold = 0.0 123 | -------------------------------------------------------------------------------- /rootfs/opencast/etc/org.opencastproject.organization-mh_default_org.cfg-clustered: -------------------------------------------------------------------------------- 1 | # Organization (tenant) definition. 2 | # 3 | # With Opencast being capable of hosting multiple tenants per installation, there needs 4 | # to be one organization configuration per tenant. 5 | # 6 | # Therefore, in order to add another tenant to the installation, put a file named 7 | # org.opencastproject.organization-<tenant id>.cfg into Opencast's "load" directory. 8 | # Make sure to adjust at least the following fields to properly map the new tenant to the 9 | # installation: 10 | # 11 | # - id 12 | # - prop.org.opencastproject.host.<server url> 13 | # - port 14 | # - prop.org.opencastproject.admin.ui.url 15 | # - prop.org.opencastproject.engage.ui.url 16 | # - prop.org.opencastproject.external.api.url 17 | # - prop.org.opencastproject.assetmanager.url 18 | # 19 | # 20 | 21 | # Identifier of the tenant on this Opencast installation. 22 | # 23 | # The identifier is used to map data that belongs to this tenant only as well as during 24 | # lookup of related configuration entities such as the security settings in etc/security. 25 | # 26 | # Value: a text identifier using [a-Z, 0..9, _, -] as characters. 27 | # 28 | id=mh_default_org 29 | 30 | # Name of the organization (tenant). 31 | # 32 | # Value: <text> 33 | # 34 | name=Opencast Project 35 | 36 | # Tenant-specific Host URL Mappings. 37 | 38 | # Map the internal host URL to the tenant-specific one for all nodes running Opencast services in your system. 39 | # 40 | # The usage of this is to map a request to a specific organization. For example, if admin-a.opencast.org is configured 41 | # as part of this organizations server list and an HTTP request uses this domain name, Opencast knows that the requests 42 | # belongs to this organization. 43 | # 44 | # Additionally these are used to map a host's internal URL to the tenant-specific URL in the endpoint 45 | # services/available. 46 | # 47 | # If multi-tenancy is not configured, you don't need to configure this either. 48 | # 49 | # The configuration needs to look like this: 50 | # prop.org.opencastproject.host.<org.opencastproject.server.url of node without scheme> = 51 | # <tenant-specific server url of node without scheme> 52 | # 53 | # Example Configuration: 54 | # 55 | # prop.org.opencastproject.host.admin-presentation.opencast.com=http://tenant1.admin-presentation.opencast.com 56 | # prop.org.opencastproject.host.ingest.opencast.com=https://tenant1.ingest.opencast.com 57 | # prop.org.opencastproject.host.worker.opencast.com=https://tenant1.worker.opencast.com:8433 58 | # 59 | # Important notices: 60 | # - Values read from here are stored in the database (table oc_organization_node) and will not be removed if a node is 61 | # removed from this list. 62 | # - Do not include schema or port in the URLs. 63 | # 64 | # Default: http://localhost:8080 65 | # prop.org.opencastproject.host.localhost = http://localhost:8080 66 | 67 | # Identifier of the Administrative role. 68 | # 69 | # Value: a text identifier using [a-Z, 0..9, _, -] as characters. 70 | # Default: ROLE_ADMIN 71 | # 72 | admin_role=ROLE_ADMIN 73 | 74 | # Identifier of the Anonymous role. 75 | # 76 | # Value: a text identifier using [a-Z, 0..9, _, -] as characters. 77 | # Default: ROLE_ANONYMOUS 78 | # 79 | anonymous_role=ROLE_ANONYMOUS 80 | 81 | # The base URL of the file server. When using a shared filesystem between servers, set all servers to use the same URL. 82 | # Only then will hard linking between the working file repository and the workspace be enabled to prevent downloads. 83 | # 84 | # Value: <a complete url with scheme and port> 85 | # Default: the value of ${org.opencastproject.server.url} 86 | # 87 | prop.org.opencastproject.file.repo.url={{PROP_ORG_OPENCASTPROJECT_FILE_REPO_URL}} 88 | 89 | # Link to the Admin UI. 90 | # 91 | # Value: <a complete url with scheme and port> 92 | # Default: ${org.opencastproject.server.url} 93 | # 94 | prop.org.opencastproject.admin.ui.url={{PROP_ORG_OPENCASTPROJECT_ADMIN_UI_URL}} 95 | 96 | ### 97 | # OAI-PMH 98 | 99 | # The host URL of the OAI-PMH server. Remember to omit the mount point since it is read 100 | # from custom.properties -> org.opencastproject.oaipmh.mountpoint 101 | prop.org.opencastproject.oaipmh.server.hosturl=${prop.org.opencastproject.engage.ui.url} 102 | 103 | # Link to the Opencast documentation. 104 | # 105 | # If the property is specified, the admin ui help menu will link to the documentation. 106 | # The value needs to be a URL if set. 107 | # Default: undefined 108 | prop.org.opencastproject.admin.help.documentation.url=https://docs.opencast.org 109 | 110 | # Link to the Opencast REST service documentation for the local system. 111 | # 112 | # If the property is specified, the admin ui help menu will link to the documentation. 113 | # The value needs to be a URL if set. 114 | # Default: undefined 115 | prop.org.opencastproject.admin.help.restdocs.url=/rest_docs.html 116 | 117 | # Link to the media module 118 | # 119 | # If the property is specified, the admin ui will show a media module icon on the top-right that links 120 | # to the media module. 121 | # The value needs to be a URL if set. 122 | # Default: undefined 123 | prop.org.opencastproject.admin.mediamodule.url=${prop.org.opencastproject.engage.ui.url}/engage/ui 124 | 125 | # Link to a feedback collector page. 126 | # 127 | # If the property is specified, a feedback button will appear in the lower right corner of the admin UI, linking 128 | # to the given URL. If it is not specified, no feedback button will be shown. 129 | # 130 | # Value: <a complete url with scheme and port> 131 | # 132 | #prop.org.opencastproject.admin.feedback.url= 133 | 134 | # Flag to display imprint and privacy in admin-UIs footer 135 | # 136 | # Value: <boolean> 137 | # Default: false 138 | # 139 | #prop.org.opencastproject.admin.display_about=false 140 | 141 | # Flag to display terms of use in admin UI 142 | # Value: <boolean> 143 | # Default: false 144 | # 145 | #prop.org.opencastproject.admin.display_terms=false 146 | 147 | # Link to the Engage UI. 148 | # 149 | # Value: <a complete url with scheme and port> 150 | # Default: ${org.opencastproject.server.url} 151 | # 152 | prop.org.opencastproject.engage.ui.url={{PROP_ORG_OPENCASTPROJECT_ENGAGE_UI_URL}} 153 | 154 | # Link to the External API 155 | # 156 | # Value: <a complete url with scheme and port> 157 | # Default: ${org.opencastproject.server.url} 158 | # 159 | #prop.org.opencastproject.external.api.url=http://localhost:8080 160 | 161 | # Link to the AssetManager base 162 | # 163 | # Value: <a complete url with scheme and port> 164 | # Default: ${org.opencastproject.server.url} 165 | # 166 | #prop.org.opencastproject.assetmanager.url=http://localhost:8080 167 | 168 | # Path to the default video player used by the engage interfaces and the LTI tools. Parameters for selecting the 169 | # specific videos will be appended automatically. Common values include: 170 | # 171 | # - paella player 7: /paella7/ui/watch.html?id=#{id} 172 | # 173 | # Default: /paella7/ui/watch.html?id=#{id} 174 | #prop.player=/paella7/ui/watch.html?id=#{id} 175 | 176 | # Whether the ACL of a new event is initialized with the ACL of its series. 177 | # 178 | # Format: Boolean 179 | # Default: true 180 | #prop.admin.init.event.acl.with.series.acl=true 181 | 182 | # Enable themes in the admin interface. 183 | # Format: boolean 184 | # Default: false 185 | #prop.admin.themes.enabled=false 186 | 187 | # Enable the sttatistics views in the admin intterface. 188 | # Format: boolean 189 | # Default: false 190 | #prop.admin.statistics.enabled=false 191 | -------------------------------------------------------------------------------- /rootfs/opencast/etc/org.ops4j.pax.logging.cfg: -------------------------------------------------------------------------------- 1 | # Colors for log level rendering 2 | color.fatal = bright red 3 | color.error = bright red 4 | color.warn = bright yellow 5 | color.info = bright green 6 | color.debug = cyan 7 | color.trace = cyan 8 | 9 | # Common pattern layout for appenders 10 | # see: https://logging.apache.org/log4j/2.x/manual/layouts.html#Patterns 11 | log4j2.pattern = %d{ISO8601} | %-5.5p | (%C{1}:%L) - %m%n 12 | 13 | # Root logger 14 | log4j2.rootLogger.level = WARN 15 | log4j2.rootLogger.appenderRef.PaxOsgi.ref = PaxOsgi 16 | log4j2.rootLogger.appenderRef.Console.ref = Console 17 | 18 | # Loggers configuration 19 | 20 | # Loglevel configuration for all opencast modules. Usually, INFO is a quite sane log level. If you need a different 21 | # detail level of logs, you can adjust this to: ERROR, WARN, INFO, DEBUG, TRACE. 22 | log4j2.logger.opencast.name = org.opencastproject 23 | log4j2.logger.opencast.level = INFO 24 | 25 | # You can specify different log levels for different packages/modules by specifying their package component names. For 26 | # example, to raise the log level to DEBUG for the rest endpoints contained in the kernel module, set: 27 | #log4j2.logger.ingest.name = org.opencastproject.ingest 28 | #log4j2.logger.ingest.level = DEBUG 29 | 30 | # For Karaf, Felix & CXF, we want to see some more details in the logs 31 | log4j2.logger.karaf.name = org.apache.karaf 32 | log4j2.logger.karaf.level = WARN 33 | log4j2.logger.felix.name = org.apache.felix 34 | log4j2.logger.felix.level = WARN 35 | log4j2.logger.cxf.name = org.apache.cxf 36 | log4j2.logger.cxf.level = WARN 37 | 38 | # Appenders configuration 39 | 40 | # Console appender used in containers 41 | log4j2.appender.console.type = Console 42 | log4j2.appender.console.name = Console 43 | log4j2.appender.console.layout.type = PatternLayout 44 | log4j2.appender.console.layout.pattern = ${log4j2.pattern} 45 | 46 | # OSGi appender 47 | log4j2.appender.osgi.type = PaxOsgi 48 | log4j2.appender.osgi.name = PaxOsgi 49 | log4j2.appender.osgi.filter = * 50 | -------------------------------------------------------------------------------- /rootfs/opencast/etc/org.ops4j.pax.web.cfg: -------------------------------------------------------------------------------- 1 | ### 2 | # OPS4J Pax Web Configuration 3 | ## 4 | 5 | # See https://ops4j1.jira.com/wiki/display/paxweb/Basic+Configuration for more details 6 | 7 | 8 | # This property specifies the comma separated list of addresses used by Opencast to listen to (e.g. localhost or 9 | # localhost,10.0.0.1). Host names or IP addresses can be used. Pax Web default value is "0.0.0.0". 10 | org.ops4j.pax.web.listening.addresses=0.0.0.0 11 | 12 | # The HTTP server port. 13 | # You may want to keep this on port 8080 but add an HTTP server like the Apache httpd or Nginx as reverse proxy so that 14 | # users can access Opencast using port 80 (HTTP default). 15 | org.osgi.service.http.port=8080 16 | 17 | # This property specifies if the HTTP is enabled. If "true" the support for HTTP access will be enabled. If "false" the 18 | # support for HTTP access will be disabled. Default value is "true". 19 | org.osgi.service.http.enabled=true 20 | 21 | # Whether Opencast itself should handle HTTPS traffic. 22 | # Even if you set this to 'false',you can still use an HTTP proxy to handle SSL. 23 | org.osgi.service.http.secure.enabled=false 24 | 25 | # The secure server port to use if running Opencast with HTTPS (as opposed to a proxy handling HTTPS). 26 | org.osgi.service.http.port.secure=8443 27 | 28 | # Path to the keystore file. 29 | # Use the Java `keytool` to generate this file. 30 | # Example: 31 | # keytool -genkey -keyalg RSA -validity 365 -alias serverkey \ 32 | # -keypass password -storepass password -keystore keystore.jks 33 | org.ops4j.pax.web.ssl.keystore=${karaf.etc}/keystore.jks 34 | 35 | # Password used for keystore. 36 | org.ops4j.pax.web.ssl.keystore.password=password 37 | 38 | # Password for private key entry inside server keystore. 39 | org.ops4j.pax.web.ssl.key.password=password 40 | 41 | 42 | 43 | # Custom jetty config file. Uncomment this if necessary to configure the jetty http connector idleTimeout value (MH-12329) 44 | # Adjust the settings in the file below to match the listening address and port settings above. 45 | #org.ops4j.pax.web.config.file=${karaf.etc}/jetty-opencast.xml 46 | 47 | # Session cookie HTTPS flag 48 | # Set to true if Opencast handling HTTPS or behind a proxy handling HTTPS, default false 49 | #org.ops4j.pax.web.session.cookie.secure=false 50 | 51 | # Prevent cookie from being accessed by client side scripts, default false 52 | org.ops4j.pax.web.session.cookie.httpOnly=true 53 | 54 | # Timeout for user sessions in seconds 55 | # Note: This is seconds, not minutes due to a bug in Pax Web: 56 | # https://github.com/opencast/opencast/issues/6260 57 | # 14400 seconds = 240 minutes = 4 hours 58 | org.ops4j.pax.web.session.timeout=14400 59 | -------------------------------------------------------------------------------- /scripts/release: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | # go to repository root 6 | ROOT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd )" 7 | cd "${ROOT_DIR}" 8 | 9 | # compatibility with BSD and GNU style sed 10 | sedi() { 11 | case $(uname -s) in 12 | *[Dd]arwin* | *BSD*) sed -i '' -e "$@" ;; 13 | *) sed -i "$@" ;; 14 | esac 15 | } 16 | 17 | # arguments 18 | if [ "$#" -ne 3 ]; then 19 | echo "illegal number of arguments: release-prepare [OPENCAST_VERSION] [VERSION] [VERSION_MAJOR]" 20 | exit 1 21 | fi 22 | 23 | OPENCAST_VERSION_TO="${1}" 24 | VERSION_FROM="$(cat VERSION)" 25 | VERSION_TO="${2}" 26 | VERSION_MAJOR_TO="${3}" 27 | 28 | # prepare release 29 | echo "${OPENCAST_VERSION_TO}" > VERSION_OPENCAST 30 | echo "${VERSION_MAJOR_TO}" > VERSION_MAJOR 31 | for f in $(grep "${VERSION_FROM}" . -lr --exclude-dir .git); do 32 | sedi "s/${VERSION_FROM}/${VERSION_TO}/g" "$f" 33 | done 34 | 35 | # create release branch 36 | git checkout -b "${VERSION_TO}" 37 | git add --all 38 | git commit -m "Update Opencast to v${OPENCAST_VERSION_TO}" 39 | 40 | # 41 | echo 42 | echo "Run 'git push' to publish release branch '${VERSION_TO}'." 43 | echo "Make sure to update '.github/workflows/cron.yml' in the 'main' branch." 44 | --------------------------------------------------------------------------------