Data Facility Admin
Admin system for the Data Facility.
DFAdmin was created to organize the core entities of a Data Facility such as Datasets, People and Projects. It is used as a core component on ADRF, being the orchestrator of IAM. Read more on the ADRF Framework, Data Model and DFAdmin whitepaper.
make git-submodules-init
Teste on MacOX: Docker version 17.12.0-ce, build c97c6d6
Two containers are used:
Copy the code to the desired server and run:
make deploy-build-latest
: used to build the containers on the first time and to update the web container when needed.make depoy-up
: used to run start the containers.ln -s local.env .env
to symlink the local dev configurationdocker-compose up -d
make dev-db-restore
or just make db-migrate
if you don’t have a previous db backup to use.docker-compose exec web ./manage.py createsuperuser
(if you restored the dev db it might already have a super user with dfadmin/dfadmin
credentials)make test
) to make sure all is right.Cheers! Go to http://localhost:8000
and check the DF Admin website.
You can run tests with the following:
make test
: to run tests creating the database (necessary on the first run)This will wipe out everything (tables, sequences and views; the whole schema): dev-db-clear
Now access the <host>:8000/admin
and you should be prompted for login credentials.
Before commit your changes, please:
make test
make code-check
(needs update)
When you write users and groups in LDAP, we should know some information like objectClass, loginShell, HomeDirectory, uidNumber, and gidNumber.
All the groups that exist in LDAP should come from DF Admin. We should have the Django models Group, Dataset, and Project in DF Admin. These models should use the same sequence to set their id value, and we should use this id to set the gidNumber in LDAP. We should use the id of the Django model User as the uidNumber. The groups and users in LDAP should be created only by DF Admin. The rest of the necessary information necessary to create groups and users in LDAP should be processed by a script using conventions.
wait for it not found: Make sure you initialized the submodules. (see requirements above)
Reference the folder documentation
.
A class diagram can be generated automatically based on the models with django_model_graph.sh
source env/bin/activate
make docs
Please check the RELEASE documentation when preparing a release.
Postman Collections: https://www.getpostman.com/collections/1b72e4b52b9e5ad42d3c
Getting KeyCloak PubKey (It needs to have the “——BEGIN…” And “——-END…”) (PEM format): https://www.getpostman.com/collections/1b72e4b52b9e5ad42d3c
https://zapier.com/engineering/apikey-oauth-jwt/
https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2
http://getblimp.github.io/django-rest-framework-jwt/#additional-settings
https://auth0.com/blog/building-modern-applications-with-django-and-vuejs/