Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
envsetup
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mediaserver
envsetup
Commits
a0ad1fcf
Commit
a0ad1fcf
authored
6 years ago
by
Florent Thiery
Browse files
Options
Downloads
Patches
Plain Diff
further auto-configure netcapture, refs
#26945
parent
4ca8ffc5
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
12.Netcapture/1.Install_Netcapture/0_setup.py
+21
-0
21 additions, 0 deletions
12.Netcapture/1.Install_Netcapture/0_setup.py
5.MediaServer/3.Deploy_demokit/0_setup.py
+10
-0
10 additions, 0 deletions
5.MediaServer/3.Deploy_demokit/0_setup.py
with
31 additions
and
0 deletions
12.Netcapture/1.Install_Netcapture/0_setup.py
+
21
−
0
View file @
a0ad1fcf
#!/usr/bin/env python3
import
utils
import
json
def
write_conf
():
with
open
(
'
/etc/miris/netcapture.json.example
'
,
'
r
'
)
as
f
:
default_conf
=
json
.
load
(
f
)
default_conf
[
'
docker_registry_login
'
]
=
utils
.
get_conf
(
'
NETCAPTURE_DOCKER_LOGIN
'
,
''
)
default_conf
[
'
docker_registry_password
'
]
=
utils
.
get_conf
(
'
NETCAPTURE_DOCKER_PWD
'
,
''
)
default_conf
[
'
campusmanager_url
'
]
=
'
https://%s
'
%
utils
.
get_conf
(
'
CM_SERVER_NAME
'
,
''
)
with
open
(
'
/etc/miris/netcapture.json
'
,
'
w
'
)
as
f
:
json
.
dump
(
default_conf
,
f
,
indent
=
2
,
sort_keys
=
True
)
return
default_conf
def
setup
(
interactive
=
True
):
...
...
@@ -14,5 +26,14 @@ def setup(interactive=True):
try
:
utils
.
run_commands
(
cmds
)
conf
=
write_conf
()
cmds_post
=
list
()
for
f
in
[
'
media
'
,
'
logs
'
,
'
conf
'
]:
cmds_post
.
extend
([
'
mkdir -p %s
'
%
conf
[
'
netcapture_%s_folder
'
%
f
],
'
chgrp -R video %s
'
%
conf
[
'
netcapture_%s_folder
'
%
f
],
'
chmod -R 774 %s
'
%
conf
[
'
netcapture_%s_folder
'
%
f
],
])
utils
.
run_commands
(
cmds_post
)
except
Exception
:
raise
This diff is collapsed.
Click to expand it.
5.MediaServer/3.Deploy_demokit/0_setup.py
+
10
−
0
View file @
a0ad1fcf
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import
utils
import
json
CONTENT
=
[
"
https://www.ubicast.eu/media/downloads/TradeshowDemoKit/medical_education.zip
"
,
...
...
@@ -19,4 +20,13 @@ def setup(interactive=True):
cmd
=
cmd_template
%
c
cmds
.
append
(
cmd
)
cmds
.
append
(
'
netcapturectl add
'
)
# hw acceleration requires boot-time module options so a reboot will be needed
with
open
(
'
/etc/miris/netcapture.json.example
'
,
'
w
'
)
as
f
:
c
=
json
.
load
(
f
)
c
[
'
enable_hw_acceleration
'
]
=
True
json
.
dump
(
c
,
f
)
cmds
.
append
(
'
echo
"
options i915 enable_guc_loading=1 enable_guc_submission=1
"
> /etc/modprobe.d/netcapture.conf
'
)
cmds
.
append
(
'
update-initramfs
'
)
utils
.
run_commands
(
cmds
)
print
(
'
A reboot is required
'
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment