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
7f988ba9
Commit
7f988ba9
authored
6 years ago
by
Florent Thiery
Browse files
Options
Downloads
Patches
Plain Diff
do not re-generate nginx ssl certificate during demokit reset target, fixes
#28243
parent
0afb6776
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
13.Demokit/1.Deploy_demokit/0_setup.py
+0
-15
0 additions, 15 deletions
13.Demokit/1.Deploy_demokit/0_setup.py
13.Demokit/3.Generate_SSL_certificate/0_setup.py
+21
-0
21 additions, 0 deletions
13.Demokit/3.Generate_SSL_certificate/0_setup.py
launcher.sh
+2
-0
2 additions, 0 deletions
launcher.sh
with
23 additions
and
15 deletions
13.Demokit/1.Deploy_demokit/0_setup.py
+
0
−
15
View file @
7f988ba9
...
...
@@ -14,21 +14,6 @@ CONTENT = [
def
setup
(
interactive
=
True
):
if
os
.
path
.
exists
(
'
/etc/nginx/sites-enabled/mediaserver-msuser.conf
'
):
cmds
=
list
()
# deploy nginx SSL certificates
domains
=
[]
conf_name_items
=
[
"
MS_SERVER_NAME
"
,
"
MONITOR_SERVER_NAME
"
,
"
CM_SERVER_NAME
"
,
"
CACHE_SERVER_NAME
"
]
for
name
in
conf_name_items
:
domain
=
utils
.
get_conf
(
name
)
if
utils
.
get_conf
(
name
):
domains
.
append
(
domain
)
utils
.
mkcert
(
domains
,
ecc
=
False
)
with
open
(
"
/etc/nginx/conf.d/ssl_certificate.conf
"
,
"
w
"
)
as
ssl_conf_fh
:
ssl_conf_fh
.
writelines
([
"
ssl_certificate /etc/ssl/envsetup/cert.pem;
"
,
"
ssl_certificate_key /etc/ssl/envsetup/key.pem;
"
])
cmds
.
append
(
"
systemctl restart nginx
"
)
options
=
{
"
ms_url
"
:
utils
.
get_conf
(
'
MS_SERVER_NAME
'
),
"
ms_apikey
"
:
utils
.
get_conf
(
'
MS_API_KEY
'
)
...
...
This diff is collapsed.
Click to expand it.
13.Demokit/3.Generate_SSL_certificate/0_setup.py
0 → 100644
+
21
−
0
View file @
7f988ba9
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import
utils
def
setup
(
interactive
=
True
):
# deploy nginx SSL certificates
domains
=
[]
conf_name_items
=
[
"
MS_SERVER_NAME
"
,
"
MONITOR_SERVER_NAME
"
,
"
CM_SERVER_NAME
"
,
"
CACHE_SERVER_NAME
"
]
for
name
in
conf_name_items
:
domain
=
utils
.
get_conf
(
name
)
if
utils
.
get_conf
(
name
):
domains
.
append
(
domain
)
utils
.
mkcert
(
domains
,
ecc
=
False
)
with
open
(
"
/etc/nginx/conf.d/ssl_certificate.conf
"
,
"
w
"
)
as
ssl_conf_fh
:
ssl_conf_fh
.
writelines
([
"
ssl_certificate /etc/ssl/envsetup/cert.pem;
"
,
"
ssl_certificate_key /etc/ssl/envsetup/key.pem;
"
])
cmds
=
[
"
systemctl restart nginx
"
]
utils
.
run_commands
(
cmds
)
This diff is collapsed.
Click to expand it.
launcher.sh
+
2
−
0
View file @
7f988ba9
...
...
@@ -142,6 +142,8 @@ case "$1" in
python3
-u
/root/envsetup/envsetup.py 121
# demokit scripts: deploy videos, custom conf, etc
python3
-u
/root/envsetup/envsetup.py 131
# deploy ssl self-signed certificates
python3
-u
/root/envsetup/envsetup.py 133
[[
$2
=
"--skip-tests"
]]
||
tests
;;
...
...
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