~jjo/ubuntu-api-website/add-api-website-relations

« back to all changes in this revision

Viewing changes to hooks/install

  • Committer: mhall119
  • Date: 2013-09-20 00:09:07 UTC
  • Revision ID: mhall119@ubuntu.com-20130920000907-tmnnm5ackhyt79hi
Fixes and changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
juju-log "Creating deployment directories..."
55
55
mkdir -p ${DEPLOY_ROOT} ${DEPLOY_ROOT}/local_config ${DEPLOY_ROOT}/scripts ${DEPLOY_ROOT}-logs /srv/${BASEDIR}/var
 
56
 
56
57
juju-log "Branching from ${BZR_SOURCE_BRANCH}:${BZR_SOURCE_REVNO} to ${CODE_LOCATION}-${BZR_SOURCE_REVNO}"
57
58
bzr branch -r ${BZR_SOURCE_REVNO} ${BZR_SOURCE_BRANCH} ${CODE_LOCATION}-${BZR_SOURCE_REVNO}
 
59
 
58
60
juju-log "Creating symlink from ${CODE_LOCATION}-${BZR_SOURCE_REVNO} to ${CODE_LOCATION}"
59
61
ln -s ${CODE_LOCATION}-${BZR_SOURCE_REVNO} ${CODE_LOCATION}
60
 
ln -s ${CODE_LOCATION}-${BZR_SOURCE_REVNO}/django.wsgi ${CODE_LOCATION}-${BZR_SOURCE_REVNO}/wsgi.py
61
 
bzr branch -r 53 https://code.launchpad.net/+branch/ubuntu-community-webthemes/developer-django-theme ${CODE_LOCATION}-${BZR_SOURCE_REVNO}/developer_network/ubuntu_website
62
 
 
63
 
juju-log "Creating local settings in ${LOCAL_CONFIG_LOCATION}/local_settings.py"
64
 
juju-log "Creating local settings with URL_ROOT=${URL_ROOT}"
65
 
cat > ${LOCAL_CONFIG_LOCATION}/local_settings.py <<EOF
66
 
# Local instance overrides
67
 
 
68
 
from settings import *
69
 
 
70
 
URL_ROOT = '${URL_ROOT}'
71
 
 
72
 
try:
73
 
    from db_settings import *
74
 
except Exception:
75
 
    pass
76
 
EOF
 
62
 
 
63
bzr branch -r ${BZR_THEME_REVNO} ${BZR_THEME_BRANCH} ${CODE_LOCATION}-${BZR_SOURCE_REVNO}/developer_network/ubuntu_website
 
64
 
 
65
# Update local_settings.py
 
66
update_local_settings
77
67
 
78
68
juju-log "Changing ownership of /srv/${BASEDIR}"
79
69
chown -R $USER_CODE_OWNER:$GROUP_CODE_RUNNER /srv/${BASEDIR}