diff options
author | 2016-09-26 16:36:11 +0200 | |
---|---|---|
committer | 2016-09-26 16:36:11 +0200 | |
commit | 6cd7c021a40a50e35ad5788d10a6357465c276ad (patch) | |
tree | c0b814e4d0dca4443ab468fd13c750c215ad81d0 /pharos-dashboard | |
parent | 4ef75ec4b7012de37598ae4a99b0f5580b579bea (diff) |
Restructure dashboard project for docker deploying
Change-Id: I13cad51270504ee4bed8558598a8891af58a26ab
Signed-off-by: maxbr <maxbr@mi.fu-berlin.de>
Diffstat (limited to 'pharos-dashboard')
-rw-r--r-- | pharos-dashboard/.gitignore | 12 | ||||
-rw-r--r-- | pharos-dashboard/Makefile | 35 | ||||
-rw-r--r-- | pharos-dashboard/celerybeat-schedule | bin | 16384 -> 0 bytes | |||
-rw-r--r-- | pharos-dashboard/config.env.sample | 18 | ||||
-rw-r--r-- | pharos-dashboard/config/nginx/pharos_dashboard.conf | 24 | ||||
-rwxr-xr-x | pharos-dashboard/config/postgres/docker-entrypoint-initdb.d/pharos_dashboard.sh | 14 | ||||
-rw-r--r-- | pharos-dashboard/deploy.org | 45 | ||||
-rw-r--r-- | pharos-dashboard/docker-compose.yml | 69 | ||||
-rw-r--r-- | pharos-dashboard/readme.txt | 35 | ||||
-rw-r--r-- | pharos-dashboard/src/account/__init__.py (renamed from pharos-dashboard/account/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/admin.py (renamed from pharos-dashboard/account/admin.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/apps.py (renamed from pharos-dashboard/account/apps.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/forms.py (renamed from pharos-dashboard/account/forms.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/jira_util.py (renamed from pharos-dashboard/account/jira_util.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/middleware.py (renamed from pharos-dashboard/account/middleware.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/migrations/__init__.py (renamed from pharos-dashboard/account/migrations/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/models.py (renamed from pharos-dashboard/account/models.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/rsa.pem (renamed from pharos-dashboard/account/rsa.pem) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/rsa.pub (renamed from pharos-dashboard/account/rsa.pub) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/tests/__init__.py (renamed from pharos-dashboard/account/tests/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/tests/test_general.py (renamed from pharos-dashboard/account/tests/test_general.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/urls.py (renamed from pharos-dashboard/account/urls.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/account/views.py (renamed from pharos-dashboard/account/views.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/api/__init__.py (renamed from pharos-dashboard/api/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/api/serializers.py (renamed from pharos-dashboard/api/serializers.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/api/urls.py (renamed from pharos-dashboard/api/urls.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/api/views.py (renamed from pharos-dashboard/api/views.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/__init__.py (renamed from pharos-dashboard/booking/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/admin.py (renamed from pharos-dashboard/booking/admin.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/apps.py (renamed from pharos-dashboard/booking/apps.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/forms.py (renamed from pharos-dashboard/booking/forms.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/migrations/__init__.py (renamed from pharos-dashboard/booking/migrations/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/models.py (renamed from pharos-dashboard/booking/models.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/tests/__init__.py (renamed from pharos-dashboard/booking/tests/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/tests/test_models.py (renamed from pharos-dashboard/booking/tests/test_models.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/tests/test_views.py (renamed from pharos-dashboard/booking/tests/test_views.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/urls.py (renamed from pharos-dashboard/booking/urls.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/booking/views.py (renamed from pharos-dashboard/booking/views.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/__init__.py (renamed from pharos-dashboard/dashboard/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/admin.py (renamed from pharos-dashboard/dashboard/admin.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/apps.py (renamed from pharos-dashboard/dashboard/apps.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/fixtures/dashboard.json (renamed from pharos-dashboard/dashboard/fixtures/dashboard.json) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/migrations/__init__.py (renamed from pharos-dashboard/dashboard/migrations/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/models.py (renamed from pharos-dashboard/dashboard/models.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/tasks.py (renamed from pharos-dashboard/dashboard/tasks.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/templatetags/__init__.py (renamed from pharos-dashboard/dashboard/templatetags/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/templatetags/jenkins_filters.py (renamed from pharos-dashboard/dashboard/templatetags/jenkins_filters.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/templatetags/jira_filters.py (renamed from pharos-dashboard/dashboard/templatetags/jira_filters.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/urls.py (renamed from pharos-dashboard/dashboard/urls.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/dashboard/views.py (renamed from pharos-dashboard/dashboard/views.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/jenkins/__init__.py (renamed from pharos-dashboard/jenkins/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/jenkins/adapter.py (renamed from pharos-dashboard/jenkins/adapter.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/jenkins/admin.py | 17 | ||||
-rw-r--r-- | pharos-dashboard/src/jenkins/apps.py (renamed from pharos-dashboard/jenkins/apps.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/jenkins/migrations/__init__.py (renamed from pharos-dashboard/jenkins/migrations/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/jenkins/models.py (renamed from pharos-dashboard/jenkins/models.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/jenkins/tasks.py (renamed from pharos-dashboard/jenkins/tasks.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/jenkins/tests.py (renamed from pharos-dashboard/jenkins/tests.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/manage.py (renamed from pharos-dashboard/manage.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/notification/__init__.py (renamed from pharos-dashboard/notification/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/notification/admin.py (renamed from pharos-dashboard/notification/admin.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/notification/apps.py (renamed from pharos-dashboard/notification/apps.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/notification/migrations/__init__.py (renamed from pharos-dashboard/notification_framework/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/notification/models.py (renamed from pharos-dashboard/notification/models.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/notification/signals.py (renamed from pharos-dashboard/notification/signals.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/notification/tasks.py (renamed from pharos-dashboard/notification/tasks.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/notification_framework/__init__.py | 10 | ||||
-rw-r--r-- | pharos-dashboard/src/notification_framework/notification.py (renamed from pharos-dashboard/notification_framework/notification.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/pharos_dashboard/__init__.py (renamed from pharos-dashboard/pharos_dashboard/__init__.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/pharos_dashboard/celery.py (renamed from pharos-dashboard/pharos_dashboard/celery.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/pharos_dashboard/settings.py | 176 | ||||
-rw-r--r-- | pharos-dashboard/src/pharos_dashboard/urls.py (renamed from pharos-dashboard/pharos_dashboard/urls.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/pharos_dashboard/wsgi.py (renamed from pharos-dashboard/pharos_dashboard/wsgi.py) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/static/bower.json (renamed from pharos-dashboard/static/bower.json) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/static/css/theme.css (renamed from pharos-dashboard/static/css/theme.css) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/static/js/booking-calendar.js (renamed from pharos-dashboard/static/js/booking-calendar.js) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/static/js/dataTables-sort.js (renamed from pharos-dashboard/static/js/dataTables-sort.js) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/static/js/datetimepicker-options.js (renamed from pharos-dashboard/static/js/datetimepicker-options.js) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/static/js/flot-pie-chart.js (renamed from pharos-dashboard/static/js/flot-pie-chart.js) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/static/js/fullcalendar-options.js (renamed from pharos-dashboard/static/js/fullcalendar-options.js) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/account/user_list.html (renamed from pharos-dashboard/templates/account/user_list.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/account/userprofile_update_form.html (renamed from pharos-dashboard/templates/account/userprofile_update_form.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/base.html (renamed from pharos-dashboard/templates/base.html) | 5 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/booking/booking_calendar.html (renamed from pharos-dashboard/templates/booking/booking_calendar.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/booking/booking_detail.html (renamed from pharos-dashboard/templates/booking/booking_detail.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/booking/booking_table.html (renamed from pharos-dashboard/templates/booking/booking_table.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/dashboard/ci_pods.html (renamed from pharos-dashboard/templates/dashboard/ci_pods.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/dashboard/dev_pods.html (renamed from pharos-dashboard/templates/dashboard/dev_pods.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/dashboard/jenkins_slaves.html (renamed from pharos-dashboard/templates/dashboard/jenkins_slaves.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/dashboard/resource.html (renamed from pharos-dashboard/templates/dashboard/resource.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/dashboard/resource_all.html (renamed from pharos-dashboard/templates/dashboard/resource_all.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/dashboard/resource_detail.html (renamed from pharos-dashboard/templates/dashboard/resource_detail.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/dashboard/server_table.html (renamed from pharos-dashboard/templates/dashboard/server_table.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/dashboard/table.html (renamed from pharos-dashboard/templates/dashboard/table.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/layout.html (renamed from pharos-dashboard/templates/layout.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/src/templates/rest_framework/api.html (renamed from pharos-dashboard/templates/rest_framework/api.html) | 0 | ||||
-rw-r--r-- | pharos-dashboard/web/Dockerfile | 7 | ||||
-rw-r--r-- | pharos-dashboard/web/requirements.txt | 16 | ||||
-rw-r--r-- | pharos-dashboard/worker/Dockerfile | 8 | ||||
-rw-r--r-- | pharos-dashboard/worker/requirements.txt | 16 |
100 files changed, 455 insertions, 52 deletions
diff --git a/pharos-dashboard/.gitignore b/pharos-dashboard/.gitignore index 2b73909..4154fdd 100644 --- a/pharos-dashboard/.gitignore +++ b/pharos-dashboard/.gitignore @@ -19,8 +19,9 @@ coverage.xml # Django: *.log *.pot -migrations/ -settings.py + +# Celery +celerybeat-schedule.db # KDE: .directory @@ -36,3 +37,10 @@ venv/ # Bower Components: bower_components/ + +# Production settings +config.env + +# rsa key files +rsa.pem +rsa.pub diff --git a/pharos-dashboard/Makefile b/pharos-dashboard/Makefile new file mode 100644 index 0000000..e52e15d --- /dev/null +++ b/pharos-dashboard/Makefile @@ -0,0 +1,35 @@ +build: + docker-compose build + +up: + docker-compose up -d + +start: + docker-compose start + +stop: + docker-compose stop + +shell-nginx: + docker exec -ti ng01 bash + +shell-web: + docker exec -ti dg01 bash + +shell-db: + docker exec -ti ps01 bash + +log-nginx: + docker-compose logs nginx + +log-web: + docker-compose logs web + +log-ps: + docker-compose logs postgres + +log-rmq: + docker-compose logs rabbitmq + +log-worker: + docker-compose logs worker diff --git a/pharos-dashboard/celerybeat-schedule b/pharos-dashboard/celerybeat-schedule Binary files differdeleted file mode 100644 index 7e5fe85..0000000 --- a/pharos-dashboard/celerybeat-schedule +++ /dev/null diff --git a/pharos-dashboard/config.env.sample b/pharos-dashboard/config.env.sample new file mode 100644 index 0000000..bd93616 --- /dev/null +++ b/pharos-dashboard/config.env.sample @@ -0,0 +1,18 @@ +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG=False + +DB_NAME=sample_name +DB_USER=sample_user +DB_PASS=sample_pass +DB_SERVICE=postgres +DB_PORT=5432 + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY=http://www.miniwebtool.com/django-secret-key-generator/ + +OAUTH_CONSUMER_KEY=sample_key +OAUTH_CONSUMER_SECRET=sample_secret + +JIRA_URL=sample_url +JIRA_USER_NAME=sample_jira_user +JIRA_USER_PASSWORD=sample_jira_pass
\ No newline at end of file diff --git a/pharos-dashboard/config/nginx/pharos_dashboard.conf b/pharos-dashboard/config/nginx/pharos_dashboard.conf new file mode 100644 index 0000000..87b6f8e --- /dev/null +++ b/pharos-dashboard/config/nginx/pharos_dashboard.conf @@ -0,0 +1,24 @@ +upstream web { + ip_hash; + server web:8000; +} + +# portal +server { + listen 80; + server_name localhost; + charset utf-8; + + location /static { + alias /static; + } + + location /media { + alias /media; + } + + location / { + proxy_set_header Host $host; + proxy_pass http://web/; + } +} diff --git a/pharos-dashboard/config/postgres/docker-entrypoint-initdb.d/pharos_dashboard.sh b/pharos-dashboard/config/postgres/docker-entrypoint-initdb.d/pharos_dashboard.sh new file mode 100755 index 0000000..526228a --- /dev/null +++ b/pharos-dashboard/config/postgres/docker-entrypoint-initdb.d/pharos_dashboard.sh @@ -0,0 +1,14 @@ +############################################################################## +# Copyright (c) 2016 Max Breitenfeldt and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + +#!/bin/env bash + +psql -U postgres -c "CREATE USER $DB_USER PASSWORD '$DB_PASS'" +psql -U postgres -c "CREATE DATABASE $DB_NAME OWNER $DB_USER" diff --git a/pharos-dashboard/deploy.org b/pharos-dashboard/deploy.org deleted file mode 100644 index b839921..0000000 --- a/pharos-dashboard/deploy.org +++ /dev/null @@ -1,45 +0,0 @@ -* 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. diff --git a/pharos-dashboard/docker-compose.yml b/pharos-dashboard/docker-compose.yml new file mode 100644 index 0000000..00a8d15 --- /dev/null +++ b/pharos-dashboard/docker-compose.yml @@ -0,0 +1,69 @@ +############################################################################## +# Copyright (c) 2016 Max Breitenfeldt and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + +version: '2' +services: + nginx: + restart: always + image: nginx:latest + container_name: ng01 + ports: + - "80:80" + volumes: + - ./config/nginx:/etc/nginx/conf.d + - /var/lib/pharos_dashboard/static:/static + - /var/lib/pharos_dashboard/media:/media + depends_on: + - web + + web: + restart: always + build: ./web/ + container_name: dg01 + command: bash -c "python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic --no-input && gunicorn pharos_dashboard.wsgi -b 0.0.0.0:8000" + depends_on: + - postgres + links: + - postgres + env_file: config.env + volumes: + - ./src:/src + - /var/lib/pharos_dashboard/static:/static + - /var/lib/pharos_dashboard/media:/media + expose: + - "8000" + + postgres: + restart: always + image: postgres:latest + container_name: ps01 + env_file: config.env + volumes: + - ./config/postgres/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d + - /var/lib/pharos_dashboard/postgresql:/var/lib/postgresql + + rabbitmq: + restart: always + image: rabbitmq:latest + container_name: rm01 + expose: + - "5672" + + worker: + restart: always + build: ./worker/ + command: bash -c "celery -A pharos_dashboard worker -l info -B" + env_file: config.env + links: + - postgres + - rabbitmq + volumes: + - ./src:/src +
\ No newline at end of file diff --git a/pharos-dashboard/readme.txt b/pharos-dashboard/readme.txt new file mode 100644 index 0000000..b21320f --- /dev/null +++ b/pharos-dashboard/readme.txt @@ -0,0 +1,35 @@ +############################################################################## +# Copyright (c) 2016 Max Breitenfeldt and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + +The dashboard is deployed using docker-compose. +Application / database files are saved in /var/lib/pharos_dashboard/. + +Deployment: + +- clone the repository +- complete the config.env.sample file and save it as config.env +- install docker, docker-compose and bower +- run 'bower install' in ./src/static/ to fetch javascript dependencies +- run 'make build' to build the containers +- run 'make up' to run the dashboard + +Updating: + +- make stop +- git pull +- run 'bower install' if javascript dependencies changed +- make build +- make start + +If there is migrations that need user input (like renaming a field), they need to be run manually! + +Logs / Shell access: + +- there is some shortcuts in the makefile
\ No newline at end of file diff --git a/pharos-dashboard/account/__init__.py b/pharos-dashboard/src/account/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/account/__init__.py +++ b/pharos-dashboard/src/account/__init__.py diff --git a/pharos-dashboard/account/admin.py b/pharos-dashboard/src/account/admin.py index 18b2e1a..18b2e1a 100644 --- a/pharos-dashboard/account/admin.py +++ b/pharos-dashboard/src/account/admin.py diff --git a/pharos-dashboard/account/apps.py b/pharos-dashboard/src/account/apps.py index 9814648..9814648 100644 --- a/pharos-dashboard/account/apps.py +++ b/pharos-dashboard/src/account/apps.py diff --git a/pharos-dashboard/account/forms.py b/pharos-dashboard/src/account/forms.py index 7653e2b..7653e2b 100644 --- a/pharos-dashboard/account/forms.py +++ b/pharos-dashboard/src/account/forms.py diff --git a/pharos-dashboard/account/jira_util.py b/pharos-dashboard/src/account/jira_util.py index c333f8c..c333f8c 100644 --- a/pharos-dashboard/account/jira_util.py +++ b/pharos-dashboard/src/account/jira_util.py diff --git a/pharos-dashboard/account/middleware.py b/pharos-dashboard/src/account/middleware.py index 0f1dbd8..0f1dbd8 100644 --- a/pharos-dashboard/account/middleware.py +++ b/pharos-dashboard/src/account/middleware.py diff --git a/pharos-dashboard/account/migrations/__init__.py b/pharos-dashboard/src/account/migrations/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/account/migrations/__init__.py +++ b/pharos-dashboard/src/account/migrations/__init__.py diff --git a/pharos-dashboard/account/models.py b/pharos-dashboard/src/account/models.py index 621f669..621f669 100644 --- a/pharos-dashboard/account/models.py +++ b/pharos-dashboard/src/account/models.py diff --git a/pharos-dashboard/account/rsa.pem b/pharos-dashboard/src/account/rsa.pem index dbd4eed..dbd4eed 100644 --- a/pharos-dashboard/account/rsa.pem +++ b/pharos-dashboard/src/account/rsa.pem diff --git a/pharos-dashboard/account/rsa.pub b/pharos-dashboard/src/account/rsa.pub index cc50e45..cc50e45 100644 --- a/pharos-dashboard/account/rsa.pub +++ b/pharos-dashboard/src/account/rsa.pub diff --git a/pharos-dashboard/account/tests/__init__.py b/pharos-dashboard/src/account/tests/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/account/tests/__init__.py +++ b/pharos-dashboard/src/account/tests/__init__.py diff --git a/pharos-dashboard/account/tests/test_general.py b/pharos-dashboard/src/account/tests/test_general.py index 72e7ea1..72e7ea1 100644 --- a/pharos-dashboard/account/tests/test_general.py +++ b/pharos-dashboard/src/account/tests/test_general.py diff --git a/pharos-dashboard/account/urls.py b/pharos-dashboard/src/account/urls.py index 3962a0c..3962a0c 100644 --- a/pharos-dashboard/account/urls.py +++ b/pharos-dashboard/src/account/urls.py diff --git a/pharos-dashboard/account/views.py b/pharos-dashboard/src/account/views.py index 3b4269d..3b4269d 100644 --- a/pharos-dashboard/account/views.py +++ b/pharos-dashboard/src/account/views.py diff --git a/pharos-dashboard/api/__init__.py b/pharos-dashboard/src/api/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/api/__init__.py +++ b/pharos-dashboard/src/api/__init__.py diff --git a/pharos-dashboard/api/serializers.py b/pharos-dashboard/src/api/serializers.py index 78e6020..78e6020 100644 --- a/pharos-dashboard/api/serializers.py +++ b/pharos-dashboard/src/api/serializers.py diff --git a/pharos-dashboard/api/urls.py b/pharos-dashboard/src/api/urls.py index 5206ac7..5206ac7 100644 --- a/pharos-dashboard/api/urls.py +++ b/pharos-dashboard/src/api/urls.py diff --git a/pharos-dashboard/api/views.py b/pharos-dashboard/src/api/views.py index 761ce6e..761ce6e 100644 --- a/pharos-dashboard/api/views.py +++ b/pharos-dashboard/src/api/views.py diff --git a/pharos-dashboard/booking/__init__.py b/pharos-dashboard/src/booking/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/booking/__init__.py +++ b/pharos-dashboard/src/booking/__init__.py diff --git a/pharos-dashboard/booking/admin.py b/pharos-dashboard/src/booking/admin.py index 7a7f251..7a7f251 100644 --- a/pharos-dashboard/booking/admin.py +++ b/pharos-dashboard/src/booking/admin.py diff --git a/pharos-dashboard/booking/apps.py b/pharos-dashboard/src/booking/apps.py index 99bf115..99bf115 100644 --- a/pharos-dashboard/booking/apps.py +++ b/pharos-dashboard/src/booking/apps.py diff --git a/pharos-dashboard/booking/forms.py b/pharos-dashboard/src/booking/forms.py index 02ac887..02ac887 100644 --- a/pharos-dashboard/booking/forms.py +++ b/pharos-dashboard/src/booking/forms.py diff --git a/pharos-dashboard/booking/migrations/__init__.py b/pharos-dashboard/src/booking/migrations/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/booking/migrations/__init__.py +++ b/pharos-dashboard/src/booking/migrations/__init__.py diff --git a/pharos-dashboard/booking/models.py b/pharos-dashboard/src/booking/models.py index 200dc83..200dc83 100644 --- a/pharos-dashboard/booking/models.py +++ b/pharos-dashboard/src/booking/models.py diff --git a/pharos-dashboard/booking/tests/__init__.py b/pharos-dashboard/src/booking/tests/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/booking/tests/__init__.py +++ b/pharos-dashboard/src/booking/tests/__init__.py diff --git a/pharos-dashboard/booking/tests/test_models.py b/pharos-dashboard/src/booking/tests/test_models.py index 612b35c..612b35c 100644 --- a/pharos-dashboard/booking/tests/test_models.py +++ b/pharos-dashboard/src/booking/tests/test_models.py diff --git a/pharos-dashboard/booking/tests/test_views.py b/pharos-dashboard/src/booking/tests/test_views.py index e568c15..e568c15 100644 --- a/pharos-dashboard/booking/tests/test_views.py +++ b/pharos-dashboard/src/booking/tests/test_views.py diff --git a/pharos-dashboard/booking/urls.py b/pharos-dashboard/src/booking/urls.py index 5320623..5320623 100644 --- a/pharos-dashboard/booking/urls.py +++ b/pharos-dashboard/src/booking/urls.py diff --git a/pharos-dashboard/booking/views.py b/pharos-dashboard/src/booking/views.py index 2fe167a..2fe167a 100644 --- a/pharos-dashboard/booking/views.py +++ b/pharos-dashboard/src/booking/views.py diff --git a/pharos-dashboard/dashboard/__init__.py b/pharos-dashboard/src/dashboard/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/dashboard/__init__.py +++ b/pharos-dashboard/src/dashboard/__init__.py diff --git a/pharos-dashboard/dashboard/admin.py b/pharos-dashboard/src/dashboard/admin.py index a1463a7..a1463a7 100644 --- a/pharos-dashboard/dashboard/admin.py +++ b/pharos-dashboard/src/dashboard/admin.py diff --git a/pharos-dashboard/dashboard/apps.py b/pharos-dashboard/src/dashboard/apps.py index e0c4f44..e0c4f44 100644 --- a/pharos-dashboard/dashboard/apps.py +++ b/pharos-dashboard/src/dashboard/apps.py diff --git a/pharos-dashboard/dashboard/fixtures/dashboard.json b/pharos-dashboard/src/dashboard/fixtures/dashboard.json index f0ac3b2..f0ac3b2 100644 --- a/pharos-dashboard/dashboard/fixtures/dashboard.json +++ b/pharos-dashboard/src/dashboard/fixtures/dashboard.json diff --git a/pharos-dashboard/dashboard/migrations/__init__.py b/pharos-dashboard/src/dashboard/migrations/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/dashboard/migrations/__init__.py +++ b/pharos-dashboard/src/dashboard/migrations/__init__.py diff --git a/pharos-dashboard/dashboard/models.py b/pharos-dashboard/src/dashboard/models.py index 050834e..050834e 100644 --- a/pharos-dashboard/dashboard/models.py +++ b/pharos-dashboard/src/dashboard/models.py diff --git a/pharos-dashboard/dashboard/tasks.py b/pharos-dashboard/src/dashboard/tasks.py index 4c09bf9..4c09bf9 100644 --- a/pharos-dashboard/dashboard/tasks.py +++ b/pharos-dashboard/src/dashboard/tasks.py diff --git a/pharos-dashboard/dashboard/templatetags/__init__.py b/pharos-dashboard/src/dashboard/templatetags/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/dashboard/templatetags/__init__.py +++ b/pharos-dashboard/src/dashboard/templatetags/__init__.py diff --git a/pharos-dashboard/dashboard/templatetags/jenkins_filters.py b/pharos-dashboard/src/dashboard/templatetags/jenkins_filters.py index e7e1425..e7e1425 100644 --- a/pharos-dashboard/dashboard/templatetags/jenkins_filters.py +++ b/pharos-dashboard/src/dashboard/templatetags/jenkins_filters.py diff --git a/pharos-dashboard/dashboard/templatetags/jira_filters.py b/pharos-dashboard/src/dashboard/templatetags/jira_filters.py index 7020843..7020843 100644 --- a/pharos-dashboard/dashboard/templatetags/jira_filters.py +++ b/pharos-dashboard/src/dashboard/templatetags/jira_filters.py diff --git a/pharos-dashboard/dashboard/urls.py b/pharos-dashboard/src/dashboard/urls.py index f04f5ca..f04f5ca 100644 --- a/pharos-dashboard/dashboard/urls.py +++ b/pharos-dashboard/src/dashboard/urls.py diff --git a/pharos-dashboard/dashboard/views.py b/pharos-dashboard/src/dashboard/views.py index 022a4af..022a4af 100644 --- a/pharos-dashboard/dashboard/views.py +++ b/pharos-dashboard/src/dashboard/views.py diff --git a/pharos-dashboard/jenkins/__init__.py b/pharos-dashboard/src/jenkins/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/jenkins/__init__.py +++ b/pharos-dashboard/src/jenkins/__init__.py diff --git a/pharos-dashboard/jenkins/adapter.py b/pharos-dashboard/src/jenkins/adapter.py index ff0508d..ff0508d 100644 --- a/pharos-dashboard/jenkins/adapter.py +++ b/pharos-dashboard/src/jenkins/adapter.py diff --git a/pharos-dashboard/src/jenkins/admin.py b/pharos-dashboard/src/jenkins/admin.py new file mode 100644 index 0000000..c499670 --- /dev/null +++ b/pharos-dashboard/src/jenkins/admin.py @@ -0,0 +1,17 @@ +############################################################################## +# Copyright (c) 2016 Max Breitenfeldt and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + +from django.conf import settings +from django.contrib import admin + +from jenkins.models import JenkinsSlave + +if settings.DEBUG: + admin.site.register(JenkinsSlave)
\ No newline at end of file diff --git a/pharos-dashboard/jenkins/apps.py b/pharos-dashboard/src/jenkins/apps.py index 41faf60..41faf60 100644 --- a/pharos-dashboard/jenkins/apps.py +++ b/pharos-dashboard/src/jenkins/apps.py diff --git a/pharos-dashboard/jenkins/migrations/__init__.py b/pharos-dashboard/src/jenkins/migrations/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/jenkins/migrations/__init__.py +++ b/pharos-dashboard/src/jenkins/migrations/__init__.py diff --git a/pharos-dashboard/jenkins/models.py b/pharos-dashboard/src/jenkins/models.py index 0875bba..0875bba 100644 --- a/pharos-dashboard/jenkins/models.py +++ b/pharos-dashboard/src/jenkins/models.py diff --git a/pharos-dashboard/jenkins/tasks.py b/pharos-dashboard/src/jenkins/tasks.py index 7c03782..7c03782 100644 --- a/pharos-dashboard/jenkins/tasks.py +++ b/pharos-dashboard/src/jenkins/tasks.py diff --git a/pharos-dashboard/jenkins/tests.py b/pharos-dashboard/src/jenkins/tests.py index 4f350d2..4f350d2 100644 --- a/pharos-dashboard/jenkins/tests.py +++ b/pharos-dashboard/src/jenkins/tests.py diff --git a/pharos-dashboard/manage.py b/pharos-dashboard/src/manage.py index 80c496f..80c496f 100644 --- a/pharos-dashboard/manage.py +++ b/pharos-dashboard/src/manage.py diff --git a/pharos-dashboard/notification/__init__.py b/pharos-dashboard/src/notification/__init__.py index 37dcbdd..37dcbdd 100644 --- a/pharos-dashboard/notification/__init__.py +++ b/pharos-dashboard/src/notification/__init__.py diff --git a/pharos-dashboard/notification/admin.py b/pharos-dashboard/src/notification/admin.py index bcaa1ab..bcaa1ab 100644 --- a/pharos-dashboard/notification/admin.py +++ b/pharos-dashboard/src/notification/admin.py diff --git a/pharos-dashboard/notification/apps.py b/pharos-dashboard/src/notification/apps.py index 2de22c4..2de22c4 100644 --- a/pharos-dashboard/notification/apps.py +++ b/pharos-dashboard/src/notification/apps.py diff --git a/pharos-dashboard/notification_framework/__init__.py b/pharos-dashboard/src/notification/migrations/__init__.py index b5914ce..b5914ce 100644 --- a/pharos-dashboard/notification_framework/__init__.py +++ b/pharos-dashboard/src/notification/migrations/__init__.py diff --git a/pharos-dashboard/notification/models.py b/pharos-dashboard/src/notification/models.py index 2d19918..2d19918 100644 --- a/pharos-dashboard/notification/models.py +++ b/pharos-dashboard/src/notification/models.py diff --git a/pharos-dashboard/notification/signals.py b/pharos-dashboard/src/notification/signals.py index 936c25b..936c25b 100644 --- a/pharos-dashboard/notification/signals.py +++ b/pharos-dashboard/src/notification/signals.py diff --git a/pharos-dashboard/notification/tasks.py b/pharos-dashboard/src/notification/tasks.py index 61ab14a..61ab14a 100644 --- a/pharos-dashboard/notification/tasks.py +++ b/pharos-dashboard/src/notification/tasks.py diff --git a/pharos-dashboard/src/notification_framework/__init__.py b/pharos-dashboard/src/notification_framework/__init__.py new file mode 100644 index 0000000..b5914ce --- /dev/null +++ b/pharos-dashboard/src/notification_framework/__init__.py @@ -0,0 +1,10 @@ +############################################################################## +# Copyright (c) 2016 Max Breitenfeldt and others. +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + + diff --git a/pharos-dashboard/notification_framework/notification.py b/pharos-dashboard/src/notification_framework/notification.py index 84fbcff..84fbcff 100644 --- a/pharos-dashboard/notification_framework/notification.py +++ b/pharos-dashboard/src/notification_framework/notification.py diff --git a/pharos-dashboard/pharos_dashboard/__init__.py b/pharos-dashboard/src/pharos_dashboard/__init__.py index f104c4d..f104c4d 100644 --- a/pharos-dashboard/pharos_dashboard/__init__.py +++ b/pharos-dashboard/src/pharos_dashboard/__init__.py diff --git a/pharos-dashboard/pharos_dashboard/celery.py b/pharos-dashboard/src/pharos_dashboard/celery.py index f60f243..f60f243 100644 --- a/pharos-dashboard/pharos_dashboard/celery.py +++ b/pharos-dashboard/src/pharos_dashboard/celery.py diff --git a/pharos-dashboard/src/pharos_dashboard/settings.py b/pharos-dashboard/src/pharos_dashboard/settings.py new file mode 100644 index 0000000..2c4e8cc --- /dev/null +++ b/pharos-dashboard/src/pharos_dashboard/settings.py @@ -0,0 +1,176 @@ +import os +from datetime import timedelta + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = os.environ['DEBUG'] + +# Application definition + +INSTALLED_APPS = [ + 'dashboard', + 'booking', + 'account', + 'jenkins', + 'notification', + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'django.contrib.humanize', + 'bootstrap3', + 'crispy_forms', + 'rest_framework', +] + +MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'account.middleware.TimezoneMiddleware', +] + +ROOT_URLCONF = 'pharos_dashboard.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [os.path.join(BASE_DIR, 'templates')] + , + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'pharos_dashboard.wsgi.application' + +# Password validation +# https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + +# Internationalization +# https://docs.djangoproject.com/en/1.10/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.10/howto/static-files/ +MEDIA_URL = '/media/' +STATIC_URL = '/static/' + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.10/howto/static-files/ +STATICFILES_DIRS = [ + os.path.join(BASE_DIR, "static"), +] + +LOGIN_REDIRECT_URL = '/' + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = os.environ['SECRET_KEY'] + +BOOTSTRAP3 = { + 'set_placeholder': False, +} + +ALLOWED_HOSTS = ['*'] + +# Database +# https://docs.djangoproject.com/en/1.10/ref/settings/#databases +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': os.environ['DB_NAME'], + 'USER': os.environ['DB_USER'], + 'PASSWORD': os.environ['DB_PASS'], + 'HOST': os.environ['DB_SERVICE'], + 'PORT': os.environ['DB_PORT'] + } +} + + +# Rest API Settings +REST_FRAMEWORK = { + 'DEFAULT_PERMISSION_CLASSES': [ + 'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly' + ], + 'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',) +} + +MEDIA_ROOT = '/media' +STATIC_ROOT = '/static' + +# Jira Settings +CREATE_JIRA_TICKET = False + +JIRA_URL = os.environ['JIRA_URL'] + +JIRA_USER_NAME = os.environ['JIRA_USER_NAME'] +JIRA_USER_PASSWORD = os.environ['JIRA_USER_PASSWORD'] + +OAUTH_CONSUMER_KEY = os.environ['OAUTH_CONSUMER_KEY'] +OAUTH_CONSUMER_SECRET = os.environ['OAUTH_CONSUMER_SECRET'] + +OAUTH_REQUEST_TOKEN_URL = JIRA_URL + '/plugins/servlet/oauth/request-token' +OAUTH_ACCESS_TOKEN_URL = JIRA_URL + '/plugins/servlet/oauth/access-token' +OAUTH_AUTHORIZE_URL = JIRA_URL + '/plugins/servlet/oauth/authorize' + +OAUTH_CALLBACK_URL = JIRA_URL + '/accounts/authenticated' + +# Celery Settings +CELERY_TIMEZONE = 'UTC' + +RABBITMQ_URL = 'rabbitmq' +BROKER_URL = 'amqp://guest:guest@rabbitmq:5672//' + +CELERYBEAT_SCHEDULE = { + 'sync-jenkins': { + 'task': 'jenkins.tasks.sync_jenkins', + 'schedule': timedelta(minutes=5) + }, + 'send-booking-notifications': { + 'task': 'notification.tasks.send_booking_notifications', + 'schedule': timedelta(minutes=5) + }, + 'clean-database': { + 'task': 'dashboard.tasks.database_cleanup', + 'schedule': timedelta(hours=24) + }, +}
\ No newline at end of file diff --git a/pharos-dashboard/pharos_dashboard/urls.py b/pharos-dashboard/src/pharos_dashboard/urls.py index adcb5b8..adcb5b8 100644 --- a/pharos-dashboard/pharos_dashboard/urls.py +++ b/pharos-dashboard/src/pharos_dashboard/urls.py diff --git a/pharos-dashboard/pharos_dashboard/wsgi.py b/pharos-dashboard/src/pharos_dashboard/wsgi.py index 3d43361..3d43361 100644 --- a/pharos-dashboard/pharos_dashboard/wsgi.py +++ b/pharos-dashboard/src/pharos_dashboard/wsgi.py diff --git a/pharos-dashboard/static/bower.json b/pharos-dashboard/src/static/bower.json index f473747..f473747 100644 --- a/pharos-dashboard/static/bower.json +++ b/pharos-dashboard/src/static/bower.json diff --git a/pharos-dashboard/static/css/theme.css b/pharos-dashboard/src/static/css/theme.css index bd15637..bd15637 100644 --- a/pharos-dashboard/static/css/theme.css +++ b/pharos-dashboard/src/static/css/theme.css diff --git a/pharos-dashboard/static/js/booking-calendar.js b/pharos-dashboard/src/static/js/booking-calendar.js index 9cb0f32..9cb0f32 100644 --- a/pharos-dashboard/static/js/booking-calendar.js +++ b/pharos-dashboard/src/static/js/booking-calendar.js diff --git a/pharos-dashboard/static/js/dataTables-sort.js b/pharos-dashboard/src/static/js/dataTables-sort.js index 3072d2f..3072d2f 100644 --- a/pharos-dashboard/static/js/dataTables-sort.js +++ b/pharos-dashboard/src/static/js/dataTables-sort.js diff --git a/pharos-dashboard/static/js/datetimepicker-options.js b/pharos-dashboard/src/static/js/datetimepicker-options.js index d43f5fb..d43f5fb 100644 --- a/pharos-dashboard/static/js/datetimepicker-options.js +++ b/pharos-dashboard/src/static/js/datetimepicker-options.js diff --git a/pharos-dashboard/static/js/flot-pie-chart.js b/pharos-dashboard/src/static/js/flot-pie-chart.js index 3b80b2a..3b80b2a 100644 --- a/pharos-dashboard/static/js/flot-pie-chart.js +++ b/pharos-dashboard/src/static/js/flot-pie-chart.js diff --git a/pharos-dashboard/static/js/fullcalendar-options.js b/pharos-dashboard/src/static/js/fullcalendar-options.js index 22a1b95..22a1b95 100644 --- a/pharos-dashboard/static/js/fullcalendar-options.js +++ b/pharos-dashboard/src/static/js/fullcalendar-options.js diff --git a/pharos-dashboard/templates/account/user_list.html b/pharos-dashboard/src/templates/account/user_list.html index c2b8193..c2b8193 100644 --- a/pharos-dashboard/templates/account/user_list.html +++ b/pharos-dashboard/src/templates/account/user_list.html diff --git a/pharos-dashboard/templates/account/userprofile_update_form.html b/pharos-dashboard/src/templates/account/userprofile_update_form.html index 542ea81..542ea81 100644 --- a/pharos-dashboard/templates/account/userprofile_update_form.html +++ b/pharos-dashboard/src/templates/account/userprofile_update_form.html diff --git a/pharos-dashboard/templates/base.html b/pharos-dashboard/src/templates/base.html index c5da483..5bb5547 100644 --- a/pharos-dashboard/templates/base.html +++ b/pharos-dashboard/src/templates/base.html @@ -67,11 +67,6 @@ Slaves</a> </li> <li> - <a href="{% url 'dashboard:resources' %}"><i - class="fa fa-fw"></i>Resources - </a> - </li> - <li> <a href="{% url 'account:users' %}"><i class="fa fa-fw"></i>Users </a> diff --git a/pharos-dashboard/templates/booking/booking_calendar.html b/pharos-dashboard/src/templates/booking/booking_calendar.html index de3e3b3..de3e3b3 100644 --- a/pharos-dashboard/templates/booking/booking_calendar.html +++ b/pharos-dashboard/src/templates/booking/booking_calendar.html diff --git a/pharos-dashboard/templates/booking/booking_detail.html b/pharos-dashboard/src/templates/booking/booking_detail.html index d3f4753..d3f4753 100644 --- a/pharos-dashboard/templates/booking/booking_detail.html +++ b/pharos-dashboard/src/templates/booking/booking_detail.html diff --git a/pharos-dashboard/templates/booking/booking_table.html b/pharos-dashboard/src/templates/booking/booking_table.html index 216eaf5..216eaf5 100644 --- a/pharos-dashboard/templates/booking/booking_table.html +++ b/pharos-dashboard/src/templates/booking/booking_table.html diff --git a/pharos-dashboard/templates/dashboard/ci_pods.html b/pharos-dashboard/src/templates/dashboard/ci_pods.html index 7ef62a4..7ef62a4 100644 --- a/pharos-dashboard/templates/dashboard/ci_pods.html +++ b/pharos-dashboard/src/templates/dashboard/ci_pods.html diff --git a/pharos-dashboard/templates/dashboard/dev_pods.html b/pharos-dashboard/src/templates/dashboard/dev_pods.html index 2b4b017..2b4b017 100644 --- a/pharos-dashboard/templates/dashboard/dev_pods.html +++ b/pharos-dashboard/src/templates/dashboard/dev_pods.html diff --git a/pharos-dashboard/templates/dashboard/jenkins_slaves.html b/pharos-dashboard/src/templates/dashboard/jenkins_slaves.html index aa74507..aa74507 100644 --- a/pharos-dashboard/templates/dashboard/jenkins_slaves.html +++ b/pharos-dashboard/src/templates/dashboard/jenkins_slaves.html diff --git a/pharos-dashboard/templates/dashboard/resource.html b/pharos-dashboard/src/templates/dashboard/resource.html index c9e5735..c9e5735 100644 --- a/pharos-dashboard/templates/dashboard/resource.html +++ b/pharos-dashboard/src/templates/dashboard/resource.html diff --git a/pharos-dashboard/templates/dashboard/resource_all.html b/pharos-dashboard/src/templates/dashboard/resource_all.html index a770d4e..a770d4e 100644 --- a/pharos-dashboard/templates/dashboard/resource_all.html +++ b/pharos-dashboard/src/templates/dashboard/resource_all.html diff --git a/pharos-dashboard/templates/dashboard/resource_detail.html b/pharos-dashboard/src/templates/dashboard/resource_detail.html index 657d565..657d565 100644 --- a/pharos-dashboard/templates/dashboard/resource_detail.html +++ b/pharos-dashboard/src/templates/dashboard/resource_detail.html diff --git a/pharos-dashboard/templates/dashboard/server_table.html b/pharos-dashboard/src/templates/dashboard/server_table.html index f01bd60..f01bd60 100644 --- a/pharos-dashboard/templates/dashboard/server_table.html +++ b/pharos-dashboard/src/templates/dashboard/server_table.html diff --git a/pharos-dashboard/templates/dashboard/table.html b/pharos-dashboard/src/templates/dashboard/table.html index addd5c1..addd5c1 100644 --- a/pharos-dashboard/templates/dashboard/table.html +++ b/pharos-dashboard/src/templates/dashboard/table.html diff --git a/pharos-dashboard/templates/layout.html b/pharos-dashboard/src/templates/layout.html index 64fed4a..64fed4a 100644 --- a/pharos-dashboard/templates/layout.html +++ b/pharos-dashboard/src/templates/layout.html diff --git a/pharos-dashboard/templates/rest_framework/api.html b/pharos-dashboard/src/templates/rest_framework/api.html index 9c6c4f7..9c6c4f7 100644 --- a/pharos-dashboard/templates/rest_framework/api.html +++ b/pharos-dashboard/src/templates/rest_framework/api.html diff --git a/pharos-dashboard/web/Dockerfile b/pharos-dashboard/web/Dockerfile new file mode 100644 index 0000000..d543235 --- /dev/null +++ b/pharos-dashboard/web/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.5 +ENV PYTHONUNBUFFERED 1 +RUN mkdir /config +ADD ./requirements.txt /config/ +RUN pip install -r /config/requirements.txt +RUN mkdir /src; +WORKDIR /src diff --git a/pharos-dashboard/web/requirements.txt b/pharos-dashboard/web/requirements.txt new file mode 100644 index 0000000..edb20d0 --- /dev/null +++ b/pharos-dashboard/web/requirements.txt @@ -0,0 +1,16 @@ +celery==3.1.23 +cryptography==1.4 +Django==1.10 +django-bootstrap3==7.0.1 +django-crispy-forms==1.6.0 +django-filter==0.14.0 +django-registration==2.1.2 +djangorestframework==3.4.6 +gunicorn==19.6.0 +jira==1.0.7 +oauth2==1.9.0.post1 +oauthlib==1.1.2 +pika==0.10.0 +psycopg2==2.6.2 +PyJWT==1.4.2 +requests==2.11.0 diff --git a/pharos-dashboard/worker/Dockerfile b/pharos-dashboard/worker/Dockerfile new file mode 100644 index 0000000..86395e0 --- /dev/null +++ b/pharos-dashboard/worker/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.5 +ENV PYTHONUNBUFFERED 1 +RUN mkdir /config +ADD ./requirements.txt /config/ +RUN pip install -r /config/requirements.txt +RUN useradd -ms /bin/bash celery +USER celery +WORKDIR /src diff --git a/pharos-dashboard/worker/requirements.txt b/pharos-dashboard/worker/requirements.txt new file mode 100644 index 0000000..edb20d0 --- /dev/null +++ b/pharos-dashboard/worker/requirements.txt @@ -0,0 +1,16 @@ +celery==3.1.23 +cryptography==1.4 +Django==1.10 +django-bootstrap3==7.0.1 +django-crispy-forms==1.6.0 +django-filter==0.14.0 +django-registration==2.1.2 +djangorestframework==3.4.6 +gunicorn==19.6.0 +jira==1.0.7 +oauth2==1.9.0.post1 +oauthlib==1.1.2 +pika==0.10.0 +psycopg2==2.6.2 +PyJWT==1.4.2 +requests==2.11.0 |