Required: Python 2.7 with numpy and scipy. A prepackaged distribution, such as Enthought Python can simplify this process significantly.
-
Unpack or checkout the rmidb2 distribution.
wget -O rmidb2-master.zip 'https://codeload.github.com/edwardsnj/rmidb2/zip/master' unzip rmidb2-master.zip cd rmidb2-master
or
git clone https://github.com/edwardsnj/rmidb2.git cd rmidb2
-
Set
$RMIDB2_HOME
to simplify further instructions (sh derivatives)export RMIDB2_HOME=`pwd`
or (csh derivatives)
setenv RMIDB2_HOME `pwd`
-
Create a python container for RMIDb2 packages and modules.
cd $RMIDB2_HOME virtualenv .python
-
Symbolic link python executable and numpy/scipy.
cd $RMIDB2_HOME ln -s .python/bin/python cd .python/lib/python2.7/site-packages ln -s `python -c 'import numpy; print numpy.__path__[0]'` ln -s `python -c 'import scipy; print scipy.__path__[0]'`
-
Update and install the necessary python modules and packages.
cd $RMIDB2_HOME .python/bin/pip install -U pip setuptools .python/bin/pip install -r req0.txt .python/bin/pip install -r req1.txt
-
Reinstate the .egg-info directory
cd $RMIDB2_HOME ./python setup.py install_egg_info
-
Initialize the SQLite3 database.
cd $RMIDB2_HOME ./python initdb.py
-
Start RMIDb on localhost:8080.
cd $RMIDB2_HOME ./python start-rmidb2.py
Requires: Local installation as above. AWS credentials in $HOME/.aws/config
.
-
Install Elastic Beanstalk command-line interface.
cd $RMIDB2_HOME .python/bin/pip install awsebcli ln -s .python/bin/eb
-
Configure the EB parameters. The
SMTPUSER
,SMTPPASS
,S3BUCKET
parameters can be left as is. Change theNAME
paramter to something reasonable.cd $RMIDB2_HOME cp eb/config.empty.sh eb/config.sh vi eb/config.sh
-
Initialize the eb directory for Elastic Beanstalk. Choose the Python 2.7 container and select the appropriate ssh key.
cd $RMIDB2_HOME (cd eb; ./init.sh)
-
Build the web-application for Elastic Beanstalk.
cd $RMIDB2_HOME ./eb/build.sh
-
Start the RMIDb2 Elastic Beanstalk instance. Instance will be at
$NAME.elasticbeanstalk.com
.cd $RMIDB2_HOME ./eb/start.sh
-
To update the RMIDb application without stopping the instance:
cd $RMIDB2_HOME ./eb/deploy.sh
-
To stop the RMIDb Elastic Beanstalk instance:
cd $RMIDB2_HOME ./eb/stop.sh