Commit b9a5b5d5 by e0d

Code review comments and general cleanup

removing stub code

use ssh_opts

whitespace

whitespace

whitespace

ssh_opts

whitespace

whitespace

Comments

comments.
parent 3bfc9995
......@@ -9,7 +9,7 @@
#
##
# Defaults for role xqwatcher
#
#
#
# vars are namespace with the module name.
......@@ -27,7 +27,8 @@ xqwatcher_code_dir: "{{ xqwatcher_app_dir }}/src"
xqwatcher_conf_dir: "{{ xqwatcher_home }}/conf.d"
xqwatcher_data_dir: "{{ xqwatcher_home }}/data"
xqwatcher_source_repo: "git@github.com:edx/xqueue-watcher.git"
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"
......
......@@ -10,9 +10,7 @@
#
#
# Handlers for role xqwatcher
#
#
# Overview:
#
#
- name: notify me
debug: msg="stub handler"
#
......@@ -9,13 +9,13 @@
#
##
# Role includes for role xqwatcher
#
#
# the role name are service name differ by _ and -, the latter isn't safe
# 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_name: "{{ xqwatcher_service_name }}"
- role: supervisor
supervisor_app_dir: "{{ xqwatcher_supervisor_app_dir }}"
supervisor_data_dir: "{{ xqwatcher_supervisor_data_dir }}"
......
......@@ -3,15 +3,23 @@
content="{{ XQWATCHER_GIT_IDENTITY }}" dest={{ xqwatcher_git_identity }}
owner={{ xqwatcher_user }} group={{ xqwatcher_user }} mode=0600
- name: upload ssh script
template: >
src=git_ssh.sh.j2 dest=/tmp/git_ssh.sh
owner={{ xqwatcher_user }} mode=750
- include: deploy_watcher.yml tags=deploy-watcher
# - name: upload ssh script
# template: >
# src=git_ssh.sh.j2 dest=/tmp/git_ssh.sh
# owner={{ xqwatcher_user }} mode=750
- name: remove read-only ssh key for the content repo
file: path=/tmp/git_ssh.sh state=absent
- include: deploy_watcher.yml
tags:
- deploy-watcher
- deploy
- include: deploy_courses.yml
tags:
- deploy-courses
- deploy
- include: deploy_courses.yml tags=deploy-courses
- name: remove read-only ssh key for the content repo
file: path={{ xqwatcher_git_identity }} state=absent
\ No newline at end of file
# Iterates over the data structure documented in tasks/main.yml
# checking out the grader code from the repository specified on
# a per queue basis.
- name: checkout grader code
git: >
dest={{ xqwatcher_data_dir }}/{{ item.COURSE }} repo={{ item.GIT_REPO }}
version={{ item.GIT_REF }}
accept_hostkey=yes
environment:
GIT_SSH: /tmp/git_ssh.sh
ssh_opts="{{ xqwatcher_git_ssh_opts }}"
sudo: true
sudo_user: "{{ xqwatcher_user }}"
with_items: XQWATCHER_COURSES
# Installs the xqueue watcher code and supervisor scripts.
# 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
environment:
GIT_SSH: /tmp/git_ssh.sh
ssh_opts="{{ xqwatcher_git_ssh_opts }}"
sudo: true
sudo_user: "{{ xqwatcher_user }}"
......
......@@ -10,7 +10,7 @@
#
#
# Tasks for role xqwatcher
#
#
# Overview:
#
# This play installs a sandboxed, pull grader that integrates with XQueue. The
......@@ -88,7 +88,7 @@
#
- include: code_jail.yml CODE_JAIL_COMPLAIN=false
- name: create conf dir
file: >
path="{{ xqwatcher_conf_dir }}"
......@@ -96,7 +96,6 @@
owner="{{ xqwatcher_user }}"
group="{{ xqwatcher_user }}"
- name: create supervisor dirs
file: >
path="{{ xqwatcher_conf_dir }}"
......@@ -105,13 +104,13 @@
group="{{ xqwatcher_user }}"
with_items:
- "{{ xqwatcher_supervisor_data_dir }}"
- "{{ xqwatcher_supervisor_log_dir }}"
- "{{ xqwatcher_supervisor_log_dir }}"
- name: write out course config files
template: >
src=edx/app/xqwatcher/conf.d/course.json.j2
dest={{ xqwatcher_conf_dir }}/{{ item.COURSE }}.json
mode=0644 owner={{ xqwatcher_user }} group={{ xqwatcher_user }}
with_items: XQWATCHER_COURSES
- include: deploy.yml tags=deploy
#!/bin/sh
exec /usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i {{ xqwatcher_git_identity }} "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment