Overview
Atlassian Sourcetree is a free Git and Mercurial client for Windows.
Atlassian Sourcetree is a free Git and Mercurial client for Mac.
This is a Loraine Lab fork of the Cytoscape App Store code, with some changes.
- The Cytoscape App code branch
wip
(work-in-progress) branch is ourmaster
branch - The Cytoscape App code branch
master
branch is ourmaster-old
branch
We are using this repository to develop an IGB App Store, working from the Cytoscape code base.
We hope our changes can be incorporated into the Cytoscape App Store code, which is hosted here:
Link to Instructions for CytoScape setup
Steps to set up on EC-2:
Login to the ec2 instance using the pem file. Find more here (For Ubuntu AMI, The username is 'ubuntu') Once logged in, follow the steps below:
Use virtualenv to install dependencies. sudo pip3 install virtualenv
usage info
- Use
sudo apt-get update
to update the package lists. - cd to your home directory.
cd ~
Fork this repo, and then clone the repo from your own bitbucket usinggit clone git@bitbucket.org:<username>/appstore.git CyAppStore
First, we need to enable ssh into your bitbucket. Follow the instructions here to create a public and private ssh keys and add it to the bitbucket account.
Then clone the repository. - cd into CyAppStore
cd CyAppStore
and add logs directory:mkdir logs
sudo chgrp -R www-data *
andsudo chgrp -R www-data .git*
-
use
./installDependencies.sh
to install all the dependencies required by the Appstore. you may need to give permission to execute the file using chmod command -
Install Xapian (Optional for now) Detailed steps here
curl -O https://oligarchy.co.uk/xapian/1.4.7/xapian-core-1.4.7.tar.xz
curl -O https://oligarchy.co.uk/xapian/1.4.7/xapian-omega-1.4.7.tar.xz
curl -O https://oligarchy.co.uk/xapian/1.4.7/xapian-bindings-1.4.7.tar.xz
tar xf xapian-core-1.4.7.tar.xz
tar xf xapian-omega-1.4.7.tar.xz
tar xf xapian-bindings-1.4.7.tar.xz
Xapian Core:
cd xapian-core-1.4.7
then./configure
thenmake
followed bysudo make install
Xapian Omega:
sudo apt-get install libmagic-dev
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
cd ../xapian-omega-1.4.7
then./configure
thenmake
followed bysudo make install
Xapian bindings:
cd ../xapian-bindings-1.4.7
then./configure
thenmake
followed bysudo make install
GeoIP: (Optional for now)
cd ~/CyAppStore/download/geolite directory
, and thenmake
.apt-cache search geoip
sudo apt-get install libgeoip-dev -y
- Copy all the files with ‘-template.py’ end with their names after removing ‘-template’ part (dbs-template.py, apikeys-template.py, geoip-template.py, mvn-template.py, emails-template.py) Eg. ‘cp dbs-template.py dbs.py’
- cd
~/CyAppStore/
and thencp maven-app-repo-settings-template.xml maven-app-repo-settings.xml
Set-up MySQL-server:
- make sure mysql-server is installed.
- Set up mysql security settings like root password using
sudo mysql_secure_installation
-
To see if the mysql server is running, use
sudo systemctl status mysql.service
refer this link for more information -
Create a database in mysql. You can enter MySQL client using
mysql -u <username> -p
However, root user needs to use sudo to enter databse. query for creting new database (named testdjango) is:create database testdjango
- Create new user in mysql, other than root, which we will be used by django app to accesst the db:
a. enter mysql with root:sudo mysql -u root -p
b.create user 'igbuser'@'localhost' identified by 'Igb@1234';
c.grant usage on *.* to 'igbuser'@'localhost';
d.grant all privileges on testdjango.* to 'igbuser'@'localhost';
- Update the settings.py file in the home folder of the appstore repo to include the database settings:
---settings.py:---
change the database settings:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'testdjango',
'USER': '<username-of-mysql-user>',
'PASSWORD': '<password-of-mysql-user>',
'HOST': 'localhost', # Or an IP Address that your DB is hosted on
'PORT': '3306',
}
}
Setting up Apache
- install mod_wsgi using the instructions from this link
- create a new file CyAppStore.conf in
~/CyAppStore/apache/
. and add following apache config to the file in order to host django app on apache.
#note- give the path to site-packages directory (where django is installed) in the virtual enviornment ('appstoreEnv' here). doesnt work without virtual environment. WSGIDaemonProcess cyappstore python-path= /home/<username>/CyAppStore/appstoreEnv/lib/python3.6/site-packages WSGIProcessGroup cyappstore Alias /static /home/<username>/CyAppStore/static #path to wsgi config for the django app to be hosted WSGIScriptAlias / /home/<username>/CyAppStore/django.wsgi #Give access to static files like css <Directory /home/<username>/CyAppStore/static> Require all granted </Directory> #give access to django.wsgi <Directory /home/<username>/CyAppStore > <Files django.wsgi> Order deny,allow Require all granted </Files> </Directory>
Note: Change '/home/<username>/CyAppStore' according to your username
Include this config in apache using Include directive: add following line in the /etc/apache/sites-available/000-default.conf Include ~/CyAppStore/apache/CyAppStore.conf
Changes to CyAppStore/django.wsgi:
- Change path of SITE_PARENT_DIR to point to the parent directory of the project CyAppStore. i.e.
SITE_PARENT_DIR = ~
- Change the DJANGO_SETTINGS_MODULE i.e.
os.environ['DJANGO_SETTINGS_MODULE'] = 'CyAppStore.settings'
Changes to CyAppStore/settings.py:
- Change SITE_DIR to give absolute path to the CyAppStore directory i.e.
SITE_DIR = ~/CyAppStore
- Find and comment the line starting with-
STATIC_ROOT = SITE_DIR + "/Static/"
- Find comment the line starting with-
filejoin(Site_dir, '/home/jeff
Starting the app:
- Run
python3 manage.py makemigrations
- Run
python3 manage.py migrate
- Run
python3 manage.py runserver 8080
This will host the app on localhost:8080
To run on apache, make sure you performed the steps mentioned above for setting up apache then restart apache using sudo service apache2 restart
Any logs for apache are generated in Ubuntu at- /var/log/apache2