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
93323888
Commit
93323888
authored
Jan 24, 2014
by
John Jarvis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
creating arg for configuration-secure and adding role path
parent
4f51c912
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
11 deletions
+23
-11
playbooks/edx-east/ansible.cfg
+0
-2
playbooks/edx-east/ansible.cfg
+10
-0
util/vpc-tools/abbey.py
+13
-9
No files found.
playbooks/edx-east/ansible.cfg
deleted
120000 → 0
View file @
4f51c912
../ansible.cfg
\ No newline at end of file
playbooks/edx-east/ansible.cfg
0 → 100644
View file @
93323888
# config file for ansible -- http://ansible.github.com
# nearly all parameters can be overridden in ansible-playbook or with command line flags
# ansible will read ~/.ansible.cfg or /etc/ansible/ansible.cfg, whichever it finds first
[defaults]
jinja2_extensions=jinja2.ext.do
hash_behaviour=merge
host_key_checking=False
roles_path=../../../ansible-roles
util/vpc-tools/abbey.py
View file @
93323888
...
...
@@ -61,7 +61,7 @@ class MongoConnection:
}
try
:
self
.
mongo_ami
.
insert
(
query
)
except
DuplicateKeyError
as
e
:
except
DuplicateKeyError
:
if
not
args
.
noop
:
print
"Entry already exists for {}"
.
format
(
ami
)
raise
...
...
@@ -71,11 +71,11 @@ class MongoConnection:
Adds the built AMI to the deployment
collection
"""
query
=
{
'_id'
:
args
.
jenkins_build
}
query
=
{
'_id'
:
args
.
jenkins_build
}
deployment
=
self
.
mongo_deployment
.
find_one
(
query
)
try
:
deployment
[
'plays'
][
args
.
play
][
'amis'
][
args
.
environment
]
=
ami
except
KeyError
as
e
:
except
KeyError
:
msg
=
"Unexpected document structure, couldn't write "
+
\
"to path deployment['plays']['{}']['amis']['{}']"
print
msg
.
format
(
args
.
play
,
args
.
environment
)
...
...
@@ -95,6 +95,7 @@ class MongoConnection:
self
.
mongo_deployment
.
save
(
deployment
)
class
Unbuffered
:
"""
For unbuffered output, not
...
...
@@ -121,8 +122,8 @@ def parse_args():
parser
.
add_argument
(
'--secure-vars'
,
required
=
False
,
metavar
=
"SECURE_VAR_FILE"
,
help
=
"path to secure-vars from the root of "
"
configuration-secure,
defaults to ansible/"
"vars/DEPLOYMENT/ENVIRONMENT-DEPLOYMENT.yml"
)
"
the secure repo (
defaults to ansible/"
"vars/DEPLOYMENT/ENVIRONMENT-DEPLOYMENT.yml
)
"
)
parser
.
add_argument
(
'--stack-name'
,
help
=
"defaults to ENVIRONMENT-DEPLOYMENT"
,
metavar
=
"STACK_NAME"
,
...
...
@@ -149,6 +150,9 @@ def parse_args():
parser
.
add_argument
(
'--configuration-secure-version'
,
required
=
False
,
help
=
"configuration-secure repo branch(no hashes)"
,
default
=
"master"
)
parser
.
add_argument
(
'--configuration-secure-repo'
,
required
=
False
,
default
=
"git@github.com:edx-ops/prod-secure"
,
help
=
"repo to use for the secure files"
)
parser
.
add_argument
(
'-j'
,
'--jenkins-build'
,
required
=
False
,
help
=
"jenkins build number to update"
)
parser
.
add_argument
(
'-b'
,
'--base-ami'
,
required
=
False
,
...
...
@@ -271,9 +275,8 @@ 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_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
"
git_repo_secure="
{configuration_secure_repo}
"
if $config_secure; then
git_cmd="env GIT_SSH=$git_ssh git"
...
...
@@ -349,6 +352,7 @@ rm -rf $base_dir
"""
.
format
(
configuration_version
=
args
.
configuration_version
,
configuration_secure_version
=
args
.
configuration_secure_version
,
configuration_secure_repo
=
args
.
configuration_secure_repo
,
environment
=
args
.
environment
,
deployment
=
args
.
deployment
,
play
=
args
.
play
,
...
...
@@ -433,7 +437,7 @@ def poll_sqs_ansible():
to_disp
[
'msg'
][
'TS'
]
%
60
,
to_disp
[
'msg'
][
'PREFIX'
],
to_disp
[
'msg'
][
'START'
]),
elif
'TASK'
in
to_disp
[
'msg'
]:
print
"
\n
{:0>2.0f}:{:0>5.2f} {} : {}"
.
format
(
to_disp
[
'msg'
][
'TS'
]
/
60
,
...
...
@@ -472,7 +476,7 @@ def poll_sqs_ansible():
to_disp
[
'msg'
][
'TS'
]
/
60
,
to_disp
[
'msg'
][
'TS'
]
%
60
,
to_disp
[
'msg'
][
'PREFIX'
])
# Since 3 ansible plays get run.
# We see the COMPLETE message 3 times
# wait till the last one to end listening
...
...
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