Skip to content

Instantly share code, notes, and snippets.

@michaelkuty
Last active September 12, 2016 11:48
Show Gist options
  • Save michaelkuty/1a7520d9498b5f41228b6839237002c5 to your computer and use it in GitHub Desktop.
Save michaelkuty/1a7520d9498b5f41228b6839237002c5 to your computer and use it in GitHub Desktop.
Deploy leonardo site
#!/bin/bash -e
pip_install_source()
{
REMOTE=$1
EGG=$2
[ -d ../src ] || mkdir ../src
git clone $REMOTE --depth 1 ../src/$EGG
pip install -e ../src/$EGG
}
sudo apt-get install -y python-dev libssl-dev libjpeg-dev
virtualenv -p /usr/bin/python2.7 leonardo_csb
cd leonardo_csb
. $PWD/bin/activate
pip install -e git+https://github.com/django-leonardo/django-leonardo#egg=django-leonardo
pip install -r $PWD/src/django-leonardo/requirements.txt
git clone [email protected]:leonardo-sites/csb-site.git -b develop myproject
export PYTHONPATH=$PWD/myproject
cd $PWD/myproject
pip install setuptools==18.5
pip_install_source "https://github.com/michaelkuty/django-oscar.git" "oscar"
pip_install_source "[email protected]:leonardo-modules/leonardo-store.git" "leonardo_store"
pip_install_source "[email protected]:leonardo-modules/leonardo-store-cz.git" "leonardo_store_cz"
pip_install_source "https://github.com/michaelkuty/django-oscar-accounts.git" "accounts"
pip_install_source "[email protected]:leonardo-modules/leonardo-accounts.git" "leonardo_accounts"
pip_install_source "[email protected]:leonardo-modules/leonardo-csb.git" "csb"
pip_install_source "[email protected]:leonardo-modules/csb-heat.git" "csb_heat"
pip_install_source "[email protected]:leonardo-modules/leonardo-admin-dashboard.git" "leonardo_admin_dashboard"
pip_install_source "https://github.com/andrewgodwin/channels.git" "channels"
pip_install_source "[email protected]:leonardo-modules/leonardo-channels.git" "leonardo_channels"
pip_install_source "[email protected]:leonardo-modules/leonardo-celery.git" "leonardo_celery"
pip_install_source "[email protected]:leonardo-modules/leonardo-module-links.git" "leonardo_module_links"
pip_install_source "[email protected]:leonardo-modules/leonardo-module-forms.git" "leonardo_forms"
pip_install_source "[email protected]:leonardo-themes/o2csb-theme.git" "leonardo_theme_csb"
pip_install_source "[email protected]:leonardo-modules/csb-heat.git" "csb-heat"
pip_install_source "[email protected]:leonardo-modules/csb-openstack.git" "csb-openstack"
pip_install_source "[email protected]:leonardo-modules/csb-azurepack.git" "csb-azurepack"
pip_install_source "[email protected]:leonardo-modules/csb-office365.git" "csb-office36"
# workaround for html5lib
pip install setuptools==18.5
pip install html5lib==0.9999999
pip install raven
#python manage.py makemigrations --noinput
#python manage.py migrate --noinput
#python manage.py sync_all -f
# python manage.py bootstrap_site --url=http://github.com/django-leonardo/django-leonardo/raw/master/contrib/bootstrap/demo.yaml
./restore-site.sh
python manage.py sync_all -f
python manage.py runserver
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment