add local and remote cdn -- Infosys
Change-Id: I0f74ed33bbf9ca3434037a3dabf8bcdc3764a0bc
diff --git a/mcord/mcord-cdn-remote/Chart.yaml b/mcord/mcord-cdn-remote/Chart.yaml
new file mode 100644
index 0000000..c6685a2
--- /dev/null
+++ b/mcord/mcord-cdn-remote/Chart.yaml
@@ -0,0 +1,21 @@
+---
+# Copyright 2018-present Open Networking Foundation
+# Copyright 2018 Intel Corporation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for MCORD CDN Services in Remote cloud
+name: mcord-cdn-remote
+version: 0.1.1
diff --git a/mcord/mcord-cdn-remote/templates/cm.yaml b/mcord/mcord-cdn-remote/templates/cm.yaml
new file mode 100644
index 0000000..d2a098d
--- /dev/null
+++ b/mcord/mcord-cdn-remote/templates/cm.yaml
@@ -0,0 +1,24 @@
+---
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: wowza-config
+ namespace: {{ .Values.namespace }}
+data:
+ wowza_config.sh: |+
+ #!/bin/bash
+ echo "start"
\ No newline at end of file
diff --git a/mcord/mcord-cdn-remote/templates/remote-vlc.yaml b/mcord/mcord-cdn-remote/templates/remote-vlc.yaml
new file mode 100644
index 0000000..b352bc1
--- /dev/null
+++ b/mcord/mcord-cdn-remote/templates/remote-vlc.yaml
@@ -0,0 +1,74 @@
+---
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: remote-vlc
+spec:
+ selector:
+ app: remote-vlc
+ clusterIP: None
+ ports:
+ - name: vlc
+ port: {{ .Values.remote_vlc.ports.vlc }}
+ protocol: TCP
+ - name: http
+ port: {{ .Values.remote_vlc.ports.http }}
+ protocol: TCP
+
+---
+apiVersion: apps/v1
+kind: StatefulSet
+metadata:
+ name: remote-vlc
+ namespace: {{ .Values.namespace }}
+ labels:
+ name: remote-vlc
+ app: remote-vlc
+spec:
+ replicas: {{ .Values.remote_vlc.replicas }}
+ selector:
+ matchLabels:
+ app: remote-vlc
+ serviceName: "remote-vlc"
+ template:
+ metadata:
+ labels:
+ app: remote-vlc
+ name: remote-vlc
+ spec:
+ hostNetwork: true
+ terminationGracePeriodSeconds: 1
+ nodeSelector:
+ remote-vlc: remote-vlc
+ containers:
+ - name: streaming
+ image: {{ .Values.remote_vlc.images.remote_vlc_image }}
+ imagePullPolicy: IfNotPresent
+ ports:
+ - containerPort: {{ .Values.remote_vlc.ports.vlc }}
+ - containerPort: {{ .Values.remote_vlc.ports.http }}
+ stdin: true
+ tty: true
+ command: [ "bash", "-xc"]
+ args:
+ - sed -i 's/geteuid/getppid/' /usr/bin/vlc;
+ cvlc larva_360p.mp4 --sout "#transcode{vcodec=h264,acodec=mpga,ab=128,channels=2,samplerate=44100}:rtp{dst=0.0.0.0,port={{ .Values.remote_vlc.ports.vlc }},mux=ts,sap,name=Test}" --sout-keep --loop --ttl 10 --mtu 1200;
+ resources:
+ limits:
+ cpu: {{ .Values.remote_vlc.resources.cpu }}
+ memory: {{ .Values.remote_vlc.resources.mem }}
\ No newline at end of file
diff --git a/mcord/mcord-cdn-remote/templates/wowza.yaml b/mcord/mcord-cdn-remote/templates/wowza.yaml
new file mode 100644
index 0000000..4db08ed
--- /dev/null
+++ b/mcord/mcord-cdn-remote/templates/wowza.yaml
@@ -0,0 +1,119 @@
+---
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: wowza
+spec:
+ selector:
+ app: wowza
+ clusterIP: None
+ ports:
+ - name: rtmp-port
+ protocol: TCP
+ port: {{ .Values.wowza.ports.rtmp }}
+ - name: streammanager-port
+ protocol: TCP
+ port: {{ .Values.wowza.ports.streammanager }}
+ - name: rest-port
+ protocol: TCP
+ port: {{ .Values.wowza.ports.rest }}
+ - name: webui-port
+ protocol: TCP
+ port: {{ .Values.wowza.ports.webui }}
+
+---
+apiVersion: apps/v1beta1
+kind: StatefulSet
+metadata:
+ name: wowza
+ namespace: {{ .Values.namespace }}
+spec:
+ serviceName: wowza
+ replicas: 1
+ template:
+ metadata:
+ labels:
+ name: wowza
+ app: wowza
+ spec:
+ hostNetwork: true
+ terminationGracePeriodSeconds: 0
+ imagePullSecrets:
+ - name: nexus-docker-secret
+ nodeSelector:
+ wowza: wowza
+ initContainers:
+ - name: "wowza-init"
+ image: {{ .Values.wowza.images.wowza_image }}
+ imagePullPolicy: IfNotPresent
+ args:
+ - cp /config/*.sh /shared-vol
+ command:
+ - "/bin/bash"
+ - "-c"
+ volumeMounts:
+ - name: "shared-volume"
+ mountPath: "/shared-vol"
+ - name: "wowza-conf"
+ mountPath: "/config"
+ containers:
+ - name: wowza
+ image: {{ .Values.wowza.images.wowza_image }}
+ imagePullPolicy: IfNotPresent
+ args:
+ - chmod a+x /config/*.sh;/config/wowza_config.sh;/sbin/entrypoint.sh
+ command:
+ - "/bin/bash"
+ - "-c"
+ tty: true
+ securityContext:
+ privileged: true
+ env:
+ - name: WSE_MGR_USER
+ value: wowza
+ - name: WSE_MGR_PASS
+ value: wowza
+ - name: WSE_LIC
+ value: ET1E4-bze6X-EpP8Z-EF3ZQ-ABhdM-hrJDZ-8bG9dcbA9Hkm
+ - name: WSE_IP_PARAM
+ valueFrom:
+ fieldRef:
+ fieldPath: spec.nodeName
+ ports:
+ - containerPort: {{ .Values.wowza.ports.rtmp }}
+ - containerPort: {{ .Values.wowza.ports.streammanager }}
+ - containerPort: {{ .Values.wowza.ports.rest }}
+ - containerPort: {{ .Values.wowza.ports.webui }}
+ volumeMounts:
+ - name: wowza-logs
+ mountPath: /usr/local/WowzaStreamingEngine/logs
+ readOnly: false
+ - name: shared-volume
+ mountPath: /config
+ volumes:
+ - name: wowza-logs
+ hostPath:
+ path: /var/log
+ - name: wowza-conf
+ configMap:
+ name: wowza-config
+ items:
+ - key: wowza_config.sh
+ path: wowza_config.sh
+ - name: shared-volume
+ emptyDir: {}
diff --git a/mcord/mcord-cdn-remote/values.yaml b/mcord/mcord-cdn-remote/values.yaml
new file mode 100644
index 0000000..aff0755
--- /dev/null
+++ b/mcord/mcord-cdn-remote/values.yaml
@@ -0,0 +1,40 @@
+---
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+namespace: wowz
+wowza_hostname: "wowza"
+remote_vlc_hostname: "remote-vlc"
+
+wowza:
+ images:
+ wowza_image: "10.90.0.131:30500/wowza:latest"
+ ports:
+ rtmp: 1935
+ streammanager: 8086
+ rest: 8087
+ webui: 8088
+ replicas: 1
+
+remote_vlc:
+ images:
+ init: "ngick8stesting/c3po-mmeinit"
+ remote_vlc_image: "woojoong/mwc-cdn:remote"
+ ports:
+ vlc: 8089
+ http: 50001
+ replicas: 1
+ resources:
+ cpu: 3
+ mem: "1Gi"
\ No newline at end of file