Commit 94496434 by YSC

优化edx安装脚本

parent 53dac4e9
#!/bin/bash
##
## Installs the pre-requisites for running edX on a single Ubuntu 16.04
## Installs the pre-requisites for running edX on a single Ubuntu 12.04
## instance. This script is provided as a convenience and any of these
## steps could be executed manually.
##
......@@ -31,10 +31,10 @@ sudo apt-get upgrade -y
##
## Install system pre-requisites
##
sudo apt-get install -y build-essential software-properties-common curl git-core libxml2-dev libxslt1-dev python-pip libmysqlclient-dev python-apt python-dev libxmlsec1-dev libfreetype6-dev swig gcc g++
sudo pip install --upgrade pip==8.1.2
sudo pip install --upgrade setuptools==24.0.3
sudo -H pip install --upgrade virtualenv==15.0.2
sudo apt-get install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -y build-essential software-properties-common curl git-core libxml2-dev libxslt1-dev python-pip libmysqlclient-dev python-apt python-dev libxmlsec1-dev libfreetype6-dev swig gcc g++
sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade pip==8.1.2
sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade setuptools==24.0.3
sudo -H pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade virtualenv==15.0.2
##
## Overridable version variables in the playbooks. Each can be overridden
......@@ -69,13 +69,21 @@ if [[ -f my-passwords.yml ]]; then
EXTRA_VARS="-e@$(pwd)/my-passwords.yml $EXTRA_VARS"
fi
CONFIGURATION_VERSION=${CONFIGURATION_VERSION-${OPENEDX_RELEASE-master}}
# if [[ -z "${CONFIGURATION_VERSION}" ]]; then
# CONFIGURATION_VERSION=${CONFIGURATION_VERSION-${OPENEDX_RELEASE-master}}
# else
# CONFIGURATION_VERSION="open-release-mongol/ginkgo.master"
# fi
CONFIGURATION_VERSION="open-release-mongol/ginkgo.master"
##
## Clone the configuration repository and run Ansible
##
cd /var/tmp
git clone https://github.com/edx/configuration
git clone https://git.orhontech.com/OpenEdx/configuration
cd configuration
git checkout $CONFIGURATION_VERSION
git pull
......@@ -84,7 +92,7 @@ git pull
## Install the ansible requirements
##
cd /var/tmp/configuration
sudo -H pip install -r requirements.txt
sudo -H pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ -r requirements.txt
##
## Run the edx_sandbox.yml playbook in the configuration/playbooks directory
......
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