Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
75ce79fb
Commit
75ce79fb
authored
Jan 07, 2014
by
Will Daly
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1957 from edx/will/devstack-rake
Added rake commands for devstack
parents
19eaaaed
69834c3e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
rakelib/devstack.rake
+47
-0
No files found.
rakelib/devstack.rake
0 → 100644
View file @
75ce79fb
DEVSTACK_PORTS
=
{
"lms"
=>
'8000'
,
"studio"
=>
'8001'
}
# Abort if system is not one we recognize
def
check_devstack_sys
(
sys_name
)
if
not
DEVSTACK_PORTS
.
has_key?
(
sys_name
)
puts
"Devstack system must be either 'lms' or 'studio'"
exit
1
end
end
# Convert "studio" to "cms"
def
old_system
(
sys_name
)
if
sys_name
==
"studio"
return
"cms"
else
return
sys_name
end
end
namespace
:devstack
do
desc
"Start the server"
task
:start
,
[
:system
]
do
|
t
,
args
|
check_devstack_sys
(
args
.
system
)
port
=
DEVSTACK_PORTS
[
args
.
system
]
sys
=
old_system
(
args
.
system
)
sh
(
"./manage.py
#{
sys
}
runserver --settings=devstack 0.0.0.0:
#{
port
}
"
)
end
desc
"Update static assets"
task
:assets
,
[
:system
]
do
|
t
,
args
|
check_devstack_sys
(
args
.
system
)
Rake
::
Task
[
"assets"
].
invoke
(
old_system
(
args
.
system
),
'devstack'
)
end
desc
"Update Python, Ruby, and Node requirements"
task
:install
=>
[
:install_prereqs
]
end
desc
"Start the devstack lms or studio server"
task
:devstack
,
[
:system
]
=>
[
'devstack:install'
,
'devstack:assets'
]
do
|
t
,
args
|
Rake
::
Task
[
'devstack:start'
].
invoke
(
args
.
system
)
end
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