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
4e045953
Commit
4e045953
authored
Nov 20, 2015
by
Edward Zarecor
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2265 from edx/e0d/tag-experiment
Tagging tasks to tease out problems with scheme
parents
20cfc50c
702f7488
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
5 deletions
+86
-5
playbooks/roles/edx_service/tasks/main.yml
+41
-5
playbooks/roles/xqueue/tasks/deploy.yml
+36
-0
playbooks/roles/xqueue/tasks/main.yml
+9
-0
No files found.
playbooks/roles/edx_service/tasks/main.yml
View file @
4e045953
...
...
@@ -54,6 +54,9 @@
createhome=yes
shell=/bin/false
generate_ssh_key=yes
tags
:
-
install
-
install:base
# Assumes that the home directory has been created above.
# In some cases(vagrant boxes) the home directory gets created
...
...
@@ -72,6 +75,9 @@
-
"
venvs"
-
"
data"
-
"
staticfiles"
tags
:
-
install
-
install:base
-
name
:
create /edx/var and /edx/etc dirs
file
:
>
...
...
@@ -83,6 +89,9 @@
with_items
:
-
/edx/var
-
/edx/etc
tags
:
-
install
-
install:base
-
name
:
create edx_service log dir
file
:
>
...
...
@@ -92,36 +101,51 @@
group="syslog"
with_items
:
-
"
{{
COMMON_LOG_DIR
}}/{{
edx_service_name
}}"
tags
:
-
install
-
install:base
-
name
:
write out app config file
template
:
>
src=config.yml.j2
dest={{ COMMON_CFG_DIR }}/{{ edx_service_name }}.yml
mode=0644
tags
:
-
deploy
when
:
edx_service_config is defined
tags
:
-
install
-
install:configuration
-
name
:
install a bunch of system packages on which edx_service relies
apt
:
pkg={{ item }} state=present
with_items
:
edx_service_packages.debian
when
:
ansible_distribution in common_debian_variants
tags
:
-
install
-
install:system-requirements
-
name
:
install a bunch of system packages on which edx_service relies
yum
:
pkg={{ item }} state=present
with_items
:
edx_service_name.redhat
when
:
ansible_distribution in common_redhat_variants
tags
:
-
install
-
install:system-requirements
-
name
:
set git fetch.prune to ignore deleted remote refs
shell
:
git config --global fetch.prune
true
sudo_user
:
"
{{
edx_service_user
}}"
when
:
edx_service_repos is defined
tags
:
-
install
-
install:code
-
name
:
validate git protocol
fail
:
msg='REPOS.PROTOCOL must be "https" or "ssh"'
when
:
(item.PROTOCOL != "https") and (item.PROTOCOL != "ssh") and edx_service_repos is defined
with_items
:
edx_service_repos
tags
:
-
install
-
install:code
-
name
:
install read-only ssh key
copy
:
>
...
...
@@ -130,6 +154,9 @@
group={{ edx_service_user }} mode=0600
when
:
item.PROTOCOL == "ssh" and edx_service_repos is defined
with_items
:
edx_service_repos
tags
:
-
install
-
install:code
-
name
:
checkout code over ssh
git
:
>
...
...
@@ -140,6 +167,9 @@
register
:
code_checkout
when
:
item.PROTOCOL == "ssh" and edx_service_repos is defined
with_items
:
edx_service_repos
tags
:
-
install
-
install:code
-
name
:
checkout code over https
git
:
>
...
...
@@ -149,10 +179,14 @@
register
:
code_checkout
when
:
item.PROTOCOL == "https" and edx_service_repos is defined
with_items
:
edx_service_repos
tags
:
-
install
-
install:code
-
name
:
get instance information
action
:
ec2_facts
tags
:
-
to-remove
#old syntax - should be fixed
-
name
:
tag instance
...
...
@@ -165,5 +199,7 @@
with_together
:
-
edx_service_repos
-
code_checkout.results
tags
:
-
to-remove
#TODO: restart supervisor- depends on supervisor being refactored into this role
playbooks/roles/xqueue/tasks/deploy.yml
View file @
4e045953
...
...
@@ -3,6 +3,9 @@
src={{ item }}.conf.j2 dest={{ supervisor_available_dir }}/{{ item }}.conf
owner={{ supervisor_user }} group={{ common_web_user }} mode=0644
with_items
:
[
'
xqueue'
,
'
xqueue_consumer'
]
tags
:
-
install
-
install:configuration
-
name
:
"
enabling
supervisor
scripts
-
xqueue,
xqueue
consumer"
file
:
>
...
...
@@ -12,6 +15,9 @@
mode=0644 state=link force=yes
with_items
:
[
'
xqueue'
,
'
xqueue_consumer'
]
when
:
not disable_edx_services
tags
:
-
install
-
install:configuration
-
name
:
"
add
gunicorn
configuration
file"
template
:
>
...
...
@@ -19,18 +25,27 @@
sudo_user
:
"
{{
xqueue_user
}}"
notify
:
-
restart xqueue
tags
:
-
install
-
install:configuration
-
name
:
create xqueue application config
template
:
src=xqueue.env.json.j2 dest={{ xqueue_app_dir }}/xqueue.env.json mode=0644
sudo_user
:
"
{{
xqueue_user
}}"
notify
:
-
restart xqueue
tags
:
-
install
-
install:configuration
-
name
:
create xqueue auth file
template
:
src=xqueue.auth.json.j2 dest={{ xqueue_app_dir }}/xqueue.auth.json mode=0644
sudo_user
:
"
{{
xqueue_user
}}"
notify
:
-
restart xqueue
tags
:
-
install
-
install:configuration
# Do A Checkout
-
name
:
git checkout xqueue repo into xqueue_code_dir
...
...
@@ -41,6 +56,9 @@
register
:
xqueue_checkout
notify
:
-
restart xqueue
tags
:
-
install
-
install:code
# Install the python pre requirements into {{ xqueue_venv_dir }}
...
...
@@ -51,6 +69,9 @@
sudo_user
:
"
{{
xqueue_user
}}"
notify
:
-
restart xqueue
tags
:
-
install
-
install:application-requirements
# Install the python post requirements into {{ xqueue_venv_dir }}
-
name
:
install python post-requirements
...
...
@@ -60,6 +81,9 @@
sudo_user
:
"
{{
xqueue_user
}}"
notify
:
-
restart xqueue
tags
:
-
install
-
install:application-requirements
# If there is a common user for migrations run migrations using his username
# and credentials. If not we use the xqueue mysql user
...
...
@@ -73,6 +97,9 @@
when
:
migrate_db is defined and migrate_db|lower == "yes" and COMMON_MYSQL_MIGRATE_PASS
notify
:
-
restart xqueue
tags
:
-
migrate
-
migrate:db
-
name
:
create users
shell
:
>
...
...
@@ -80,6 +107,9 @@
sudo_user
:
"
{{
xqueue_user
}}"
notify
:
-
restart xqueue
tags
:
-
manage
-
manage:app-users
# call supervisorctl update. this reloads
# the supervisorctl config and restarts
...
...
@@ -102,6 +132,9 @@
-
xqueue
-
xqueue_consumer
when
:
not disable_edx_services
tags
:
-
manage
-
manage:start
-
name
:
create a symlink for venv python
file
:
>
...
...
@@ -111,5 +144,8 @@
with_items
:
-
python
-
pip
tags
:
-
install
-
install:app-requirements
-
set_fact
:
xqueue_installed=true
playbooks/roles/xqueue/tasks/main.yml
View file @
4e045953
...
...
@@ -14,6 +14,9 @@
shell=/bin/false
notify
:
-
restart xqueue
tags
:
-
install
-
install:base
-
name
:
create xqueue app and venv dir
file
:
>
...
...
@@ -26,11 +29,17 @@
with_items
:
-
"
{{
xqueue_app_dir
}}"
-
"
{{
xqueue_venvs_dir
}}"
tags
:
-
install
-
install:base
-
name
:
install a bunch of system packages on which xqueue relies
apt
:
pkg={{','.join(xqueue_debian_pkgs)}} state=present
notify
:
-
restart xqueue
tags
:
-
install
-
install:system-requirements
-
include
:
deploy.yml tags=deploy
...
...
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