-
CAMPION Sebastien authored
commit 94287f1b Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Apr 6 16:27:02 2018 +0200 Add authentication mechanism using allauth plugin I added the local authentication mechanism using the allauth plugin. Because the authentication through email doesn't work, I found a workaround described here https://stackoverflow.com/questions/49655402/email-authentification-doesnt-work-using-django-allauth Now users can register and login using their email account. Registering is achieved through email confirmation. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit fec7ec1b Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Apr 6 14:24:55 2018 +0200 Fix of secret bug I fixed a bug related to the test of the secret key existence as an environment variable. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 0c76d766 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Apr 6 14:11:33 2018 +0200 Update of the docker container I updated the container in order to: - update the wsgi file in order to load the environment variables and which config file to read - update of the docker file in with the packages to install - update of the supervisor config file Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit ba1377f0 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Apr 4 15:08:53 2018 +0200 Update of the django_site data I updated the django_site table data in order to have a proper name for the declared site (in the current context the name is A||go). Because it's used by default the authentification and registration plugin to generate emails. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 2a738bf8 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Apr 4 14:51:38 2018 +0200 Add of messages management system I added in the base template the possibility to display any type of message returned by Django to the user. I added as well the jquery library to be able to remove selected messages if the user wants. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit cc23367f Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Apr 4 14:34:07 2018 +0200 Update of urlconf for authentification I changed the url for the authentification and registration in order to fit the legacy rails app. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 3fff8e25 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Apr 4 14:29:01 2018 +0200 Update of the webapps table I updated the webapps table in order to put all null values to 0 (meaning public and it corresponds to what have been done in the rails app). I changed as well the field to not accept any null values and use a default to 1 (private) if nothing is specified by the user. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 268dbf09 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Apr 4 14:27:27 2018 +0200 Update of webapps model and view I updated the webapp model and view in order to display only the public applications. I changed the model to not accept any null value and force the default to 1 (private). Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit c0b9d983 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Apr 4 14:15:32 2018 +0200 Add of active links in header I added a type of macro in the header template in order to get an active link on the current page. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 4413e026 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Apr 4 11:39:51 2018 +0200 Update of the webapp detail view I updated the webapp detail view in order to display the information according the its docker name. I updated the url naming to fit the original allgo app. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 083dd462 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Apr 4 09:23:02 2018 +0200 Add of a uniqueness constraint on webapps field I added a uniqueness constraint of the field docker_name in the table webapps because two equivalent same names shouldn't exist in the database. I took the advantage of this change to update the file by removing too many calls and cleaning the file. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit b8de776d Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 18:00:55 2018 +0200 Update for allauth SQL migration I added the allauth migration for authentification and registration to the SQL table. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit eb549255 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 17:59:49 2018 +0200 Add of allauth backend for authentification I added and configured the allauth backend for authentification and registration. At the moment the system doesn't manage oauth2 authentification. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit af357960 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 17:58:28 2018 +0200 Deletion of current authentification system I decided to use django-allauth for authentification because by default it proposes both registration and oauth2. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit a159b938 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 15:37:25 2018 +0200 Add of a django table For some specifics tasks Django needs a table called django_site. It's necessary for the authentification third party system that we use allauth. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit dbd4a5cb Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 10:43:15 2018 +0200 Create accounts application I created the accounts application and moved everything that was in the main application related to the login/logout/register there. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit e6928fdf Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 10:41:58 2018 +0200 Stop tracking migrations I stopped tracking the migrations because at the moment we don't need to because start from a fresh installation not deployed. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 9bd7f215 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 10:14:29 2018 +0200 Update of the migration script I updated some paths related to the naming of the module in the django apps. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 4097a5ae Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 10:05:02 2018 +0200 Rename of the poc module I renamed the poc module into main for clarity. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 67d99d30 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 09:03:59 2018 +0200 Deletion of the django settings directory Related to the previous commit, I changed the configuration system and I deleted the old settings architecture. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit a344a18b Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Apr 3 08:57:54 2018 +0200 Update of the configuration system I decided to perform something a bit more simpler than what is suggested in Django best practices for configuration (having a base configuration file extended for local, staging and production. I now have a single configuration file setup for production. I overwrite it using environment variables that I load with the virtual environment. If the secret key isn't loaded then we consider that we are in production environment and must load a .env file located at the root of the program. There are 2 mandatory environment variables: - ALLGO_SECRET_KEY - ALLGO_DATABASE_PASSWORD The documentation reference all the environement variables available. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit a08f7ae8 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 30 11:38:55 2018 +0200 Update of the Django container configuration I updated the container in order to correct several bugs regarding nginx and writing permissions. I added the use of supervisor and gunicorn. I'm using as well Debian Stretch because Jessie doesn't have up to date packages for django and gunicorn. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> Add of production config I added a production config file for the Django app and updated the wsgi configuration to run in production. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit d6bf4e5e Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 29 14:16:42 2018 +0200 Update of login/logout redirection I updated the redirection according to the right namespace I gave before. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 88980346 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 29 12:05:16 2018 +0200 Stop tracking Django migrations I stopped tracking the migration files because we changed the migration system by using an SQL migration file. At the moment only the initial migration is done on Django, no particular improvements build on the top of it are necessary at the moment. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 2188b9a3 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 29 12:03:15 2018 +0200 Update of the login redirection and namespace I forgot to finish all the namespace updates and redirection for login and signup. It's not fixed. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit f0a3e175 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 29 12:01:46 2018 +0200 Update of the model I updated the model to remove the `private`field of the table `dj_webapps`. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit d24d565e Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 29 12:00:48 2018 +0200 Update of the migration SQL file I got rid of the `private` field in the table `dj_webapps`. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 87f8a700 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 29 11:15:54 2018 +0200 Update of the webapp list order I ordered the list of the apps by descending creation date. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit ebc63c6d Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 29 11:09:26 2018 +0200 Add of a detail views on apps I added a detailed view for each app. I updated the urls accordingly in the webapp list view. I added as well a name space for the poc app and updated the main menu template accordingly. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 4322aabe Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 19:03:41 2018 +0200 Add complete user registration management I added all the files necessary to handle user registration as well as password change. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit c6c17772 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 18:32:34 2018 +0200 Refactor of pagination I put the pagination system in its own template and include it wherever necessary. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 96805d32 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 18:29:51 2018 +0200 Update of the title tag I updated the title tag. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 464250cd Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 18:29:07 2018 +0200 Add of job list view I added the job list for every registered user. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit f3d8842a Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 17:53:06 2018 +0200 Deletion of users view I deleted the users view that was here just for a test purpose. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit b5df5582 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 17:40:14 2018 +0200 Update of the webapp list I updated the webapp list by: - Creating a paginated url to apps/ - Create a class based view - Create a paginated template with cards There are several things that need to be corrected such as the pagination if many pages are created and card images. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit ab5e1af9 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 15:05:18 2018 +0200 Add of a signup page I added a simple signup page. It still needs some work on it such as the place of the password policy and a reset password link. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 1b232622 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 14:26:11 2018 +0200 Update on auto increment constraint A bug was found in the user database. A missing auto_autocrement constraint was preventing the creation of new user by always using the same ID 0. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 236801be Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 11:59:19 2018 +0200 Update of the templates At the moment, we decided to remove all unecessary css and keep only the HTML architecture with bootstrap structure. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 5012effd Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 09:25:26 2018 +0200 Update docker deployement I updated the Dockerfile as well as the nginx config and the django application deployement. There are still issues such as the `/vol/nginx` doesn't exist for some unknown reasons making nginx refusing to launch. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit feca6657 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 28 09:23:41 2018 +0200 Update for deployement compliance In order to perform the deployement I updated few things. All python commands are replaced with python3 to force the use of them. I updated as well the SQL migration path to ensure that it will be run wherever the script is executed. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 8281538a Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 27 16:16:25 2018 +0200 Update of the requirements.txt file I added the django-environ package necessary to manage easily environmeent variables inside the application. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 704c5856 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 27 16:14:36 2018 +0200 Add of a configuration system I added a better configuration system in order to take into account for local development, staging or production deployments. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit e076627c Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 27 16:13:08 2018 +0200 Reorganize the application tree In order to follow good practices for a Django app development I reorganized the tree. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 447562b2 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 27 09:13:45 2018 +0200 Deletion of existing compressor settings I forgot to clean the compressor settings in the django app. I commented as well the configuration relation to sass. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 8c7edca8 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 18:55:32 2018 +0200 Update of tables deletion process I now delete the django tables only if they exist. It avoids very nasty error messages that can compromise the script running. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit a5d33e4a Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 18:50:00 2018 +0200 Update of the migration process We decided to have all the tables in a unique database. In order to perform this requirement I rewrote the migration files to duplicate all the tables under a new name prefixed by `dj_` for the allgo tables. The Django mandatory tables haven't been changed. The current model has been adapted to respect this new mapping. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 3878ee31 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 16:12:56 2018 +0200 Deletion of django python compressor Because we use Jessie, the package python3-django-compressor doesn't exist. It's not critical at this stage of developement so I'm removing it. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit c9ffd6ff Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 16:08:28 2018 +0200 Add of the host argument to the command line In order to satisfy the deployement on Docker, I added to the command line the possibility to specify the host. I took the opportunity to correct a bug as the migration file name changed and wasn't updated into this script. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 43303f32 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 16:07:37 2018 +0200 Deletion of the migration.sql file This file has been renamed migration2django.sql. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 9d0d0c65 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 16:06:11 2018 +0200 Deletion of scss files Because the library django-libsass isn't supported in Debian, I removed at the moment the use of SASS for the stylesheet. I updated the requirements.txt file accordingly. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit e34654b9 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 15:26:58 2018 +0200 Rename of the SQL migration file I renamed the SQL migration file in order to corresponds to the suggested name by Sébastien. Resolves: #133 Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 0ba53ecf Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 15:16:11 2018 +0200 Add of a partial template for messages I added a partial for messages that will be prompt to user in case of success, warning, failure, ... Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit ae0a1aa9 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 15:14:20 2018 +0200 Add of webapp and login views I added the webapp view that just list the name of the apps. I added as well a login view. Unfortunately the hashes of the password recorded in the database do not match with the base django algorithm and people can't identify themselves at the moment. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 2591cfb2 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 15:11:28 2018 +0200 Update of the SQL model I deleted a unused field in the Webapp class that I forgot last time and was creating an error. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 9ee4cd8d Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 15:08:33 2018 +0200 Update of the home page template I updated the home page by tweaking several components. I rewrote the header in order to take all the width but still have the menu centered. I added a sticky footer. Rewrote the css by eleminating everything that are not necessary at this stage. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit c54be635 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 09:43:51 2018 +0200 Add of fontawesome Glyphicon has been deprecated in the Bootstrap 4. The natural replacement is fontawesome that I added in the template system and updated some of the main links. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 55e87410 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 09:24:00 2018 +0200 Update of the home template I deleted an unsused function in the home templated. I updated as well the link "get started" that doesn't point to any valid URL yet but has the original look. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit fee5aeee Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 26 09:06:43 2018 +0200 Add of the fonts for the templates I added the fonts used in the original template in rails and updated the stylesheet accordingly. I commented as well some code in the header template that isn't used right now. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 87264f60 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 23 17:52:58 2018 +0100 Update of the view and template I updated the Proof of Concept for the view and template in order to display few information related to the user (namely the email and ssh public key) Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 19101e9b Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 23 17:51:56 2018 +0100 Update of the admin view I updated the admin view in order to show the fields given in the allgo_user table in the user administration system. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 5cff082c Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 23 17:51:15 2018 +0100 Update of the installation documentation I updated the documentation to fit the new name of the migration script. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit f07c9ee4 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 23 17:49:06 2018 +0100 Update of the model I updated the app model by: - removing all uncessary fields in the user table (that now resides in the django auth_user table) - update the other models by doing the same - reorder the fields to have something more logical to read - update the docstring to fit the updated description Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit e306b23f Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 23 17:47:53 2018 +0100 Update of the migration To keep track of the migrations, I save the current status of the first one. It differ in the last one because the migration process doesn't rely on this initial django migration file anymore but on a plain SQL script. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 4eca6bcc Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 23 17:43:58 2018 +0100 Update of the migration process Thanks to Sébastien Campion I rewrote the migration update. Now a SQL file takes care of migrating and transforming all the data in the new database. The bash script takes care of: - deleting any existing tables in the Django database - dump the current rails database and import it in the Django one - apply the migration using the SQL script - run the fake migration to take into account the current status of the Django database Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit ce702b1a Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 22 11:33:38 2018 +0100 Add of a version variable in the main __init__ file I added a version variable to bump when necessary. It will be used in conjonction with the Changelog. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 841653db Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 22 11:31:20 2018 +0100 Add of a requirements.txt file dedicated to dev I added a `requirements.txt` file that is dedicated to the dependencies required for the development part. You'll find in it among other things libraries for testing, code coverage, syntax checking, documentation generation, ... Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 07270a73 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 22 11:22:29 2018 +0100 Update of the documentation I wrote a minimal documentation to get the django front-end running. It's probably not enough but should do the trick for now. To get an html (or other format output), it requires sphinx to compile it. The necessary packages required for the development will be given in the `requirements_dev.txt`. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 6efb5c88 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 17:34:26 2018 +0100 Update of the index view I updated the index view to redirect it to a `home.html` template. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 61cc644b Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 17:32:30 2018 +0100 Add of the static files I updated the `.gitignore` file to never saved the `CACHE`folder generated in order to host the compressed CSS and javascript. The rest of the files are necessary in the tree such as the scss stylesheet, javascript (none at the moment) and images. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 3af7a291 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 17:30:10 2018 +0100 Add home template I added the home template. The content is hard-coded in it. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 8d6be38d Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 17:28:59 2018 +0100 Update of the base layout inclusion Rather than including the base template layout I extend it in order to be able to supercharge the template model. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit a99e21ad Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 17:27:58 2018 +0100 Update of the links to the partials I updated the links to the partial files such as the header and footer. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 3f64ee63 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 17:26:24 2018 +0100 Move of header and footer in partials folder To respect the good practices, I moved the header and footer in the `partials` folder that will host all partial helpers to make the templates. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 0abb18b1 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 16:44:04 2018 +0100 Update of the footer The footer is now converted in a proper Django template. The css isn't right yet and the HTML should be cleaned and respect more the structure of the document (use list for list of links and so on). Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 3d457dd5 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 16:30:58 2018 +0100 Update of the template I updated the template in order to integrate its current content into the common layout. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 5f44d607 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 16:27:32 2018 +0100 Add of a common base template layout I added a basic template layout based on the rails application. At the moment the header and footer aren't completely ported from rails to Django template engine. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 0b416733 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 16:20:56 2018 +0100 Update of the app settings I updated several things: - the allowed host in order to run the website in production mode. - I added the compressor application to the list of available apps - setup the `STATIC_ROOT` to give the compressor library the path where are stored both the css and javascript files - I setup the compressor library to be used at runtime - I setup the preprocessor for the scss files Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 596d9888 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 16:14:21 2018 +0100 Update of the requirements file I updated the requirements.txt file that were out of date. The MySQL connector for the database. I added as well two libraries for the sass processing, cache and compression of both css and javascript files. I had to do that at this stage in order to reuse directly the scss file given in the rails app. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 33dcf3c9 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 16:08:32 2018 +0100 Update of the user poc view I updated the view in order to try the get the data through the constraints in the database. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 155b07d9 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 10:54:50 2018 +0100 Add of Django auth tables I updated the migration script in order for Django to force the update of the database with the authentications tables given by default with Django. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit d3aec5b8 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 10:06:59 2018 +0100 Add of a database migration file This is a small bash script that dump the rails database table by table and then import them in the new Django database. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit e6bc0044 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 09:01:48 2018 +0100 Deletion of a Django migration file I changed the migration system, so this file is unecessary at this stage and eveyerything has been put back into a single migration file called `0001_initial.py`. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit c1e96ee1 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 08:47:49 2018 +0100 Complete update of the model I updated the model in order to satisfy the rails model and have a smooth import system. I created an abstract model for the timestamps at creation and update on each table. I added the minimal tables necessary for the v1.0 and ordered them to take into account of the different constraints. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 14160032 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Wed Mar 21 08:43:18 2018 +0100 Update of the database settings I updated the settings related to the name of the database. In order to not conflict with the rails database, we need to create a database called `allgopy`. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit e7e8e38f Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 17:20:28 2018 +0100 Update of the SQL schema for job_uploads table I updated the Django migration file to force the order of the fields in order to match the ones generated by the rails app. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 7b80c89f Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 17:08:05 2018 +0100 Update of the SQL schema for jobs table I updated the Django migration file to force the order of the fields in order to match the ones generated by the rails app. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit cd517365 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 16:57:42 2018 +0100 Update of the SQL schema for job_queues table I reorded the migration file in order to fit the models and have something easier to read and compare. I didn't have to do any particular modification as the Django model is identical to the rails one. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 394af133 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 16:54:33 2018 +0100 Update of the SQL schema for quotas table I updated the Django migration file to force the order of the fields generated in the rails database. The migration generate an error on this particular migration for an unknown reason although the migration finishes correctly. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 01d148ff Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 16:44:24 2018 +0100 Reorder of the migration file I reordered the Django migration file to match the model and easier to follow for changes. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit bc080408 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 16:15:50 2018 +0100 Update of the SQL schema for users table I updated the Django migration file to force the order of the fields generated in the rails database. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 460e8a8e Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 16:13:10 2018 +0100 Update of the SQL schema for webapp_version table I updated the Django migration file in order to force the order of the fields and match the order given by the rails database. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 77cbf0df Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 16:07:15 2018 +0100 Update of the SQL schema for webapps tables I updated the Django migration file to force the order of the fields generated in the database. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 8cb5dae4 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Tue Mar 20 16:04:01 2018 +0100 Update of SQL schema for docker_os table I updated the docker_os table migration file in Django in order to force the order of some fields to match the order of the database in rails. I need to do that for all the tables. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit d2ed5f8e Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 16 15:34:07 2018 +0100 Add of temaplates I added 2 templates. One for the root of the app (showing just hard coded text) and another one to show the user data according to the quota model. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 3b8313d2 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 16 15:32:51 2018 +0100 Database migration on quotas/users foreign key I replaced the user_id field (that was an integer) by a foreign key using the same name. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 9a10e025 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 16 15:31:46 2018 +0100 Add the legacy database model I added the legacy database model into the app. In order to do that I: - created the urls.py and views.py file (required by Django) - created the legacy model using the inspectdb tools given by Django and stored in models.py - followed the process to initialize the migrations at the stage of the model (resulting in the creation of the migrations folder) Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit d23c54b9 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 16 15:30:34 2018 +0100 Add of the poc app I created the poc app that will ensure the complete use of the legacy database. At the moment this app doesn't work properly (no url, views or model defined). Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 73168816 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 15 17:38:42 2018 +0100 Add of a README file I added a README file in order to document the process of mapping a current legacy database with Django. It's required only at the start of the project or creation of a new app calling a legacy database. This helps to start the historic of the migrations to the current state of the database. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> Update the of README file I updated the documentation to precise the fact that the migration process must be applied for each app calling the legacy database. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 6ad4925e Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 15 17:25:39 2018 +0100 Add od the poc app I added the poc app. It adds the app to the settings of the project and load the url patterns from the app. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit c49cdc57 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 8 18:07:57 2018 +0100 Add of the Supervisor configuration I created the Supervisor configuration file. At the moment, the configuration hasn't been tested because of the incompatibilities of Supervisor with Python 3. It still needs to be resolved. The configuration has been copied from Rails and adapted to run a Django application and later on a Redis cache system (commented at the moment). Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 28e2b935 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 8 18:06:01 2018 +0100 Add of the app running script In order to launch the app, I create this script. It just launch the Django internal HTTP server on the port 4000 (later on, it should handled by Gunicorn or any WSGI server). Then I launch the nginx server. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit e456fcb8 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 8 18:04:06 2018 +0100 Add Nginx configuration file In order to mimic the Rails container using Django, I installed a Nginx reverse proxy that communicate directly with the Django application (through Gunicorn or directly). The current configuration is a copy of the Rails configuration except the listening port. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 2925d93e Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 8 18:02:02 2018 +0100 Update of the Nginx configuration I updated the Nginx configuration that is generated in the Python script. At the moment the configuration is hard-coded and need to be improved. It's working as such at the moment. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 574022a0 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 8 17:56:06 2018 +0100 Update of the initialisation process I update the initialisation process (that was empty before). I create the different folders to host the logs, cache and others. I create a symbolic link for the following: - a run-allgo script that instanciate the Django app and Nginx - supervisor configuration (at the moment, commented) - nginx configuration I then execute the run-algo script. At the moment, it seems that the execution of this script either doesn't occur or create an error with docker compose at launch (the dev-django container doesn't run). So at the moment, I run by hand the script once the container is up. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 1ff796b1 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 8 17:52:26 2018 +0100 Update of the packages installation and container initialisation I updated the packages installed in order to: - remove some unecessary packages related mainly to Rails - add packages relation to python 3 and Django I updated the container initialisation that seems to fit the current practice with other container initialisation process. One thing to mention. Supervisor can't work with Python 3. Anthony suggested to install Python 2 just to make Supervisor happy and run Gunicorn/Python 3 as such. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 571c0f4b Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Thu Mar 8 17:47:15 2018 +0100 Delete of some commented commands I deleted some commands that were commented because they were specific to rails and not relevant in the Django context. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 33faf512 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 5 12:21:07 2018 +0100 Add of a minimal Django app I created a minimal Django app that by default generate a SQLite database at the root of the project and display a basic page saying "it works!" on the port 8000. I added as well a requirements.txt file that install the LTS version of Django (v1.11). Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit aabb1979 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Mon Mar 5 12:16:52 2018 +0100 Add a .gitignore file I added a .gitignore file dedicated to Python. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 6825071b Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 2 16:20:54 2018 +0100 Add of the container initialization I added a container_init file as it's required by the stack. It will be used later on anyway to setup the Django app. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit fa87f2a5 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 2 16:01:01 2018 +0100 Copy of the container_init Thanks to Sébastien, I updated the Dockerfile in order to resolve issue realted to unknown container_init. In the end, I copy this file into the init file and give the right permission to it. I removed as welle the symbolic link to Python3 as it seems to be the standard on this Debian image. I removed the command "run-allgo" as it was coming from the rails Dockerfile which is not relevant at this stage of the image. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit 9bc9baa5 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 2 15:47:02 2018 +0100 Add of the Django container I modified the main file to build the new django image called dev-django. I added the folder in the bootstrap and prepare.sh file. I added the necessary configuration in the docker-compose.yaml based on the rails example. At the moment, the container by itself doesn't do anything except having the python stack installed. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr> commit e69a28a2 Author: Matthieu Berjon <matthieu.berjon@inria.fr> Date: Fri Mar 2 10:54:48 2018 +0100 Add Dockerfile for the Django app I added the Dockerfile for the future Django application. It's based on the rails Dockerfile with the following tweaks: - Installation of Python 3 and pip - Edit of the Python symbolic link to force the use of Python 3 by default I decided to store the app in the same folder as the rails app was as they are not meant to work side by side. It will also facilitate the debugging for developpers who were working on the rails app. If they need to look into it for debbugging reasons, the path where to find it is still the same. Signed-off-by: Matthieu Berjon <matthieu.berjon@inria.fr>
fe2d4de8
To find the state of this project's repository at the time of any of these versions, check out the tags.