Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/apache/airavata-custos-portal
Portal Interface for Apache Airavata Custos Security
https://github.com/apache/airavata-custos-portal
airavata apache authentication authorization oauth2 openidconnect security
Last synced: about 1 month ago
JSON representation
Portal Interface for Apache Airavata Custos Security
- Host: GitHub
- URL: https://github.com/apache/airavata-custos-portal
- Owner: apache
- License: apache-2.0
- Created: 2020-04-02T19:53:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-03T03:01:34.000Z (about 1 year ago)
- Last Synced: 2024-10-01T01:04:07.806Z (about 1 month ago)
- Topics: airavata, apache, authentication, authorization, oauth2, openidconnect, security
- Language: Vue
- Homepage: https://airavata.apache.org/
- Size: 4.17 MB
- Stars: 0
- Watchers: 3
- Forks: 11
- Open Issues: 63
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Airavata Custos Portal
## Getting started with running locally
### .env file
Assuming you are running Custos locally (see
https://github.com/apache/airavata-custos/tree/develop#quickstart), edit the
.env file to match the client id and secret generated by the Custos bootstrap
service:```
CUSTOS_CLIENT_ID="custos-s8qf9g3odbbcdsgd2khv-10000000"
CUSTOS_CLIENT_SEC="..."
CUSTOS_API_URL="http://localhost:10000"
CUSTOS_SUPER_CLIENT_ID="custos-s8qf9g3odbbcdsgd2khv-10000000"
```### Running the frontend
You need Node.js 14 and Yarn 1 installed.
```
yarn install
yarn run serve
```### Running the Django server
You need Python 3.9+.
```
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
./manage.py migrate
./manage.py runserver
```## How to use as a Django app
Airavat custos portal is available as a python package to install and customise
for tenants needs. The forllowing instructions are for setting up a customised
portal using all the features available in the airavata custos portal.1. Install
```
pip install airavata-custos-portal
```2. Create a Django app
```
django-admin startproject my_first_custos_app .
cd my_first_custos_app
django-admin startapp apps
cd apps
django-admin startapp frontend
```3. Include the custos portal api and frontend in the urls.
```
# my_first_custos_app/apps/frontend/urls.pyfrom django.contrib import admin
from django.urls import path
from django.conf.urls import includeurlpatterns = [
path('admin/', admin.site.urls),
path("api/", include("airavata_custos_portal.apps.api.urls")),
path("", include("airavata_custos_portal.apps.frontend.urls")),
]
```4. Also, include the custom UI app in the urls.
```
# my_first_custos_app/apps/frontend/urls.pyfrom django.contrib import admin
from django.urls import path
from django.conf.urls import includeurlpatterns = [
path('admin/', admin.site.urls),
path("api/", include("airavata_custos_portal.apps.api.urls")),
path("", include("airavata_custos_portal.apps.frontend.urls")),
path("custom-ui/", include("my_first_custos_app.my_custom_ui.urls")),
]
```## Development
The application consists of a Vue.js frontend and a Django based backend. The
instructions below are for setting up the local setup for development.### Change the configurations
Change the environment variables on `.env`
### Run Vue.js app
```
yarn install
yarn serve
```### Lints and fixes files
```
yarn lint
```## Running the Django server locally
```
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
./manage.py migrate
./manage.py runserver
```And then point to http://localhost:8000
## How to publish
1. Build the static files
```
yarn build
```2. Build the python package
```
python -m pip install --upgrade build
python -m build
```3. Publish the python package to pypi.org. Optionally can push to test.pypi.org.
See https://packaging.python.org/tutorials/packaging-projects/ for more info.```
python -m pip install --upgrade twine
python -m twine upload dist/*
```