Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Feature/stand alone docker image #98

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
c2da9d3
Merge commit '3ca11c1db05b8f6e4b254ab6c8ae9a04ca0750b6' into feature/…
slabajo Sep 20, 2024
035662c
module videosampler
slabajo Oct 17, 2024
003f29f
add timestamp to grpc request
slabajo Oct 18, 2024
b18c350
write grpc received frmaes to file in tests
slabajo Oct 18, 2024
a09398b
optimize pipeline
slabajo Oct 18, 2024
bee4060
remove fix GST_DEBUG
slabajo Oct 18, 2024
9f97dd5
initial changelog
slabajo Oct 18, 2024
709d65b
fix dependencies
slabajo Oct 18, 2024
43ecebe
videosampler module
slabajo Oct 18, 2024
07a02d0
fix artifact generation
slabajo Oct 21, 2024
cf76b6d
Merge branch 'feature/video-sampler' into feature/module-extras
slabajo Oct 21, 2024
758ee52
fix debian package
slabajo Oct 22, 2024
7785a6c
Merge branch 'feature/video-sampler' into feature/module-extras
slabajo Oct 22, 2024
892b149
fix debian package name
slabajo Oct 22, 2024
7746dac
Merge commit '892b14994db26374be3845a501315d1046573ffa' into feature/…
slabajo Oct 22, 2024
80f70d7
fix auto dependencies
slabajo Oct 22, 2024
2efaea3
Merge commit '80f70d7ca3afd2725140512360f7f5f7386cbdad' into feature/…
slabajo Oct 22, 2024
6655377
fix workflow order
slabajo Oct 22, 2024
935ed77
Add module-extras to build process
slabajo Oct 22, 2024
63e5452
temporary fix for testing
slabajo Oct 22, 2024
ca64e73
fix dockerfile
slabajo Oct 23, 2024
d6923b7
add extras to client generation
slabajo Oct 23, 2024
f2e3a7e
fix extras image tag
slabajo Oct 23, 2024
c9948d8
revert temporal fix
slabajo Oct 23, 2024
6b4757c
add javascript module extras generation
slabajo Oct 23, 2024
70e8129
fix tag generation
slabajo Oct 23, 2024
2cf3005
fix base image name
slabajo Oct 23, 2024
fd7e248
Merge commit 'aca0f6ea4e33da0dab004011fcc0f8f377792b36' into feature/…
slabajo Oct 24, 2024
d7081a0
update docs
slabajo Oct 24, 2024
6404d96
Merge commit '52188543f3572c8ef7e313f85e18a0a4a0be98df' into feature/…
slabajo Nov 6, 2024
c5e5c04
Merge commit '011d53dc468f0951455ec38fb4f6b97d16e48017' into feature/…
slabajo Nov 6, 2024
44ac79f
Merge commit '35090f1c8c41fdf6a2f7d5f9546bd47fbab80bf5' into feature/…
slabajo Nov 12, 2024
1f83c15
Merge commit '63d3515a747152a5cf2df2a165bf93595b94bf49' into feature/…
slabajo Nov 12, 2024
6c2e42a
Merge commit '3dcbcd478b4a095c38db16ee7d8345e402ae46ec' into feature/…
slabajo Nov 12, 2024
77e5391
docker image creation script
slabajo Jan 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
ARG VARIANT="noble"
FROM mcr.microsoft.com/devcontainers/base:${VARIANT}
#FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}

ENV DEBIAN_FRONTEND=noninteractive

# [Optional] Uncomment this section to install additional OS packages.
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends <your-package-list-here>
RUN apt update && apt install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
git \
gnupg \
gdb

#RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5AFA7A83

#COPY repo_cfg /tmp

#RUN bash -c "source /etc/upstream-release/lsb-release 2>/dev/null || source /etc/lsb-release "
#RUN tee "/etc/apt/sources.list.d/kurento.list" >/dev/null < /tmp/repo_cfg \
# && rm /tmp/repo_cfg && apt update

#RUN apt install -y --no-install-recommends \
# kurento-media-server-dev

