-
Notifications
You must be signed in to change notification settings - Fork 69
Developer Installation
These instructions were written to document one collaborator's setup prior to development (macOS 10.12.3). Setup on your machine may be different. If things don't work, please ask!
First, satisfy a couple of requirements:
-
Install Python 3.7+ (homebrew, python.org, etc)
-
If you don't have pip install it with:
sudo easy_install pip3
-
If you don't already have virtualenv:
-
As of 10.11 or later SIP protects the
/Library/Python/2.7/site-packagesdirectory so you must install with the--userflag which will install the package to$HOME/Library/Python/2.7/binby default. Install with:pip3 install --user virtualenv
-
You will also want to add the above to your shell
PATH. Changes might be required if you are not using the bourne again shell (bash) shell.echo export PATH="\$PATH:\$HOME/Library/Python/2.7/bin" | tee -a $HOME/.bash_profile echo export PATH="\$PATH:\$HOME/Library/Python/3.7/bin" | tee -a $HOME/.bash_profile
-
-
(Kind of optional) Grab the latest PostgreSQL installer for your platform from http://www.postgresql.org/download. Development can use the sqlite3 default database, but the python packages won't install without postgresql available.
-
If you are intending on sending pull requests to the project, fork Sal on GitHub.
-
Clone your fork or the master repo
git clone <your fork's URL>
-
Set up a virtual environment for Sal.
cd <sal repository folder>virtualenv -p python3.7 sal_env
-
Activate the virtual environment:
source sal_env/bin/activate(For Bash shell) -
Install python package dependencies.
pip3 install -r requirements.txt
- If the the cryptography package fails because it was already installed on your system. Editing
<projectdir>/setup/requirements.txtto remove the version number supplied with the cryptography package and re-running the pip install command. - Even though development will just use the sqlite database, the psycopg2 package needs PostgreSQL installed. After installation it was not the path, so a
PATH=$PATH:/Library/PostgreSQL/added the install directory withpg_configto the path and allowed pip to finish installing the dependencies.
We need to set up the development configuration.
- Copy the
example_settings.pyfile to be the activesettings.pyfile:cp sal/example_settings.py sal/settings.py. This configures sqlite as our database. -
settings.pyimportssystem_settings.py. Editsettings.pyto override the following items as needed (look at their default definitions insystem_settings.py-- put your modifications insettings.py):- Set
DEBUG = Trueto enable debug mode. - Set ADMINS to an administrative name and email
- Set TIME_ZONE to the appropriate timezone
- Set DISPLAY_NAME to what you want the header to be
- This is enough to get you going. See Settings for more options in detail.
- Set
python manage.py makemigrationspython manage.py migratepython manage.py collectstatic- Create the admin user:
python manage.py createsuperuser
- Start Sal in debug mode with
python manage.py runserver - Visit http://127.0.0.1:8000 in your web browser.
- Brute force protection
- LDAP integration
- Active Directory integration
- API
- Usage reporting
- License Management
- Maintenance
- Search
- Troubleshooting
- SAML
- IAM Authentication for AWS RDS Postgres
- Docker
- Ubuntu 14.04
- Ubuntu 16.04
- RHEL 7
- Kubernetes
- Heroku?