Giter Site home page Giter Site logo

jasmin-manage's Introduction

jasmin-manage

API for managing project resources on JASMIN.

Setting up a development environment

jasmin-manage requires at least Python 3.8, so you must first ensure a suitable Python version is installed.

First, check out the code:

git clone https://github.com/cedadev/jasmin-manage.git
cd jasmin-manage

Create and activate a new virtual environment and install:

python -m venv ./venv
source ./venv/bin/activate
pip install -e .

Install the local settings:

cp jasmin_manage_site/settings.py-local jasmin_manage_site/settings.py

Apply the migrations (this will create an SQLite database in the same directory as the code):

python manage.py migrate

Create a superuser to access the admin interface:

python manage.py createsuperuser

Then run the development server:

python manage.py runserver

The admin interface will then be available at http://localhost:8000/admin and the API will be available at http://localhost:8000/api (you must authenticate via the admin).

jasmin-manage's People

Contributors

mjones07 avatar mkjpryor-stfc avatar nf679 avatar amanning9 avatar

Watchers

James Cloos avatar Philip Kershaw avatar Matt Pritchard avatar Andrew Harwood avatar Sam Pepler avatar Steve Donegan avatar Graham Parton avatar  avatar

jasmin-manage's Issues

Create filter on service API endpoint

We would like to be able to filter the services API endpoint by service name (not id) in order to get the details of the service and its requirements.

As part of this it probably also makes sense to expose the requirements under the self view of the service.

Use per-requirement consortium mapping

Project has "default" consortium if known at creation time, but project creation without consortium is permitted.

At the point where a service is created, the project must either have a default consortium or one must be specified.

Add per-project requirement number

In order to make referring to requirements within a project more natural, each requirement should have a "number in project" as well as an overall ID.

add capability to tag projects

would be nice to be able to tag projects as "ncas" "nceo" "ceh" "met office" etc (which may cut across consortia boundaries)

create flag "internal" on Consortium and "staff" on User

...so that we can exclude "internal" consortia from public view

  • would still see & be able to create projects but via admin interface
  • "staff" flag prevents non-staff from creating new projects in "internal" consortia.
  • could still be added as collaborator on projects in "internal" consortia.

blank page instead of 403/404

Blank pages are shown when an incorrect page url is used, or when a page is accessed when the user isn't authenticated to use the page. This should throw 403/404 as required

Need ability to hide some categories of service

Example: "External Tenancy MCP", "Managed Tenancy MCP" are both deprecated, though we have current instances of them (which still need to be managed for now).
But when setting up a new project, we don't want users to be able to select them as an option.

Invite system for collaborators

The way the authentication works with OAuth 2.0 means that manage.jasmin doesn't know about a JASMIN user until they have signed in for the first time. This means only a user who has signed in can be added as a collaborator.

Also, having a list of all JASMIN users available to any authenticated user is potentially a privacy issue.

To get around this, we will use an "invite by email" system. The way this will work is:

  • User creates a new project and becomes the owner
  • Project owner invites a user to collaborate using their email address (which they will know if they are collaborating)
  • The invite has a unique code that is sent to the email address as part of a link
  • When the link is followed, the user following the link is forced to sign in (which creates the user record if it doesn't exist)
  • The signed in user is associated with the project and role from the invite

Ability to class a new requirement as a replacement of an old one

This would allow a user to pick a requirement to replace the old one, so that changes on existing requirements can be handled better.

Currently new requirements can't be the total new requested size as this would mean that consortium managers cannot approve if the new total size puts them over quota, but the increase in size would not take them over quota.

Having the ability to mark something as a replacement would let us do logic for when a new volume is marked as PROVISIONED, to DECOMMISSION the old volume without having to remember what specifically needs doing in this case, and would allow a reduction in requirement to be handled. As well as handling the approval of new requirements properly

Edit requirements for a service

It would be useful for managers to be able to request changes by editing a specific requirement. For example, editing the amount of resource, or the end time for the requirement

Make REST API an OAuth 2.0 resource server

Protect the REST API with OAuth 2.0 scopes using django-oauth-toolkit.

This is required in order to implement the frontend as the frontend will be implemented as an OAuth 2.0 RP to this API.

Add resource chunks

Replace the total available for a resource with a sum over separate chunks of that resource.

Possibly allow requirements to be assigned to a chunk at provisioning time.

Need endpoint for listing services & their locations, by consortium

Need to be able to generate a text listing something like this:

select all requirement.location (e.g. volume path) for all services where service.category="Group Workspace" and where service.Project.consortium = X

While an admin view would be nice (as well) an API endpoint that can be consumed elsewhere is what's really needed, e.g. for the Storage Summary report. This needs all volumes by project & consortium, with their provisioned sizes (from here) which can then be matched programatically to volume paths & usage from the filesystem entries (now in Elastic Search, used for metrics).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.