openbare is a digital asset library system, implemented on Django.
The system started out with the intend to provide access to Public Cloud accounts for everyone at SUSE. At the onset of the project is was hoped that implementation of the framework could be sufficiently generalized to provide functionality for pretty much anything that one might keep track of that fits the concept of a Public Library. Once the first plugin was developed to manage AWS IAM access this hope was realized and the project moved from a private repository to a public repository in the hopes that others will find the system useful and will contribute back to the project.
We'd like to thank SUSE for sponsoring our work and enabling us to set up the project in a company independent way.
- python > 3.2
- Django ~ 1.8.4
- python-social-auth
- django-debug-toolbar
- django-markdown-deux
- django-split-settings
- boto3
-
Add a repository from OBS devel:languages:python3 appropriate for your distribution to your system.
-
Install all dependencies
zypper in python3-Django python3-python-social-auth \ python3-django-debug-toolbar python3-django-markdown-deux \ python3-django-split-settings python3-boto3
-
Get in position
cd openbare
-
Create your local settings
cp openbare/settings/local_development.py.template \ openbare/settings/local_development.py edit openbare/settings/local_development.py
-
Setup the database
python3 manage.py migrate python3 manage.py createsuperuser
-
Test-run the server
python3 manage.py runserver
Browse to
http://localhost:8000
-
Log into the admin interface and create a resource.
-
Browse to
http://localhost:8000/admin/library/resource
. You will be redirected to the login page. -
Log in with the superuser credentials you created when you setup the database.
-
Click 'Add resource'
-
Fill out the form, and click 'Save'
-
As root...
sudo -i
-
Install Apache and Postgresql
zypper ar --refresh http://download.opensuse.org/repositories/devel:/languages:/python3/SLE_12_SP1/devel:languages:python3.repo zypper ar --refresh http://download.opensuse.org/repositories/Apache:/Modules/SLE_12_SP1/Apache:Modules.repo zypper in apache apache2-mod_wsgi-python3 postgresql94-server python3-psycopg2
-
Install openbare
# temporary home of openbare zypper in --no-recommends http://download.opensuse.org/repositories/home:/bear454/SLE_12_SP1/noarch/openbare-0.2.0-1.1.noarch.rpm
-
Setup Postgresql
systemctl enable postgresql systemctl start postgresql su - postgres createdb openbare psql CREATE ROLE openbare WITH PASSWORD "[secret-database-password]"; ALTER ROLE openbare WITH LOGIN; CREATE DATABASE openbare WITH OWNER openbare; GRANT ALL PRIVILEGES ON DATABASE openbare TO openbare; \q logout
-
Setup Apache
edit /etc/sysconfig/apache2 # add 'wsgi' to APACHE_MODULES # verify apachectl -M | grep wsgi # create a new config mv /etc/apache2/default-server.conf /etc/apache2/default-server.conf.orig echo " Alias /static/ /srv/www/openbare/static/ <Directory /srv/www/openbare/static> Require all granted Options FollowSymLinks </Directory> WSGIScriptAlias / /srv/www/openbare/openbare/wsgi.py WSGIPythonPath /srv/www/openbare <Directory /srv/www/openbare> <Files wsgi.py> Require all granted </Files> </Directory> " > /etc/apache2/default-server.conf systemctl enable apache2
-
Configure openbare
for file in /etc/openbare/settings_*.py.template; do cp "$file" "${file%.template}"; done edit /etc/openbare/settings_*.py openbare-manage migrate openbare-manage createsuperuser
-
Start Apache!
systemctl start apache2
- Getting started with Django: https://www.djangoproject.com/start/
- About Python 3: https://docs.djangoproject.com/en/1.8/topics/python3/
- OpenID authentication module: http://psa.matiasaguirre.net/
- Twitter Bootstrap UI framework: http://getbootstrap.com/getting-started/
- 'Yeti' theme: http://bootswatch.com/yeti/
- FontAwesome icons: http://fontawesome.io/examples/ http://fontawesome.io/cheatsheet/