RUN apt update && apt install -y --no-install-recommends \
maven pkg-config libjsoncpp-dev libboost-dev libboost-test-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev gstreamer1.0-x libgstreamer1.0-0 libgstreamer1.0-dev libvpx-dev \
gstreamer1.0-libav gstreamer1.0-nice gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-good gstreamer1.0-tools libgstreamer-gl1.0-0 libgstreamer-opencv1.0-0 libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-bad1.0-dev libgstreamer-plugins-base1.0-0 libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-0 libgstreamer-plugins-good1.0-dev \
libsigc++-2.0-dev libglibmm-2.4-dev libsoup2.4-dev libsoup2.4-1 libnice-dev libnice10 libboost-program-options-dev libboost-log-dev libevent-dev libevent-2.1-7 libevent-core-2.1-7 libevent-extra-2.1-7 libevent-openssl-2.1-7 libevent-pthreads-2.1-7 \
libwebsocketpp-dev ffmpeg

RUN apt install -y devscripts git-buildpackage equivs

RUN wget https://download.java.net/java/GA/jdk22.0.1/c7ec1332f7bb44aeba2eb341ae18aca4/8/GPL/openjdk-22.0.1_linux-x64_bin.tar.gz

RUN tar xvf openjdk-22.0.1_linux-x64_bin.tar.gz

RUN mv jdk-22.0.1 /usr/lib/jvm

RUN update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-22.0.1/bin/javac 2211
RUN update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-22.0.1/bin/java 2211

RUN rm openjdk-22.0.1_linux-x64_bin.tar.gz

RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -

RUN apt install -y nodejs

RUN node --dns-result-order=ipv4first /usr/bin/npm install -g bower


# Ensure sudo group users are not
# asked for a password when using
# sudo command by ammending sudoers file
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> \
/etc/sudoers
58 changes: 58 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
//"image": "mcr.microsoft.com/devcontainers/base:focal",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: hirsute, focal, bionic
// Use hirsute or bionic on local arm64/Apple Silicon.
"args": { "VARIANT": "noble" }
},

"features": {
"ghcr.io/devcontainers-contrib/features/actions-runner:1": {
"version": "latest",
"dotnetVersion": "latest"
}
},


// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"tintinweb.graphviz-interactive-preview",
"shd101wyy.markdown-preview-enhanced",
"vscjava.vscode-java-pack",
"vscjava.vscode-maven",
"ms-vscode.cpptools-themes",
"ms-azuretools.vscode-docker",
"ms-vscode.cpptools",
"twxs.cmake",
"ms-vscode.cmake-tools",
"mhutchie.git-graph",
"austin.code-gnu-global",
"fabiospampinato.vscode-git-history",
"ms-vscode.cpptools-extension-pack"
],


"mounts": [
"source=${localEnv:HOME}/.ssh,target=/home/ubuntu/.ssh,type=bind,consistency=cached"
]

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
"remoteUser": "ubuntu"
}
2 changes: 2 additions & 0 deletions .devcontainer/repo_cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Kurento Media Server - Nightly packages
deb [arch=amd64] http://ubuntu.openvidu.io/7.0.0 focal main
10 changes: 10 additions & 0 deletions .github/workflows/clients-java.parent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@ jobs:
runnerGroup: ${{ inputs.runnerGroup }}
secrets: inherit

module-videosampler:
needs: ["client"]
uses: "./.github/workflows/clients-java.child.yaml"
with:
directory: "server/module-extras/video-sampler/"
genModuleEnable: true
genModuleServerVersion: "${{ inputs.jobServerVersion }}"
runnerGroup: ${{ inputs.runnerGroup }}
secrets: inherit

# Unavailable since Kurento 7.0.0
#module-markerdetector:
# needs: ["client"]
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/clients-javascript.parent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ jobs:
runnerGroup: ${{ inputs.runnerGroup }}
secrets: inherit

module-videosampler:
uses: "./.github/workflows/clients-javascript.child.yaml"
with:
jobRelease: ${{ inputs.jobRelease }}
directory: "server/module-extras/video-sampler/"
genModuleEnable: true
genModuleServerVersion: "${{ inputs.jobServerVersion }}"
runnerGroup: ${{ inputs.runnerGroup }}
secrets: inherit

#module-markerdetector:
# needs: ["client"]

Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/server-deploy-docker.child.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,17 @@ jobs:
working-directory: "docker/kurento-media-server/"
run: "ci_job_deploy_docker.sh"

- name: "Run job script (modules extras)"
env:
JOB_DISTRO: "${{ matrix.jobDistro }}"
JOB_RELEASE: "${{ inputs.jobRelease }}"
JOB_DEPLOY_NAME: "${{ inputs.jobDeployName }}"
PACKAGES_PATH: "${{ steps.copy-artifacts.outputs.download-path }}"
KURENTO_DOCKERHUB_USERNAME: "${{ secrets.KURENTO_DOCKERHUB_USERNAME }}"
KURENTO_DOCKERHUB_TOKEN: "${{ secrets.KURENTO_DOCKERHUB_TOKEN }}"
working-directory: "docker/kurento-media-server-extras/"
run: "ci_job_deploy_docker.sh"

