Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Justin
slapos.toolbox
Commits
6e4cf8c3
Commit
6e4cf8c3
authored
Dec 02, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: automatic deployment of a default software release,
given in the parameters, at first run
parent
674ad139
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
slapos/runner/__init__.py
slapos/runner/__init__.py
+3
-2
slapos/runner/utils.py
slapos/runner/utils.py
+7
-0
No files found.
slapos/runner/__init__.py
View file @
6e4cf8c3
...
...
@@ -11,7 +11,7 @@ import os
import
slapos.runner.process
import
sys
from
slapos.runner.utils
import
runInstanceWithLock
from
utils
import
cloneDefaultGit
from
utils
import
cloneDefaultGit
,
setupDefaultSR
class
Parser
(
OptionParser
):
...
...
@@ -152,8 +152,9 @@ def serve(config):
os
.
mkdir
(
software_link
)
slapos
.
runner
.
process
.
setHandler
()
config
.
logger
.
info
(
'Running slapgrid...'
)
cloneDefaultGit
(
app
.
config
)
runInstanceWithLock
(
app
.
config
)
cloneDefaultGit
(
app
.
config
)
setupDefaultSR
(
app
.
config
)
config
.
logger
.
info
(
'Done.'
)
app
.
wsgi_app
=
ProxyFix
(
app
.
wsgi_app
)
app
.
run
(
host
=
config
.
runner_host
,
port
=
int
(
config
.
runner_port
),
...
...
slapos/runner/utils.py
View file @
6e4cf8c3
...
...
@@ -815,3 +815,10 @@ def cloneDefaultGit(config):
'
repo
': '
http
:
//
git
.
erp5
.
org
/
repos
/
slapos
.
git
',
}
cloneRepo(data)
def setupDefaultSR(config):
"""If a default_sr is in the parameters,
and no SR is deployed yet, setup it"""
project = os.path.join(config['
etc_dir
'], '
.
project
')
if not os.path.exists(project) and config['
default_sr
'] != '':
configNewSR(config, config['
default_sr
'])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment