Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
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
OpenEdx
configuration
Commits
202e78a5
Commit
202e78a5
authored
May 22, 2013
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updating git.py and package_data.yaml from sysadmin
parent
71a658ec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
150 deletions
+41
-150
fabfile/git.py
+41
-52
package_data.yaml
+0
-98
No files found.
fabfile/git.py
View file @
202e78a5
...
@@ -4,7 +4,6 @@ import re
...
@@ -4,7 +4,6 @@ import re
import
socket
import
socket
from
functools
import
partial
from
functools
import
partial
from
dogapi
import
dog_stats_api
from
fabric.api
import
task
,
sudo
,
runs_once
,
execute
from
fabric.api
import
task
,
sudo
,
runs_once
,
execute
from
fabric.api
import
cd
,
env
,
abort
,
parallel
,
prefix
from
fabric.api
import
cd
,
env
,
abort
,
parallel
,
prefix
from
fabric.colors
import
white
,
green
,
red
from
fabric.colors
import
white
,
green
,
red
...
@@ -222,11 +221,9 @@ def deploy(auto_migrate=False):
...
@@ -222,11 +221,9 @@ def deploy(auto_migrate=False):
metric_name
=
'fabric.deployment'
metric_name
=
'fabric.deployment'
# pre checkout commands
# pre checkout commands
with
dog_stats_api
.
timer
(
metric_name
,
tags
=
package_tags
+
with
prefix
(
"export GIT_SSH=/tmp/git.sh"
):
[
'step:pre_commands'
]):
for
cmd
in
env
.
pre_post
[
'pre'
]:
with
prefix
(
"export GIT_SSH=/tmp/git.sh"
):
noopable
(
sudo
)(
cmd
)
for
cmd
in
env
.
pre_post
[
'pre'
]:
noopable
(
sudo
)(
cmd
)
put
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'git.sh'
),
put
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
'git.sh'
),
'/tmp/git.sh'
,
mode
=
0755
,
use_sudo
=
True
)
'/tmp/git.sh'
,
mode
=
0755
,
use_sudo
=
True
)
...
@@ -238,52 +235,44 @@ def deploy(auto_migrate=False):
...
@@ -238,52 +235,44 @@ def deploy(auto_migrate=False):
'existance:'
+
'existing'
if
existing_repo
else
'absent'
,
'existance:'
+
'existing'
if
existing_repo
else
'absent'
,
]
]
with
dog_stats_api
.
timer
(
metric_name
,
tags
=
repo_tags
+
[
'step:clone'
]):
if
existing_repo
:
if
existing_repo
:
if
not
files
.
exists
(
os
.
path
.
join
(
pkg
.
repo_root
,
'.git'
),
if
not
files
.
exists
(
os
.
path
.
join
(
pkg
.
repo_root
,
'.git'
),
use_sudo
=
True
):
use_sudo
=
True
):
raise
Exception
(
"Repo root not a git repo - {0}"
.
format
(
raise
Exception
(
"Repo root not a git repo - {0}"
.
format
(
os
.
path
.
join
(
pkg
.
repo_root
,
'.git'
)))
os
.
path
.
join
(
pkg
.
repo_root
,
'.git'
)))
with
cd
(
pkg
.
repo_root
):
with
cd
(
pkg
.
repo_root
):
if
pkg
.
revision
==
'absent'
:
if
pkg
.
revision
==
'absent'
:
noopable
(
sudo
)(
'rm -rf {0}'
.
format
(
pkg
.
repo_root
))
noopable
(
sudo
)(
'rm -rf {0}'
.
format
(
pkg
.
repo_root
))
else
:
else
:
checkout
(
pkg
.
revision
)
checkout
(
pkg
.
revision
)
else
:
else
:
with
cd
(
os
.
path
.
dirname
(
pkg
.
repo_root
)):
with
cd
(
os
.
path
.
dirname
(
pkg
.
repo_root
)):
if
pkg
.
revision
!=
'absent'
:
if
pkg
.
revision
!=
'absent'
:
clone
(
pkg
.
repo_org
,
pkg
.
repo_name
,
pkg
.
name
,
pkg
.
revision
)
clone
(
pkg
.
repo_org
,
pkg
.
repo_name
,
pkg
.
name
,
pkg
.
revision
)
if
'~'
in
pkg
.
name
:
if
'~'
in
pkg
.
name
:
_update_course_xml
(
pkg
,
pkg
.
name
.
split
(
'~'
)[
1
])
_update_course_xml
(
pkg
,
pkg
.
name
.
split
(
'~'
)[
1
])
_install_requirements
(
pkg
)
with
dog_stats_api
.
timer
(
metric_name
,
tags
=
repo_tags
+
_install_gemfile
(
pkg
)
[
'step:requirements'
]):
_install_npm_package
(
pkg
)
_install_requirements
(
pkg
)
_install_gemfile
(
pkg
)
# drop a file for puppet so it knows that
_install_npm_package
(
pkg
)
# code is installed for the service
with
cd
(
'/etc/facter/facts.d'
):
with
dog_stats_api
.
timer
(
metric_name
,
tags
=
repo_tags
+
[
'step:fact'
]):
pkg_config
=
PackageInfo
()
# drop a file for puppet so it knows that
if
pkg
.
repo_name
in
pkg_config
.
service_repos
:
# code is installed for the service
# facts can't have dashes so they are converted
with
cd
(
'/etc/facter/facts.d'
):
# to underscores
pkg_config
=
PackageInfo
()
noopable
(
sudo
)(
if
pkg
.
repo_name
in
pkg_config
.
service_repos
:
'echo "{0}_installed=true" > {0}_installed.txt'
.
format
(
# facts can't have dashes so they are converted
pkg
.
repo_name
.
replace
(
"-"
,
"_"
)))
# to underscores
noopable
(
sudo
)(
pkg_version
()
'echo "{0}_installed=true" > {0}_installed.txt'
.
format
(
pkg
.
repo_name
.
replace
(
"-"
,
"_"
)))
# post checkout commands
with
prefix
(
"export GIT_SSH=/tmp/git.sh"
):
with
dog_stats_api
.
timer
(
metric_name
,
tags
=
package_tags
+
for
cmd
in
env
.
pre_post
[
'post'
]:
[
'step:pkg_version'
]):
noopable
(
sudo
)(
cmd
)
pkg_version
()
with
dog_stats_api
.
timer
(
metric_name
,
tags
=
package_tags
+
[
'step:post_commands'
]):
# post checkout commands
with
prefix
(
"export GIT_SSH=/tmp/git.sh"
):
for
cmd
in
env
.
pre_post
[
'post'
]:
noopable
(
sudo
)(
cmd
)
if
'mitx'
in
[
pkg
.
name
for
pkg
in
packages
]:
if
'mitx'
in
[
pkg
.
name
for
pkg
in
packages
]:
# do not slow down content deploys by checking
# do not slow down content deploys by checking
...
...
package_data.yaml
View file @
202e78a5
...
@@ -17,16 +17,6 @@ service_repos:
...
@@ -17,16 +17,6 @@ service_repos:
-
analytics-experiments
-
analytics-experiments
repo_dirs
:
repo_dirs
:
/etc/puppet/environments/dev
:
MITx/configuration
/etc/puppet/environments/prod
:
MITx/configuration
/etc/puppet/environments/sandbox
:
MITx/configuration
/etc/puppet/environments/stage
:
MITx/configuration
/etc/puppet/environments/edge_production
:
MITx/configuration
/etc/puppet/environments/edge_staging
:
MITx/configuration
/etc/puppet/environments/edge_sandbox
:
MITx/configuration
/etc/puppet/environments/refactor
:
MITx/configuration
/etc/puppet/environments/prod_mktg
:
MITx/configuration
/etc/puppet/hiera
:
MITx/hiera
/opt/wwc/analytics-experiments
:
MITx/analytics-experiments
/opt/wwc/analytics-experiments
:
MITx/analytics-experiments
/opt/wwc/grading-controller
:
edx/grading-controller
/opt/wwc/grading-controller
:
edx/grading-controller
/opt/wwc/ease
:
edx/ease
/opt/wwc/ease
:
edx/ease
...
@@ -42,94 +32,6 @@ repo_dirs:
...
@@ -42,94 +32,6 @@ repo_dirs:
/opt/wwc/latex2edx
:
edx/latex2edx_xserver
/opt/wwc/latex2edx
:
edx/latex2edx_xserver
/opt/wwc/worker
:
edx/edx-platform
/opt/wwc/worker
:
edx/edx-platform
/opt/sysadmin
:
MITx/sysadmin
/opt/sysadmin
:
MITx/sysadmin
/opt/wwc/data/content-berkeley-cs169.2x~2012_Fall
:
MITx/content-berkeley-cs169.2x
/opt/wwc/data/content-berkeley-cs169.2x~2013_Spring
:
MITx/content-berkeley-cs169.2x
/opt/wwc/data/content-berkeley-cs169x~2012_Fall
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs169x~2013_Spring
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs169x~2013_March
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs169x~fa12
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs184x~2012_Fall
:
MITx/content-berkeley-cs184x
/opt/wwc/data/content-berkeley-cs184x~2013_Spring
:
MITx/content-berkeley-cs184x
/opt/wwc/data/content-berkeley-cs188x~2012_Fall
:
MITx/content-berkeley-cs188x
/opt/wwc/data/content-berkeley-cs188x~2013_Spring
:
MITx/content-berkeley-cs188x
/opt/wwc/data/content-berkeley-cs188x~fa12
:
MITx/content-berkeley-cs188x
/opt/wwc/data/content-berkeley-cs188x~sp13
:
MITx/content-berkeley-cs188x
/opt/wwc/data/content-berkeley-cs191x~2013_Spring
:
MITx/content-berkeley-cs191x
/opt/wwc/data/content-berkeley-stat2.1x~2013_Spring
:
MITx/content-berkeley-stat2.1x
/opt/wwc/data/content-berkeley-stat2.2x~2013_April
:
MITx/content-berkeley-stat2.2x
/opt/wwc/data/content-berkeley-stat2.3x~2013_SOND
:
MITx/content-berkeley-stat2.3x
/opt/wwc/data/content-berkeley-cs169x~2013_Spring_SPOC_Binghamton
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs169x~2013_Spring_SPOC_HPU
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs169x~2013_Spring_SPOC_Mills
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs169x~2013_Spring_SPOC_UCCS
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs169x~2013_Spring_SPOC_UIowa
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-berkeley-cs169x~2013_Spring_SPOC_UNCC
:
MITx/content-berkeley-cs169x
/opt/wwc/data/content-harvard-cs50x~2012
:
MITx/cs50
/opt/wwc/data/content-harvard-cs50x~2012H
:
MITx/cs50
/opt/wwc/data/content-harvard-healthx~2013_Spring
:
MITx/content-harvard-healthx
/opt/wwc/data/content-harvard-heroesx~2013_Spring
:
MITx/content-harvard-heroesx
/opt/wwc/data/content-harvard-copyrightx~2013_Spring
:
MITx/content-harvard-copyrightx
/opt/wwc/data/content-harvard-id270x
:
MITx/content-harvard-id270x
/opt/wwc/data/content-harvard-justicex~2013_Spring
:
MITx/content-harvard-justicex
/opt/wwc/data/content-mit-201x~2013_Spring
:
MITx/content-mit-201x
/opt/wwc/data/content-mit-1473x~2013_Spring
:
MITx/content-mit-1473x
/opt/wwc/data/content-mit-1473x~MIT_2013_Spring
:
MITx/content-mit-1473x
/opt/wwc/data/content-mit-3091x~2012_Fall
:
MITx/3.091x
/opt/wwc/data/content-mit-3091x~2013_Spring
:
MITx/3.091x
/opt/wwc/data/content-mit-3091x~MIT_2012_Fall
:
MITx/3.091x
/opt/wwc/data/content-mit-6002x
:
MITx/content-mit-6002x
/opt/wwc/data/content-mit-6002x~2012_Fall
:
MITx/content-mit-6002x
/opt/wwc/data/content-mit-6002x~2013_Spring
:
MITx/content-mit-6002x
/opt/wwc/data/content-mit-600x~2012_Fall
:
MITx/6.00x
/opt/wwc/data/content-mit-600x~2013_IAP
:
MITx/6.00x
/opt/wwc/data/content-mit-600x~2013_Spring
:
MITx/6.00x
/opt/wwc/data/content-mit-600x~MIT_2012_Fall
:
MITx/6.00x
/opt/wwc/data/content-mit-600x~MIT_2013_Spring
:
MITx/6.00x
/opt/wwc/data/content-sjsu-6002x
:
MITx/content-sjsu-6002x
/opt/wwc/data/content-num-6002x
:
MITx/content-num-6002x
/opt/wwc/data/content-startups-001x
:
MITx/content-startups-001x
/opt/wwc/data/content-mit-7012x~2013_Spring
:
MITx/content-mit-7012x
/opt/wwc/data/content-mit-7012x~MIT_2013_Spring
:
MITx/content-mit-7012x
/opt/wwc/data/content-mit-802x~2013_Spring
:
MITx/content-mit-802x
/opt/wwc/data/content-harvard-hls1xa~Copyright
:
MITx/content-harvard-hls1xa
/opt/wwc/data/content-harvard-hls1xb~Copyright
:
MITx/content-harvard-hls1xb
/opt/wwc/data/content-harvard-hls1xc~Copyright
:
MITx/content-harvard-hls1xc
/opt/wwc/data/content-harvard-hls1xd~Copyright
:
MITx/content-harvard-hls1xd
/opt/wwc/data/content-utaustin-001x
:
MITx/content-utaustin-001x
/opt/wwc/data/content-utaustin-002x
:
MITx/content-utaustin-002x
/opt/wwc/data/content-utaustin-003x
:
MITx/content-utaustin-003x
/opt/wwc/data/content-utaustin-004x
:
MITx/content-utaustin-004x
/opt/wwc/data/content-edx-demo
:
MITx/content-edx-demo
/opt/wwc/data/content-demos
:
MITx/content-demos
/opt/wwc/data/content-harvard-spu27x
:
MITx/content-harvard-spu27x
/opt/wwc/data/content-mit-mrev~2013_Summer
:
MITx/content-mit-mrev
/opt/wwc/data/content-georgetown-bioethics
:
MITx/content-georgetown-bioethics
/opt/wwc/data/content-georgetown-globalization
:
MITx/content-georgetown-globalization
/opt/wwc/data/content-delft-water~2013_Fall
:
MITx/content-delft-water
/opt/wwc/data/content-delft-solar~2013_Fall
:
MITx/content-delft-solar
/opt/wwc/data/content-openended-101x
:
MITx/content-openended-101x
/opt/wwc/data/content-anu-astro~2013_SOND
:
MITx/content-anu-astro
/opt/wwc/data/content-anu-india~2013_SOND
:
MITx/content-anu-india
/opt/wwc/data/content-georgetown-medx202-01~2014_SOND
:
MITx/content-georgetown-medx202-01
/opt/wwc/data/content-harvard-change~2014_Jan
:
MITx/content-harvard-change
/opt/wwc/data/content-harvard-china~2013_Oct
:
MITx/content-harvard-china
/opt/wwc/data/content-harvard-einstein~2013_SOND
:
MITx/content-harvard-einstein
/opt/wwc/data/content-rice-bioc372~2014_Jan
:
MITx/content-rice-bioc372
/opt/wwc/data/content-rice-phys102~2013_Oct
:
MITx/content-rice-phys102
/opt/wwc/data/content-rice-reli157x~2014_SOND
:
MITx/content-rice-reli157x
/opt/wwc/data/content-wellesley-anthropology207x~2013_SOND
:
MITx/content-wellesley-anthropology207x
/opt/wwc/data/content-wellesley-eng112x~2014_SOND
:
MITx/content-wellesley-eng112x
/opt/wwc/data/content-wellesley-hist229x~2013_SOND
:
MITx/content-wellesley-hist229x
/opt/wwc/data/content-wellesley-soc108x~2014_SOND
:
MITx/content-wellesley-soc108x
/opt/wwc/data/content-mit-16101x~2013_SOND
:
MITx/content-mit-16101x
/opt/wwc/data/content-mit-16110x~2013_SOND
:
MITx/content-mit-16110x
/opt/wwc/data/content-mit-2400x~2013_SOND
:
MITx/content-mit-2400x
/opt/wwc/data/content-mit-4605x~2013_SOND
:
MITx/content-mit-4605x
/opt/wwc/data/content-mit-801x~2013_SOND
:
MITx/content-mit-801x
/opt/wwc/data/content-mit-3086x~2013_SOND
:
MITx/content-mit-3086x
# {pre,post}_checkout_regex:
# {pre,post}_checkout_regex:
# What actions to take before and after a repo checkout.
# What actions to take before and after a repo checkout.
# Commands will be grouped together if multiple matches are made
# Commands will be grouped together if multiple matches are made
...
...
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