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
fe8b6261
Commit
fe8b6261
authored
Feb 11, 2015
by
Max Rothman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Integrate edx_service
parent
da089ad4
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
18 additions
and
42 deletions
+18
-42
playbooks/roles/xqwatcher/defaults/main.yml
+11
-10
playbooks/roles/xqwatcher/meta/main.yml
+3
-1
playbooks/roles/xqwatcher/tasks/deploy.yml
+2
-9
playbooks/roles/xqwatcher/tasks/deploy_watcher.yml
+2
-11
playbooks/roles/xqwatcher/tasks/tag_ec2.yml
+0
-11
No files found.
playbooks/roles/xqwatcher/defaults/main.yml
View file @
fe8b6261
...
...
@@ -51,10 +51,17 @@ XQWATCHER_COURSES:
KWARGS
:
grader_root
:
"
../data/exampleX-202x/graders/"
XQWATCHER_GIT_IDENTITY
:
|
-----BEGIN RSA PRIVATE KEY-----
Your key if you need to access any private repositories
-----END RSA PRIVATE KEY-----
XQWATCHER_GIT_IDENTITY
:
!!null
XQWATCHER_VERSION
:
"
master"
XQWATCHER_REPOS
:
-
PROTOCOL
:
"
{{
COMMON_GIT_PROTOCOL
}}"
DOMAIN
:
"
{{
COMMON_GIT_MIRROR
}}"
PATH
:
"
{{
COMMON_GIT_PATH
}}"
REPO
:
xqueue-watcher.git
VERSION
:
"
{{
XQWATCHER_VERSION
}}"
DESTINATION
:
"
{{
xqwatcher_code_dir
}}"
SSH_KEY
:
"
{{
XQWATCHER_GIT_IDENTITY
}}"
# depends upon Newrelic being enabled via COMMON_ENABLE_NEWRELIC
# and a key being provided via NEWRELIC_LICENSE_KEY
...
...
@@ -64,7 +71,6 @@ XQWATCHER_PIP_EXTRA_ARGS: "-i {{ COMMON_PYPI_MIRROR_URL }}"
#
# vars are namespace with the module name.
#
xqwatcher_role_name
:
"
xqwatcher"
xqwatcher_service_name
:
"
xqwatcher"
xqwatcher_user
:
"
xqwatcher"
xqwatcher_module
:
"
xqueue_watcher"
...
...
@@ -76,11 +82,6 @@ xqwatcher_venv_dir: "{{ xqwatcher_venv_base }}/{{ xqwatcher_service_name }}"
xqwatcher_code_dir
:
"
{{
xqwatcher_app_dir
}}/src"
xqwatcher_conf_dir
:
"
{{
xqwatcher_app_dir
}}"
xqwatcher_source_repo
:
"
git@{{
COMMON_GIT_MIRROR
}}:edx/xqueue-watcher.git"
xqwatcher_git_ssh_opts
:
"
-o
UserKnownHostsFile=/dev/null
-o
StrictHostKeyChecking=no
-i
{{
xqwatcher_git_identity
}}"
XQWATCHER_VERSION
:
"
master"
xqwatcher_git_identity
:
"
{{
xqwatcher_app_dir
}}/git-identity"
xqwatcher_requirements_file
:
"
{{
xqwatcher_code_dir
}}/requirements.txt"
xqwatcher_log_dir
:
"
{{
COMMON_LOG_DIR
}}/{{
xqwatcher_service_name
}}"
...
...
playbooks/roles/xqwatcher/meta/main.yml
View file @
fe8b6261
...
...
@@ -14,8 +14,10 @@
# random corners of ansible/jinga/python variable expansion.
dependencies
:
-
role
:
edx_service
edx_role_name
:
"
{{
xqwatcher_role_name
}}"
edx_service_name
:
"
{{
xqwatcher_service_name
}}"
edx_service_repos
:
"
{{
XQWATCHER_REPOS
}}"
edx_service_user
:
"
{{
xqwatcher_user
}}"
edx_service_home
:
"
{{
xqwatcher_app_dir
}}"
-
role
:
supervisor
supervisor_app_dir
:
"
{{
xqwatcher_supervisor_app_dir
}}"
supervisor_data_dir
:
"
{{
xqwatcher_supervisor_data_dir
}}"
...
...
playbooks/roles/xqwatcher/tasks/deploy.yml
View file @
fe8b6261
-
name
:
install read-only ssh key
copy
:
>
content="{{ XQWATCHER_GIT_IDENTITY }}" dest={{ xqwatcher_git_identity }}
owner={{ xqwatcher_user }} group={{ xqwatcher_user }} mode=0600
-
name
:
write out watcher config file
template
:
>
src=edx/app/xqwatcher/xqwatcher.json.j2
...
...
@@ -15,7 +10,4 @@
-
include
:
deploy_courses.yml
tags
:
-
deploy-courses
-
name
:
remove read-only ssh key for the content repo
file
:
path={{ xqwatcher_git_identity }} state=absent
-
deploy-courses
\ No newline at end of file
playbooks/roles/xqwatcher/tasks/deploy_watcher.yml
View file @
fe8b6261
...
...
@@ -2,13 +2,6 @@
# The watcher can watch one or many queues and dispatch submissions
# to the appropriate grader which lives in a separate SCM repository.
-
name
:
checkout watcher code
git
:
>
dest={{ xqwatcher_code_dir }} repo={{ xqwatcher_source_repo }} version={{ XQWATCHER_VERSION }}
accept_hostkey=yes
ssh_opts="{{ xqwatcher_git_ssh_opts }}"
register
:
xqwatcher_checkout
-
name
:
install application requirements
pip
:
>
requirements="{{ xqwatcher_requirements_file }}"
...
...
@@ -40,7 +33,4 @@
-
name
:
update supervisor configuration
shell
:
"
{{
xqwatcher_supervisor_ctl
}}
-c
{{
xqwatcher_supervisor_app_dir
}}/supervisord.conf
update"
when
:
not disable_edx_services
notify
:
restart xqwatcher
-
include
:
tag_ec2.yml tags=deploy
when
:
COMMON_TAG_EC2_INSTANCE
notify
:
restart xqwatcher
\ No newline at end of file
playbooks/roles/xqwatcher/tasks/tag_ec2.yml
deleted
100644 → 0
View file @
da089ad4
---
-
name
:
get instance information
action
:
ec2_facts
-
name
:
tag instance
ec2_tag
:
resource={{ ansible_ec2_instance_id }} region={{ ansible_ec2_placement_region }}
args
:
tags
:
"
version:xqwatcher"
:
"
{{
xqwatcher_source_repo
}}
{{
xqwatcher_checkout.after|truncate(7,True,'')
}}"
when
:
xqwatcher_checkout.after is defined
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