- name: "Run job script (AddressSanitizer)"
if: ${{ inputs.buildAsan }}
env:
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/server.parent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,19 @@ jobs:
runnerGroup: ${{ inputs.runnerGroup }}
directory: "server/module-examples/datachannelexample/"

module-videosampler:
needs: ["module-filters"]
uses: "./.github/workflows/server-buildpackage.child.yaml"
with:
jobDistros: "${{ inputs.jobDistros }}"
jobGitName: "${{ inputs.jobGitName }}"
jobGitNameFallback: "${{ inputs.jobGitNameFallback }}"
jobRelease: ${{ inputs.jobRelease }}
runnerGroup: ${{ inputs.runnerGroup }}
directory: "server/module-extras/video-sampler/"

deploy-deb:
needs: ["media-server", "module-chroma", "module-datachannelexample"]
needs: ["media-server", "module-chroma", "module-datachannelexample", "module-videosampler"]
uses: "./.github/workflows/server-deploy-debian.child.yaml"
with:
jobDistros: "${{ inputs.jobDistros }}"
Expand Down
2 changes: 2 additions & 0 deletions ci-scripts/ci_job_deploy_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ export PUSH_IMAGES="yes"
BUILD_ARGS=""
BUILD_ARGS+=" UBUNTU_CODENAME=$JOB_DISTRO"
BUILD_ARGS+=" KMS_VERSION=$DOCKER_KMS_VERSION"
KMS_VERSION_TAG=$(echo $DOCKER_KMS_VERSION | tr '/' '_')
BUILD_ARGS+=" KMS_VERSION_TAG=$KMS_VERSION_TAG"
export BUILD_ARGS
export TAG_COMMIT="no"
if [[ "$JOB_RELEASE" == "true" ]]; then
Expand Down
78 changes: 78 additions & 0 deletions docker/kurento-media-server-extras/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# ====================
# Kurento Media Server (modules extras)
# ====================
#
# This Docker image is used to run an instance of Kurento Media Server with modules-extras packages added
#
#
#
# Build Command
# =============
#
# Run:
#
# docker build [Args...] --tag kurento/kurento-media-server-extras:latest .
#
#
#
# Build Arguments
# ---------------
#
# --build-arg KMS_VERSION=<KmsVersion>
#
# <KmsVersion> is like "7.0.0".
# Alternatively, "dev" is used to build a nightly version of Kurento.
#
# Optional. Default: "dev".
#
# --build-arg APT_ARGS=<AptArguments>
#
# <AptArguments> is a string with arguments that will be passed to all
# executions of `apt-get`.
#
# Example: To Use an Apt package proxy
# Doc: http://manpages.ubuntu.com/manpages/man1/apt-transport-http.1.html#options
#
# APT_ARGS='-o Acquire::http::Proxy=http://user:pass@host:port/'
#
# Optional. Default: None.
#
#
#
# Run Command
# ===========
#
# Run:
#
# docker run --name kurento --network host kurento/kurento-media-server-extras:latest
#
# Then, you can follow the logs with the `docker logs` command:
#
# docker logs --follow kms >"kms-$(date '+%Y%m%dT%H%M%S').log" 2>&1


# Global arguments for FROM.
ARG KMS_VERSION_TAG="latest"


FROM kurento/kurento-media-server:${KMS_VERSION_TAG}

LABEL maintainer="Saúl Pablo Labajo Izquierdo <[email protected]>"

# Configure environment:
# Run apt-get/dpkg without interactive dialogue.
ARG DEBIAN_FRONTEND=noninteractive
# Set the default locale for all commands.
ENV LANG="C.UTF-8"

# Install extra modules.
# These might not be all available, so install separately and allow errors.
RUN \
apt-get $APT_ARGS update \
&& for PACKAGE in \
kurento-module-videosampler ; \
do \
apt-get $APT_ARGS install --no-install-recommends --yes "$PACKAGE" || true ; \
done \
&& rm -rf /var/lib/apt/lists/*

2 changes: 2 additions & 0 deletions docker/kurento-media-server-extras/version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
image:
name: kurento/kurento-media-server-extras
Loading