Skip to content
This repository was archived by the owner on Nov 11, 2024. It is now read-only.

Commit 4765b23

Browse files
author
Pengfei Qu
committed
2 parents 7439011 + a7ef410 commit 4765b23

File tree

16 files changed

+56
-46
lines changed

16 files changed

+56
-46
lines changed

README.md

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,6 @@
55
[![License](https://img.shields.io/badge/license-BSD_3_Clause-green.svg)](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/blob/master/LICENSE)
66
[![Contributions](https://img.shields.io/badge/contributions-welcome-blue.svg)](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki)
77

8-
Table of Contents
9-
=================
10-
* [Open Visual Cloud CDN Transcode Sample](#open-visual-cloud-cdn-transcode-sample)
11-
* [Architecture](#architecture)
12-
* [What's in this project](#whats-in-this-project)
13-
* [System requirements](#system-requirements)
14-
* [Operating system](#operating-system)
15-
* [How to setup The CDN Transcode Sample](#how-to-setup-the-cdn-transcode-sample)
16-
* [Setup the CDN Transcode Sample OS environment(Both of master and slave nodes)](#setup-the-cdn-transcode-sample-os-environmentboth-of-master-and-slave-nodes)
17-
* [Install ubuntu18.04.2/CentOS 7.6](#install-ubuntu18042centos-76)
18-
* [Setup CDN environment(Both of master and slave nodes)](#setup-cdn-environmentboth-of-master-and-slave-nodes)
19-
* [Install the third-party dependency Libraries and tools](#install-the-third-party-dependency-libraries-and-tools)
20-
* [Setup docker proxy as follows if you are behind a firewall](#setup-docker-proxy-as-follows-if-you-are-behind-a-firewall)
21-
* [Build(Both of master and slave nodes)](#buildboth-of-master-and-slave-nodes)
22-
* [Deploy](#deploy)
23-
* [Auto deployment using Kubernetes](#auto-deployment-using-kubernetes)
24-
* [See Also](#see-also)
25-
268
The CDN Transcode Sample is an Open Visual Cloud software stack with all required open source ingredients well integrated to provide out-of-box CDN media transcode service, including live streaming and video on demand. It also provides Docker-based media delivery software development environment upon which developer can easily build their specific applications.
279

2810
# Architecture
@@ -31,30 +13,15 @@ The sample implements a reference server-side transcode system over CDN infrastr
3113

3214
<IMG src="doc/CDN-Transcode-Sample-Arch.png" height="450">
3315

34-
# What's in this project
35-
The CDN Transcode Sample contains below components:
36-
- Dockerfiles
37-
- Python web services source code
38-
- BASH glue scripts
39-
- HTML web pages
40-
- CMakefiles
41-
- Configuration files
42-
- Documents
43-
4416
# System requirements
4517
## Operating system
4618
The CDN Transcode Sample may run on Linux* 64 bit operating systems. The list below represents the operating systems that the transcode application and library were tested and validated on:
4719
- Ubuntu* 18.04.2 Server LTS
4820
- CentOS* 7.6
4921

5022
# How to setup The CDN Transcode Sample
51-
## Setup the CDN Transcode Sample OS environment(Both of master and slave nodes)
52-
Install Ubuntu 18.04.2/CentOS 7.6 on CDN-Transcode Server, and configure the IP address & proxy properly.
53-
### Install ubuntu18.04.2/CentOS 7.6
54-
- [Download Ubuntu and Install](https://ubuntu.com/download)
55-
- [Download CentOS and install](https://www.centos.org/download/)
5623

57-
## Setup CDN environment(Both of master and slave nodes)
24+
## Setup CDN environment
5825
### Install the third-party dependency Libraries and tools
5926
```
6027
sudo -E ./script/install_dependency.sh
@@ -66,7 +33,7 @@ printf "[Service]\nEnvironment=\"HTTPS_PROXY=$https_proxy\" \"NO_PROXY=$no_proxy
6633
sudo systemctl daemon-reload
6734
sudo systemctl restart docker
6835
```
69-
## Build(Both of master and slave nodes)
36+
## Build
7037

7138
Run below commands to build docker images
7239
```
@@ -88,10 +55,9 @@ To deploy without a private registry, run `make update` after each build to push
8855
## Deploy
8956
### Auto deployment using Kubernetes
9057

91-
**Tips:** It divides into two parts: master or slave ones
92-
- [Setup Kubernetes master environment for CentOS](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Setup-Kubernetes-master-environment-for-CentOS)
93-
- [Setup Kubernetes master environment for Ubuntu](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Setup-Kubernetes-master-environment-for-Ubuntu)
94-
- [Setup Kubernetes slave environment](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Setup-Kubernetes-slave-environment)
58+
**Tips:** It divides into two parts:
59+
- [Setup Kubernetes for CentOS](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Setup-Kubernetes-for-CentOS)
60+
- [Setup Kubernetes for Ubuntu](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Setup-Kubernetes-for-Ubuntu)
9561
- [Setup NFS environment](https://github.com/OpenVisualCloud/CDN-Transcode-Sample/wiki/Setup-NFS-environment)
9662

9763
Start CDN transcode service

cdn-server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
FROM openvisualcloud/xeon-ubuntu1804-media-nginx:20.3.1
2+
FROM openvisualcloud/xeon-ubuntu1804-media-nginx:20.7
33

44
Run DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y -q --no-install-recommends python3-setuptools python3-redis python-celery-common python3-tornado python3-kafka python3-kazoo openssh-server && rm -rf /var/lib/apt/lists/*
55

deployment/docker-swarm/docker-compose.yml.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ services:
77
restart: always
88
deploy:
99
replicas: 1
10+
user: redis
1011
command:
1112
redis-server
1213

@@ -20,12 +21,13 @@ services:
2021
ZOOKEEPER_MAX_CLIENT_CNXNS: '20000'
2122
ZOOKEEPER_LOG4J_LOGGERS: 'zookeepr=ERROR'
2223
ZOOKEEPER_LOG4J_ROOT_LOGLEVEL: 'ERROR'
24+
user: zookeeper
2325
restart: always
2426
deploy:
2527
replicas: 1
2628

2729
kafka-service:
28-
image: wurstmeister/kafka:latest
30+
image: defn(`REGISTRY_PREFIX')ovc_kafka_service:latest
2931
depends_on:
3032
- zookeeper-service
3133
environment:
@@ -45,6 +47,7 @@ services:
4547
KAFKA_HEAP_OPTS: '-Xmx1024m -Xms1024m'
4648
KAFKA_LOG4J_LOGGERS: 'kafka=ERROR,kafka.controller=ERROR,state.change.logger=ERROR,org.apache.kafka=ERROR'
4749
KAFKA_LOG4J_ROOT_LOGLEVEL: 'ERROR'
50+
user: kafka
4851
restart: always
4952
deploy:
5053
replicas: 1

deployment/kubernetes/helm/cdn-transcode/templates/kafka-service-deployment.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,12 @@ spec:
4848
value: "1"
4949
- name: KAFKA_ZOOKEEPER_CONNECT
5050
value: zookeeper-service:2181
51-
image: wurstmeister/kafka:latest
51+
image: {{ $.Values.registryPrefix }}ovc_kafka_service:latest
52+
imagePullPolicy: IfNotPresent
5253
name: kafka-service
5354
ports:
5455
- containerPort: 9092
56+
securityContext:
57+
runAsUser: 1000
5558
restartPolicy: Always
59+

deployment/kubernetes/helm/cdn-transcode/templates/redis-service-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ spec:
1919
- args:
2020
- redis-server
2121
image: redis:latest
22+
imagePullPolicy: IfNotPresent
2223
name: redis-service
2324
ports:
2425
- containerPort: 6379
26+
securityContext:
27+
runAsUser: 999
2528
restartPolicy: Always

deployment/kubernetes/helm/cdn-transcode/templates/zookeeper-service-deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ spec:
3232
- name: ZOOKEEPER_TICK_TIME
3333
value: "2000"
3434
image: zookeeper:latest
35+
imagePullPolicy: IfNotPresent
3536
name: zookeeper-service
3637
ports:
3738
- containerPort: 2181
39+
securityContext:
40+
runAsUser: 1000
3841
restartPolicy: Always

deployment/kubernetes/yaml/kafka-deploy.yaml.m4

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ spec:
2020
enableServiceLinks: false
2121
containers:
2222
- name: kafka
23-
image: wurstmeister/kafka:2.12-2.4.0
23+
image: defn(`REGISTRY_PREFIX')ovc_kafka_service:latest
2424
imagePullPolicy: IfNotPresent
2525
ports:
2626
- containerPort: 9092
@@ -53,6 +53,8 @@ spec:
5353
value: "`-Xmx'defn(`KAFKA_MEMORY')m -`Xms'defn(`KAFKA_MEMORY')m"
5454
- name: "KAFKA_LOG4J_ROOT_LOGLEVEL"
5555
value: "ERROR"
56+
securityContext:
57+
runAsUser: 1000
5658
resources:
5759
requests:
5860
cpu: defn(`KAFKA_CPU')

deployment/kubernetes/yaml/redis-deploy.yaml.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ spec:
2525
- redis-server
2626
ports:
2727
- containerPort: 6379
28+
securityContext:
29+
runAsUser: 999
2830
resources:
2931
requests:
3032
cpu: defn(`REDIS_CPU')

deployment/kubernetes/yaml/zookeeper-deploy.yaml.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ spec:
3333
value: "1"
3434
- name: "ZOO_LOG4J_PROP"
3535
value: "ERROR"
36+
securityContext:
37+
runAsUser: 1000
3638
resources:
3739
requests:
3840
cpu: defn(`ZOOKEEPER_CPU')

kafka/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
set(service "ovc_kafka_service")
2+
include("${CMAKE_SOURCE_DIR}/script/service.cmake")

0 commit comments

Comments
 (0)