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
22f2a797
Commit
22f2a797
authored
Jan 17, 2014
by
Feanil Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let abbey accept git hashes.
parent
ac846fa3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
8 deletions
+19
-8
util/jenkins/stage_release.py
+6
-2
util/vpc-tools/abbey.py
+13
-6
No files found.
util/jenkins/stage_release.py
View file @
22f2a797
...
...
@@ -154,7 +154,8 @@ def prepare_release(args):
release_coll
.
insert
(
release
)
# All plays that need new AMIs have been updated.
notify_abbey
(
config
[
'abbey_url'
],
config
[
'abbey_token'
],
args
.
deployment
,
all_plays
,
args
.
release_id
,
mongo_uri
)
all_plays
,
args
.
release_id
,
mongo_uri
,
config_repo_ver
,
config_secure_ver
)
def
ami_for
(
db
,
env
,
deployment
,
play
,
configuration
,
configuration_secure
,
ansible_vars
):
...
...
@@ -171,7 +172,8 @@ def ami_for(db, env, deployment, play, configuration,
return
db
.
amis
.
find_one
(
ami_signature
)
import
requests
def
notify_abbey
(
abbey_url
,
abbey_token
,
deployment
,
all_plays
,
release_id
,
mongo_uri
):
def
notify_abbey
(
abbey_url
,
abbey_token
,
deployment
,
all_plays
,
release_id
,
mongo_uri
,
configuration_ref
,
configuration_secure_ref
):
for
play_name
,
play
in
all_plays
.
items
():
for
env
,
ami
in
play
[
'amis'
]
.
items
():
if
ami
is
None
:
...
...
@@ -182,6 +184,8 @@ def notify_abbey(abbey_url, abbey_token, deployment, all_plays, release_id, mong
params
.
append
({
'name'
:
'vars'
,
'value'
:
yaml
.
dump
(
play
[
'vars'
],
default_flow_style
=
False
)})
params
.
append
({
'name'
:
'release_id'
,
'value'
:
release_id
})
params
.
append
({
'name'
:
'mongo_uri'
,
'value'
:
mongo_uri
})
params
.
append
({
'name'
:
'configuration'
,
'value'
:
configuration_ref
})
params
.
append
({
'name'
:
'configuration_secure'
,
'value'
:
configuration_secure_ref
})
build_params
=
{
'parameter'
:
params
}
log
.
info
(
"Need ami for {}"
.
format
(
pformat
(
build_params
)))
...
...
util/vpc-tools/abbey.py
View file @
22f2a797
...
...
@@ -246,8 +246,10 @@ $(curl http://169.254.169.254/latest/meta-data/local-ipv4 2>/dev/null)
instance_type=
\\
$(curl http://169.254.169.254/latest/meta-data/instance-type 2>/dev/null)
playbook_dir="$base_dir/configuration/playbooks/edx-east"
git_repo="https://github.com/edx/configuration"
git_repo_secure="git@github.com:edx/configuration-secure"
git_repo_name="configuration"
git_repo_secure_name="configuration-secure"
git_repo="https://github.com/edx/$git_repo_name"
git_repo_secure="git@github.com:edx/$git_repo_secure_name"
if $config_secure; then
git_cmd="env GIT_SSH=$git_ssh git"
...
...
@@ -297,14 +299,19 @@ EOF
chmod 400 $secure_identity
$git_cmd clone -b $configuration_version $git_repo
$git_cmd clone $git_repo $git_repo_name
cd $git_repo_name
$git_cmd checkout $configuration_version
cd $base_dir
if $config_secure; then
$git_cmd clone -b $configuration_secure_version
\\
$git_repo_secure
$git_cmd clone $git_repo_secure $git_repo_secure_name
cd $git_repo_secure_name
$git_cmd checkout $configuration_secure_version
cd $base_dir
fi
cd $base_dir/
configuration
cd $base_dir/
$git_repo_name
sudo pip install -r requirements.txt
cd $playbook_dir
...
...
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