User Tools

Site Tools


hpc:argobalsam

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpc:argobalsam [2015/03/06 21:33]
jchilders [Git Tag Notes]
hpc:argobalsam [2016/02/24 21:31] (current)
jchilders [Installation]
Line 77: Line 77:
  
 ===== Installation ===== ===== Installation =====
 +  - On Mira: ''soft add +python'' (to get python 2.7)
   - Install <html><a href="http://pypi.python.org/pypi/virtualenv" target="_blank">virtualenv</a></html>   - Install <html><a href="http://pypi.python.org/pypi/virtualenv" target="_blank">virtualenv</a></html>
 +    - ''wget --no-check-certificate http://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.1.0.tar.gz''
   - Create install directory: ''mkdir /path/to/installation/argobalsam''   - Create install directory: ''mkdir /path/to/installation/argobalsam''
   - ''export INST_PATH=/path/to/installation/argobalsam''   - ''export INST_PATH=/path/to/installation/argobalsam''
   - ''cd $INST_PATH''   - ''cd $INST_PATH''
   - Create virtual environment: ''virtualenv argobalsam_env''   - Create virtual environment: ''virtualenv argobalsam_env''
 +    - On Edison:
 +      - ''module load virtualenv''
 +      - ''module load python/2.7''
   - Activate virtual environment: ''. argobalsam_env/bin/activate''   - Activate virtual environment: ''. argobalsam_env/bin/activate''
 +    - On Edison:
 +      - To use ''pip'' you need a certificate so run ''mk_pip_cabundle.sh'', then include ''%%--%%cert ~/.pip/cabundle'' in all your pip commands.
   - Install needed software:   - Install needed software:
-    - ''pip install django==1.6.2''  (necessary for python 2.6, if you have 2.7 you can go to higher django version)+    - ''pip install django'' 
 +      - if you have less than python-2.7 you need ''pip install django==1.6.2''
     - ''pip install south''     - ''pip install south''
     - ''pip install pika''     - ''pip install pika''
-    - ''pip install MySql''+    - ''pip install MySql'' (only if needed)
       - For this I had to install on SLC6 ''yum install mysql mysql-devel mysql-server''       - For this I had to install on SLC6 ''yum install mysql mysql-devel mysql-server''
-  - Create django project: ''django-admin.py startproject argobalsam_deploy'' +  - Create django project: ''django-admin.py startproject argobalsam'' 
-  - Grab software from git repo: ''git clone [email protected]:balsam.git argobalsam_deploy''  You may have to force git to write to an already existing folder, or checkout into one directory and move the files into the ''argobalsam_deploy'' directory. +  - ''cd argobalsam'' 
-  - Update the following line of the ''argobalsam_deploy/argobalsam_deploy/settings.py'' file to import the site-specific settings that are needed (may need a new one):<code python>+  - ''git clone [email protected]:balsam.git argobalsam_git'' 
 +  ''mv argobalsam_git/* ./'' 
 +  - ''rm -rf argobalsam_git/'' 
 +  - Update the following lines of ''argobalsam/settings.py'':  
 +    At the Top:<code python>
 from site_settings.mira_settings import * from site_settings.mira_settings import *
 </code> </code>
-  Move to the argobalsam_deploy directory with the ''manage.py'' script inside+    <code python>  
-  - Sync your database <code bash> python manage.py syncdb </code> +INSTALLED_APPS = ( 
-  - Create the first migration <code bash> python manage.py schemamigration balsam_core --initial </code> +    'django.contrib.admin'
-  - Apply the first migration <code bash> python manage.py migrate balsam_core --fake </code> +    'django.contrib.auth'
-  - Create the first migration <code bash> python manage.py schemamigration argo_core --initial </code> +    'django.contrib.contenttypes', 
-  - Apply the first migration <code bash> python manage.py migrate argo_core --fake </code> +    'django.contrib.sessions', 
 +    'django.contrib.messages', 
 +    'django.contrib.staticfiles', 
 +    'south', 
 +    'balsam_core', 
 +    'argo_core', 
 +
 +</code> 
 +    - If you are using MySQL: <code python> 
 +DATABASES = { 
 +    'default':
 +        'ENGINE': 'django.db.backends.mysql', 
 +        'NAME': 'your_table_name_goes_here', 
 +        'USER': 'your_login', 
 +        'PASSWORD': 'your_password', 
 +        'HOST': '127.0.0.1', 
 +        'PORT': '', 
 +        'CONN_MAX_AGE': 2000000, 
 +    } 
 +
 +</code> 
 +  - Setup your database:  
 +    - For Older Django using South (pre-1.7):  
 +      - <code bash> python manage.py syncdb </code> 
 +      - Create the first migration <code bash> python manage.py schemamigration balsam_core --initial </code> 
 +      - Apply the first migration <code bash> python manage.py migrate balsam_core --fake </code> 
 +      - Create the first migration <code bash> python manage.py schemamigration argo_core --initial </code> 
 +      - Apply the first migration <code bash> python manage.py migrate argo_core --fake </code> 
 +    - For newer Django (1.7,1.8): 
 +      - <code bash> python manage.py syncdb </code> 
 +    - For Django (1.9+): 
 +      - <code bash> python manage.py migrate --fake-initial </code>
  
 ===== Git Tag Notes ===== ===== Git Tag Notes =====
hpc/argobalsam.1425677636.txt.gz · Last modified: 2015/03/06 21:33 by jchilders