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
86fec7d5
Commit
86fec7d5
authored
Aug 19, 2016
by
Edward Zarecor
Committed by
GitHub
Aug 19, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3322 from edx/e0d/extending-automated
Adding automated to edxapp and discovery plays
parents
38c9838e
3ff6ee7b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
33 deletions
+48
-33
playbooks/edx-east/discovery.yml
+2
-0
playbooks/edx-east/edxapp.yml
+21
-19
playbooks/roles/discovery/defaults/main.yml
+13
-0
playbooks/roles/edxapp/defaults/main.yml
+12
-14
No files found.
playbooks/edx-east/discovery.yml
View file @
86fec7d5
...
@@ -9,6 +9,8 @@
...
@@ -9,6 +9,8 @@
CLUSTER_NAME
:
'
discovery'
CLUSTER_NAME
:
'
discovery'
roles
:
roles
:
-
aws
-
aws
-
role
:
automated
AUTOMATED_USERS
:
"
{{
DISCOVERY_AUTOMATED_USERS
|
default({})
}}"
-
role
:
nginx
-
role
:
nginx
nginx_default_sites
:
nginx_default_sites
:
-
discovery
-
discovery
...
...
playbooks/edx-east/edxapp.yml
View file @
86fec7d5
...
@@ -7,22 +7,24 @@
...
@@ -7,22 +7,24 @@
CLUSTER_NAME
:
'
edxapp'
CLUSTER_NAME
:
'
edxapp'
serial
:
"
{{
serial_count
}}"
serial
:
"
{{
serial_count
}}"
roles
:
roles
:
-
aws
-
aws
-
role
:
nginx
-
role
:
automated
nginx_sites
:
AUTOMATED_USERS
:
"
{{
EDXAPP_AUTOMATED_USERS
|
default({})
}}"
-
lms
-
role
:
nginx
-
cms
nginx_sites
:
nginx_default_sites
:
-
lms
-
lms
-
cms
nginx_extra_sites
:
"
{{
NGINX_EDXAPP_EXTRA_SITES
}}"
nginx_default_sites
:
nginx_extra_configs
:
"
{{
NGINX_EDXAPP_EXTRA_CONFIGS
}}"
-
lms
nginx_redirects
:
"
{{
NGINX_EDXAPP_CUSTOM_REDIRECTS
}}"
nginx_extra_sites
:
"
{{
NGINX_EDXAPP_EXTRA_SITES
}}"
-
edxapp
nginx_extra_configs
:
"
{{
NGINX_EDXAPP_EXTRA_CONFIGS
}}"
-
role
:
datadog
nginx_redirects
:
"
{{
NGINX_EDXAPP_CUSTOM_REDIRECTS
}}"
when
:
COMMON_ENABLE_DATADOG
-
edxapp
-
role
:
splunkforwarder
-
role
:
datadog
when
:
COMMON_ENABLE_SPLUNKFORWARDER
when
:
COMMON_ENABLE_DATADOG
-
role
:
newrelic
-
role
:
splunkforwarder
when
:
COMMON_ENABLE_NEWRELIC
when
:
COMMON_ENABLE_SPLUNKFORWARDER
-
role
:
minos
-
role
:
newrelic
when
:
COMMON_ENABLE_MINOS
when
:
COMMON_ENABLE_NEWRELIC
-
role
:
minos
when
:
COMMON_ENABLE_MINOS
playbooks/roles/discovery/defaults/main.yml
View file @
86fec7d5
...
@@ -166,6 +166,19 @@ DISCOVERY_HOSTNAME: '~^((stage|prod)-)?discovery.*'
...
@@ -166,6 +166,19 @@ DISCOVERY_HOSTNAME: '~^((stage|prod)-)?discovery.*'
nginx_discovery_gunicorn_hosts
:
nginx_discovery_gunicorn_hosts
:
-
127.0.0.1
-
127.0.0.1
# Vars that are used when the automated role is "mixed-in" via the deploying play
# This data structure specifies all the users with access to run command remotely
# over SSH and the fully qualified command that they can run via sudo to the
# application user
DISCOVERY_AUTOMATED_USERS
:
automated_user
:
sudo_commands
:
-
command
:
"
{{
discovery_venv_dir
}}/python
{{
discovery_home
}}/{{
discovery_service_name
}}/manage.py
migrate
--list"
sudo_user
:
"
discovery"
authorized_keys
:
-
"
SSH
authorized
key"
#
#
# vars are namespace with the module name.
# vars are namespace with the module name.
#
#
...
...
playbooks/roles/edxapp/defaults/main.yml
View file @
86fec7d5
...
@@ -351,20 +351,18 @@ EDXAPP_PYTHON_SANDBOX: true
...
@@ -351,20 +351,18 @@ EDXAPP_PYTHON_SANDBOX: true
# it puts the sandbox in 'complain' mode, for reporting but not enforcement
# it puts the sandbox in 'complain' mode, for reporting but not enforcement
EDXAPP_SANDBOX_ENFORCE
:
true
EDXAPP_SANDBOX_ENFORCE
:
true
# Supply authorized keys used for remote management via the user
# Vars that are used when the automated role is "mixed-in" via the deploying play
# role.
# This data structure specifies all the users with access to run command remotely
EDXAPP_AUTOMATOR_NAME
:
automator
# over SSH and the fully qualified command that they can run via sudo to the
EDXAPP_AUTOMATOR_AUTHORIZED_KEYS
:
[]
# application user
# These are the commands allowed by the automator role.
# The --settings parameter must be set at the end so that
EDXAPP_AUTOMATED_USERS
:
# is caught by the glob.
automated_user
:
# Example: sudo -u www-data /edx/bin/python.edxapp /edx/bin/manage.edxapp lms migrate --settings=aws
sudo_commands
:
EDXAPP_AUTOMATOR_SUDO_CMDS
:
-
command
:
"
{{
edxapp_venv_bin
}}/python
{{
edxapp_code_dir
}}/manage.py
lms
migrate
--list
--settings=aws"
-
"
ALL=({{
common_web_user
}})
NOPASSWD:SETENV:{{
COMMON_BIN_DIR
}}/python.edxapp
{{
COMMON_BIN_DIR
}}/manage.edxapp
lms
migrate
*"
sudo_user
:
"
edxapp"
-
"
ALL=({{
common_web_user
}})
NOPASSWD:SETENV:{{
COMMON_BIN_DIR
}}/python.edxapp
{{
COMMON_BIN_DIR
}}/manage.edxapp
cms
migrate
*"
authorized_keys
:
-
"
ALL=({{
common_web_user
}})
NOPASSWD:SETENV:{{
COMMON_BIN_DIR
}}/python.edxapp
{{
COMMON_BIN_DIR
}}/manage.edxapp
lms
seed_permissions_roles
*"
-
"
SSH
authorized
key"
-
"
ALL=({{
common_web_user
}})
NOPASSWD:SETENV:{{
COMMON_BIN_DIR
}}/python.edxapp
{{
COMMON_BIN_DIR
}}/manage.edxapp
lms
set_staff
*"
-
"
ALL=({{
common_web_user
}})
NOPASSWD:SETENV:{{
COMMON_BIN_DIR
}}/python.edxapp
{{
COMMON_BIN_DIR
}}/manage.edxapp
lms
transfer_students
*"
EDXAPP_USE_GIT_IDENTITY
:
false
EDXAPP_USE_GIT_IDENTITY
:
false
# Paste the contents of the git identity
# Paste the contents of the git identity
...
...
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