iPython Shell

Managing the database of the VANTAGE6 server can be done by an administrator through the Shell interface. Regular users should use the API interface to manager their organization.

👨‍💻 Starting the Shell Interface

Similar to the command vserver start an administrator can start an iPython shell to manage all entities at the server. The preferred method of managing entities is using the API, instead of the Shell interface. This is because the API will perform check, whereas in the case of the Shell all inputs are accepted.

Start the Shell interface using:

vserver shell [options]

You should see something resembling the following:

General

🏢Organizations

To create an organization you can use the db.Organization model:

Retrieving organizations from the database:

A lot of entities at the server are connected to an organization. For example you can see which (computation) tasks are issued by the organization or see which collaborations it is participating within.

👩‍🏭 Users

Users (always) belong to an organization. So if you have not created an organization as of yet, then this should be your first step. To create a user you can use the db.User model:

You can retrieve users in the following ways:

To modify a user, simply adjust the properties and save the object.

🎩 Roles and Rules

A user can have multiple roles and rules assigned to them. These are used to determine if the user has permission to view, edit, create or delete certain resources. A role is a collection of rules.

🤲 Collaborations

A collaboration consists of one or more organizations.

To create a collaboration you need at least one organization in your database (look here how to add an organization). To create a collaboration you can use the db.Collaboration model:

Tasks, nodes and organizations are directly related to collaborations. We can obtain these:

🚉 Nodes

Before nodes can login, they need to exist in the server's database. A new node can be created as follows:

📔 Tasks

All computation requests are stored as tasks at the server. A task can be intended for multiple organizations (and thereby also for multiple nodes). In case you want to create a task from the shell you can use the db.Task model. Note that the task will not be picked up by nodes. Only tasks posted to the API will be picked up by nodes, as then they receive a message through the web-socket interface and corresponding db.Result records are created.

Obtaining results:

Tasks can have a child/parent relationship. In case a master container posts a task, the parent task would be the task that created the master container itself. Also the run_id is for parent and child tasks the same.

📈 Results

A task has one or more results, depending on the number of organization for which the task is intended. For each organization a result record is made. The db.Result model also contains the input specifically encrypted for the organization that has to execute the task. To create a result you need a db.Task first.

Obtaining results:

Last updated

Was this helpful?