Commit 375bcebb by John Jarvis

removing edx-update.sh

parent d92ba0ea
......@@ -78,25 +78,8 @@
- logging
- update
# Install ssh keys for ubuntu account to be able to check out from edx-platform
# Temprory behavior, not needed after June 1. Perhaps still useful as a recipe.
# {{ secure_dir }} is relative to the top-level playbooks dir so there is some
- name: install read-only ssh key for edx-platform repo (private)
copy: src={{ secure_dir }}/files/git-identity dest=/etc/git-identity force=yes owner=ubuntu group=adm mode=600
tags:
- lms
- cms
- update
- name: upload ssh script
copy: src=git_ssh.sh dest=/tmp/git_ssh.sh force=yes owner=root group=adm mode=750
tags:
- lms
- cms
- update
- name: upload sudo config for key forwarding as root
copy: src=ssh_key_forward dest=/etc/sudoers.d/ssh_key_forward validate='visudo -c -f %s'
- include: create_venv.yml
- include: edx_logging_base.yml
- include: software_update.yml
#!/bin/bash
# Placed by ansible; some hardcoded values originate from variables substituted
# by jinja
function usage() {
echo "update.sh [cms|lms|all|none]"
echo " option is what services to collectstatic and restart (default=all)"
}
if [ $# -gt 1 ]; then
usage
exit 1
fi
if [ $# == 0 ]; then
do_CMS=1
do_LMS=1
else
case $1 in
cms)
do_CMS=1
;;
lms)
do_LMS=1
;;
both|all)
do_CMS=1
do_LMS=1
;;
none)
;;
*)
usage
exit 1
;;
esac
fi
function run() {
echo
echo "======== $@"
$@
}
source /etc/profile
source {{venv_dir}}/bin/activate
export PATH=$PATH:/opt/www/.gem/bin
cd {{edx_platform_code_dir}}
BRANCH="origin/feature/edx-west/stanford-theme"
run git fetch origin -p
run git checkout $BRANCH
if [[ $do_CMS ]]; then
export SERVICE_VARIANT=cms
run rake cms:gather_assets:aws
run sudo restart cms
fi
if [[ $do_LMS ]]; then
export SERVICE_VARIANT=lms
run rake lms:gather_assets:aws
run sudo restart lms
fi
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