From 783f33afa0597833030e639cd85bf69fb689280d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florent=20Thi=C3=A9ry?= <florent.thiery@ubicast.eu>
Date: Wed, 23 Jan 2019 11:18:15 +0100
Subject: [PATCH] add netcapture deployment to to envsetup and include it into
 demokit, refs #26945

---
 12.Netcapture/1.Install_Netcapture/0_setup.py | 18 ++++++++++++++++++
 launcher.sh                                   |  4 +++-
 2 files changed, 21 insertions(+), 1 deletion(-)
 create mode 100644 12.Netcapture/1.Install_Netcapture/0_setup.py

diff --git a/12.Netcapture/1.Install_Netcapture/0_setup.py b/12.Netcapture/1.Install_Netcapture/0_setup.py
new file mode 100644
index 00000000..5ec10e83
--- /dev/null
+++ b/12.Netcapture/1.Install_Netcapture/0_setup.py
@@ -0,0 +1,18 @@
+#!/usr/bin/env python3
+import utils
+
+
+def setup(interactive=True):
+    # Run commands
+    cmds = [
+        'apt-get install --yes apt-transport-https ca-certificates curl software-properties-common',
+        'curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -',
+        'add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"',
+        'apt-get update && apt-get install --yes docker-ce',
+        'apt-get install --yes python3-miris-netcapture',
+    ]
+
+    try:
+        utils.run_commands(cmds)
+    except Exception:
+        raise
diff --git a/launcher.sh b/launcher.sh
index 86ed940d..937f1034 100755
--- a/launcher.sh
+++ b/launcher.sh
@@ -137,7 +137,9 @@ case "$1" in
 		mediaserver
         # install celerity-worker
         python3 /root/envsetup/envsetup.py 72
-        # deploy videos
+        # install netcapture
+        python3 /root/envsetup/envsetup.py 121
+        # demokit scripts: deploy videos, custom conf, etc
         python3 /root/envsetup/envsetup.py 53
 		[[ $2 = "--skip-tests" ]] || tests
 	;;
-- 
GitLab