Add basic LOC SMS support for theo-server machine
This commit is contained in:
parent
1b227a8d32
commit
6b88090587
12 changed files with 168 additions and 3 deletions
17
machines/theo-server/deploy/theo-common/import-locsms-first.sh.mako
Executable file
17
machines/theo-server/deploy/theo-common/import-locsms-first.sh.mako
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
# sanity check
|
||||
if [ "$USER" != 'rattail' ]; then
|
||||
echo ''
|
||||
echo "Please run this script as 'rattail' user:"
|
||||
echo ''
|
||||
echo " sudo -u rattail $0"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd ${envroot}
|
||||
|
||||
RATTAIL='bin/rattail -c app/quiet.conf -P'
|
||||
|
||||
$RATTAIL import-locsms --no-versioning --warnings
|
||||
$RATTAIL import-versions --runas locsms --warnings -m "initial data from LOC SMS"
|
|
@ -28,6 +28,9 @@ $RATTAIL --runas corepos import-corepos-api --delete
|
|||
% elif env.theo_integrates_with == 'catapult':
|
||||
# Catapult -> Theo
|
||||
$RATTAIL --runas catapult import-catapult --delete
|
||||
% elif env.theo_integrates_with == 'locsms':
|
||||
# LOC SMS -> Theo
|
||||
$RATTAIL --runas locsms import-locsms --delete
|
||||
% endif
|
||||
|
||||
# make sure version data is correct
|
||||
|
|
|
@ -5,6 +5,8 @@ extra-index-url =
|
|||
https://pypi.rattailproject.org/simple/
|
||||
% if env.theo_integrates_with == 'catapult':
|
||||
https://${env.restricted_pypi_username}:${env.restricted_pypi_password}@pypi-restricted.rattailproject.org/catapult/
|
||||
% elif env.theo_integrates_with == 'locsms':
|
||||
https://${env.restricted_pypi_username}:${env.restricted_pypi_password}@pypi-restricted.rattailproject.org/locsms/
|
||||
% endif
|
||||
log-file = ${envroot}/pip.log
|
||||
exists-action = i
|
||||
|
|
|
@ -12,6 +12,8 @@
|
|||
integrate_corepos = true
|
||||
% elif env.theo_integrates_with == 'catapult':
|
||||
integrate_catapult = true
|
||||
% elif env.theo_integrates_with == 'locsms':
|
||||
integrate_locsms = true
|
||||
% endif
|
||||
|
||||
|
||||
|
@ -50,6 +52,20 @@ default.url = catapult://${env.catapult_odbc_username}:${env.catapult_odbc_passw
|
|||
% endif
|
||||
|
||||
|
||||
## begin locsms
|
||||
% if env.theo_integrates_with == 'locsms':
|
||||
|
||||
<%text>##############################</%text>
|
||||
# LOC SMS
|
||||
<%text>##############################</%text>
|
||||
|
||||
[locsms.db]
|
||||
default.url = mssql://${env.locsms_odbc_username}:${env.locsms_odbc_password}@locsms-default
|
||||
|
||||
## end locsms
|
||||
% endif
|
||||
|
||||
|
||||
<%text>##############################</%text>
|
||||
# rattail
|
||||
<%text>##############################</%text>
|
||||
|
@ -90,6 +106,8 @@ script_location = rattail.db:alembic
|
|||
version_locations = rattail_corepos.db:alembic/versions rattail.db:alembic/versions
|
||||
% elif env.theo_integrates_with == 'catapult':
|
||||
version_locations = rattail_onager.db:alembic/versions rattail.db:alembic/versions
|
||||
% elif env.theo_integrates_with == 'locsms':
|
||||
version_locations = rattail_luckysmores.db:alembic/versions rattail.db:alembic/versions
|
||||
% else:
|
||||
version_locations = rattail.db:alembic/versions
|
||||
% endif
|
||||
|
|
|
@ -82,6 +82,30 @@ $PIP install $QUIET --editable .
|
|||
## end catapult
|
||||
% endif
|
||||
|
||||
## begin locsms
|
||||
% if env.theo_integrates_with == 'locsms':
|
||||
|
||||
# luckysmores
|
||||
cd $SRC/luckysmores
|
||||
git pull $QUIET
|
||||
find . -name '*.pyc' -delete
|
||||
$PIP install $QUIET --editable .
|
||||
|
||||
# rattail-luckysmores
|
||||
cd $SRC/rattail-luckysmores
|
||||
git pull $QUIET
|
||||
find . -name '*.pyc' -delete
|
||||
$PIP install $QUIET --editable .
|
||||
|
||||
# tailbone-locsms
|
||||
cd $SRC/tailbone-locsms
|
||||
git pull $QUIET
|
||||
find . -name '*.pyc' -delete
|
||||
$PIP install $QUIET --editable .
|
||||
|
||||
## end locsms
|
||||
% endif
|
||||
|
||||
# theo
|
||||
cd $SRC/theo
|
||||
git pull $QUIET
|
||||
|
@ -96,6 +120,8 @@ $PIP install $QUIET --editable .
|
|||
$PIP install $QUIET --upgrade --upgrade-strategy eager tailbone-theo[app,corepos]
|
||||
% elif env.theo_integrates_with == 'catapult':
|
||||
$PIP install $QUIET --upgrade --upgrade-strategy eager tailbone-theo[app,catapult]
|
||||
% elif env.theo_integrates_with == 'locsms':
|
||||
$PIP install $QUIET --upgrade --upgrade-strategy eager tailbone-theo[app,locsms]
|
||||
% else:
|
||||
$PIP install $QUIET --upgrade --upgrade-strategy eager tailbone-theo[app]
|
||||
% endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue