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
edx
configuration
Commits
2b807592
Commit
2b807592
authored
11 years ago
by
Feanil Patel
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #745 from edx/feanil/proper_extra_vars
Feanil/proper extra vars
parents
b074558f
8ba2271b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
41 additions
and
27 deletions
+41
-27
playbooks/roles/common/defaults/main.yml
+2
-2
playbooks/roles/edxapp/tasks/service_variant_config.yml
+15
-15
playbooks/roles/legacy_ora/tasks/main.yml
+2
-2
playbooks/roles/nginx/templates/cms.j2
+1
-1
playbooks/roles/splunkforwarder/defaults/main.yml
+3
-3
util/vpc-tools/abbey.py
+16
-2
util/vpc-tools/vpc_dns.py
+2
-2
No files found.
playbooks/roles/common/defaults/main.yml
View file @
2b807592
...
...
@@ -13,8 +13,8 @@ COMMON_LOG_DIR: "{{ COMMON_DATA_DIR }}/log"
COMMON_BIN_DIR
:
"
{{
COMMON_BASE_DIR
}}/bin"
COMMON_CFG_DIR
:
"
{{
COMMON_BASE_DIR
}}/etc"
COMMON_ENV
_NAME
:
'
default_env'
COMMON_
ENV_TYPE
:
'
default_type
'
COMMON_ENV
IRONMENT
:
'
default_env'
COMMON_
DEPLOYMENT
:
'
default_deployment
'
COMMON_PYPI_MIRROR_URL
:
'
https://pypi.python.org/simple'
# do not include http/https
COMMON_GIT_MIRROR
:
'
github.com'
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/edxapp/tasks/service_variant_config.yml
View file @
2b807592
...
...
@@ -44,6 +44,21 @@
when
:
celery_worker is defined and not devstack
sudo_user
:
"
{{
supervisor_user
}}"
-
name
:
syncdb and migrate
shell
:
SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when
:
migrate_db is defined and migrate_db|lower == "yes"
sudo_user
:
"
{{
edxapp_user
}}"
notify
:
-
"
restart
edxapp"
-
"
restart
edxapp_workers"
-
name
:
db migrate
shell
:
SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/django-admin.py migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when
:
migrate_only is defined and migrate_only|lower == "yes"
notify
:
-
"
restart
edxapp"
-
"
restart
edxapp_workers"
sudo_user
:
"
{{
edxapp_user
}}"
# Gather assets using rake if possible
...
...
@@ -61,18 +76,3 @@
environment
:
"
{{
edxapp_environment
}}"
-
name
:
syncdb and migrate
shell
:
SERVICE_VARIANT=lms {{ edxapp_venv_bin}}/django-admin.py syncdb --migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when
:
migrate_db is defined and migrate_db|lower == "yes"
sudo_user
:
"
{{
edxapp_user
}}"
notify
:
-
"
restart
edxapp"
-
"
restart
edxapp_workers"
-
name
:
db migrate
shell
:
SERVICE_VARIANT=lms {{ edxapp_venv_bin }}/django-admin.py migrate --noinput --settings=lms.envs.aws --pythonpath={{ edxapp_code_dir }}
when
:
migrate_only is defined and migrate_only|lower == "yes"
notify
:
-
"
restart
edxapp"
-
"
restart
edxapp_workers"
sudo_user
:
"
{{
edxapp_user
}}"
This diff is collapsed.
Click to expand it.
playbooks/roles/legacy_ora/tasks/main.yml
View file @
2b807592
...
...
@@ -18,14 +18,14 @@
-
name
:
create ora application config
copy
:
src={{secure_dir}}/files/{{COMMON_ENV
_TYPE
}}/legacy_ora/ora.env.json
src={{secure_dir}}/files/{{COMMON_ENV
IRONMENT
}}/legacy_ora/ora.env.json
dest={{ora_app_dir}}/env.json
sudo_user
:
"
{{
ora_user
}}"
register
:
env_state
-
name
:
create ora auth file
copy
:
src={{secure_dir}}/files/{{COMMON_ENV
_TYPE
}}/legacy_ora/ora.auth.json
src={{secure_dir}}/files/{{COMMON_ENV
IRONMENT
}}/legacy_ora/ora.auth.json
dest={{ora_app_dir}}/auth.json
sudo_user
:
"
{{
ora_user
}}"
register
:
auth_state
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/nginx/templates/cms.j2
View file @
2b807592
...
...
@@ -26,7 +26,7 @@ server {
{% endif %}
server_name
studio
.*;
server_name
~^((stage|prod)-)?studio\.
.*;
access_log {{ nginx_log_dir }}/access.log;
error_log {{ nginx_log_dir }}/error.log error;
...
...
This diff is collapsed.
Click to expand it.
playbooks/roles/splunkforwarder/defaults/main.yml
View file @
2b807592
...
...
@@ -25,15 +25,15 @@ SPLUNKFORWARDER_PASSWORD: !!null
SPLUNKFORWARDER_LOG_ITEMS
:
-
directory
:
'
{{
COMMON_LOG_DIR
}}'
recursive
:
true
index
:
'
{{COMMON_ENV
_TYPE}}-{{COMMON_ENV_NAME
}}'
index
:
'
{{COMMON_ENV
IRONMENT}}-{{COMMON_DEPLOYMENT
}}'
sourcetype
:
'
edx'
-
directory
:
'
/var/log'
recursive
:
true
index
:
'
{{COMMON_ENV
_TYPE}}-{{COMMON_ENV_NAME
}}'
index
:
'
{{COMMON_ENV
IRONMENT}}-{{COMMON_DEPLOYMENT
}}'
sourcetype
:
'
syslog'
-
directory
:
'
{{
COMMON_LOG_DIR
}}/nginx'
recursive
:
true
index
:
'
{{COMMON_ENV
_TYPE}}-{{COMMON_ENV_NAME
}}'
index
:
'
{{COMMON_ENV
IRONMENT}}-{{COMMON_DEPLOYMENT
}}'
sourcetype
:
'
nginx'
#
...
...
This diff is collapsed.
Click to expand it.
util/vpc-tools/abbey.py
View file @
2b807592
...
...
@@ -58,7 +58,7 @@ class MongoConnection:
'deployment'
:
args
.
deployment
,
'configuration_ref'
:
args
.
configuration_version
,
'configuration_secure_ref'
:
args
.
configuration_secure_version
,
'vars'
:
extra_var
s
,
'vars'
:
git_ref
s
,
}
try
:
self
.
mongo_ami
.
insert
(
query
)
...
...
@@ -142,6 +142,8 @@ def parse_args():
help
=
"don't cleanup on failures"
)
parser
.
add_argument
(
'--vars'
,
metavar
=
"EXTRA_VAR_FILE"
,
help
=
"path to extra var file"
,
required
=
False
)
parser
.
add_argument
(
'--refs'
,
metavar
=
"GIT_REFS_FILE"
,
help
=
"path to a var file with app git refs"
,
required
=
False
)
parser
.
add_argument
(
'-a'
,
'--application'
,
required
=
False
,
help
=
"Application for subnet, defaults to admin"
,
default
=
"admin"
)
...
...
@@ -314,11 +316,14 @@ EOF
fi
cat << EOF >> $extra_vars
---
# extra vars passed into
# abbey.py including versions
# of all the repositories
{extra_vars_yml}
{git_refs_yml}
# path to local checkout of
# the secure repo
secure_vars: $secure_vars_file
...
...
@@ -370,6 +375,7 @@ rm -rf $base_dir
identity_file
=
identity_file
,
queue_name
=
run_id
,
extra_vars_yml
=
extra_vars_yml
,
git_refs_yml
=
git_refs_yml
,
secure_vars
=
secure_vars
)
ec2_args
=
{
...
...
@@ -633,9 +639,17 @@ if __name__ == '__main__':
extra_vars_yml
=
f
.
read
()
extra_vars
=
yaml
.
load
(
extra_vars_yml
)
else
:
extra_vars_yml
=
"
---
\n
"
extra_vars_yml
=
""
extra_vars
=
{}
if
args
.
refs
:
with
open
(
args
.
refs
)
as
f
:
git_refs_yml
=
f
.
read
()
git_refs
=
yaml
.
load
(
git_refs_yml
)
else
:
git_refs_yml
=
""
git_refs
=
{}
if
args
.
secure_vars
:
secure_vars
=
args
.
secure_vars
else
:
...
...
This diff is collapsed.
Click to expand it.
util/vpc-tools/vpc_dns.py
View file @
2b807592
...
...
@@ -149,6 +149,7 @@ def update_elb_rds_dns(zone):
stack_elbs
=
[
elb
for
elb
in
elb_con
.
get_all_load_balancers
()
if
elb
.
vpc_id
==
vpc_id
]
for
elb
in
stack_elbs
:
for
inst
in
elb
.
instances
:
instance
=
ec2_con
.
get_all_instances
(
...
...
@@ -160,13 +161,12 @@ def update_elb_rds_dns(zone):
else
:
# deprecated, for backwards compatibility
play_tag
=
instance
.
tags
[
'role'
]
play_tag
=
instance
.
tags
[
'role'
]
fqdn
=
"{}-{}.{}"
.
format
(
env_tag
,
play_tag
,
zone_name
)
add_or_update_record
(
zone
,
fqdn
,
'CNAME'
,
600
,
[
elb
.
dns_name
])
if
play_tag
==
'edxapp'
:
# create courses and studio CNAME records for edxapp
for
name
in
[
'courses'
,
'studio'
]:
fqdn
=
"{}
.{}"
.
format
(
name
,
zone_name
)
fqdn
=
"{}
-{}.{}"
.
format
(
env_tag
,
name
,
zone_name
)
add_or_update_record
(
zone
,
fqdn
,
'CNAME'
,
600
,
[
elb
.
dns_name
])
break
# only need the first instance for tag info
...
...
This diff is collapsed.
Click to expand it.
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