summaryrefslogtreecommitdiffstats
path: root/tools/pharos-dashboard/deploy.org
diff options
context:
space:
mode:
authormaxbr <maxbr@mi.fu-berlin.de>2016-07-29 12:43:43 +0200
committerMax Breitenfeldt <max.breitenfeldt@gmail.com>2016-07-29 11:25:20 +0000
commit35c34c690ae9616d791c39fa218fe1621fa8d8d2 (patch)
tree6168caaeb4be9144ed6bfde0150850d6559c8b6f /tools/pharos-dashboard/deploy.org
parent7ae1f204de947a3c12804c04f32e20d45eb99eba (diff)
import pharos dashboard code
JIRA: RELENG-12 The last commit was missing some JS/CSS dependencies of the site. This happened because they are in folders that are named 'build' or 'dist'. This commit adds a bower.json file, that specifies dependencies. Dependencies can now be installed by running 'bower install' in the dashboard/static folder. Change-Id: I054f319c66771f767e97711cb678d79d3bd6bee4 Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'tools/pharos-dashboard/deploy.org')
-rw-r--r--tools/pharos-dashboard/deploy.org45
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/pharos-dashboard/deploy.org b/tools/pharos-dashboard/deploy.org
new file mode 100644
index 00000000..b8399215
--- /dev/null
+++ b/tools/pharos-dashboard/deploy.org
@@ -0,0 +1,45 @@
+* Database
+
+** Setup
+- sudo -u postgres psql
+- postgres=# CREATE DATABASE pharos_dashboard
+- postgres=# CREATE USER opnfv WITH PASSWORD 'opnfvopnfv'
+- postgres# createuser --interactive
+- postgres# ALTER ROLE opnfv SET client_encoding TO 'utf8';
+- postgres# ALTER ROLE opnfv SET default_transaction_isolation TO 'read committed';
+- postgres# ALTER ROLE opnfv SET timezone TO 'UTC';
+- postgres# GRANT ALL PRIVILEGES ON DATABASE pharos_dashboard TO opnfv;
+
+** Dump data
+
+- log out all users, stop server
+- (venv) # python manage.py dumpdata > dashboard/fixtures/<dump_name>.json
+
+** Load dump
+
+- setup clean database, run migrate
+- (venv) # python manage.py loaddata <dump_name>
+
+* Django
+
+** Virtualenv setup
+
+- # virtualenv venv
+- # source venv/bin/activate
+- (venv) # pip install -r requirements.txt
+
+** initializing or after change in models.py
+
+- (venv) # python manage.py makemigrations
+- (venv) # python manage.py migrate
+
+** Development
+
+- (venv) # python manage.py runserver
+- (venv) # python manage.py shell
+
+* Dependencies
+
+Javascript / CSS dependencies are managed with bower. To install them, you have to install bower, switch directory to the dashboard/static folder and run
+# bower install
+Bower will download and install the right versions of all the static files.