Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add "How to manage your installation - Managing profiles" #4066

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 58 additions & 2 deletions docs/source/howto/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,64 @@ How to manage your installation
Managing profiles
=================

`#4000`_
Creating profiles
-----------------
Each AiiDA installation can have multiple profiles, each of which can have its own individual database and file repository to store the contents of the :ref:`provenance graph<topics:provenance:concepts>`.
Profiles allow you to run multiple projects completely independently from one another with just a single AiiDA installation and at least one profile is required to run AiiDA.
A new profile can be created using :ref:`verdi quicksetup<reference:command-line:verdi-quicksetup>` or :ref:`verdi setup<reference:command-line:verdi-setup>`, which works similar to the former but gives more control to the user.


sphuber marked this conversation as resolved.
Show resolved Hide resolved
Listing profiles
----------------
The :ref:`verdi profile<reference:command-line:verdi-profile>` command line interface provides various commands to manage the profiles of an AiiDA installation.
To list the currently configured profiles, you can use ``verdi profile list``:
sphuber marked this conversation as resolved.
Show resolved Hide resolved

.. code:: bash

Info: configuration folder: /home/user/.virtualenvs/aiida/.aiida
* project-one
project-two

In this particular example, there are two configured profiles, ``project-one`` and ``project-two``.
The first one is highlighted and marked with a ``*`` symbol, meaning it is the default profile.
A profile being the default means simply that any ``verdi`` command will always be executed for that profile.
Of course you can :ref:`change the profile on a per-call basis<topics:cli:profile>` with the ``--p/--profile`` option.
sphuber marked this conversation as resolved.
Show resolved Hide resolved
If you would like to change the default profile in order to not always have to specify it explicitly, you can use ``verdi profile setdefault PROFILE``.
sphuber marked this conversation as resolved.
Show resolved Hide resolved

Showing profiles
----------------
Each profile defines various parameters, such as the location of the file repository on the file system and the connection parameters for the database.
To display these parameters, you can use ``verdi profile show``:
sphuber marked this conversation as resolved.
Show resolved Hide resolved

.. code:: bash

Info: Profile: project-one
---------------------- ------------------------------------------------
aiidadb_backend django
aiidadb_engine postgresql_psycopg2
aiidadb_host localhost
aiidadb_name aiida_project_one
aiidadb_pass correcthorsebatterystaple
aiidadb_port 5432
aiidadb_repository_uri file:///home/user/.virtualenvs/aiida/repository/
aiidadb_user aiida
default_user_email user@email.com
options {'daemon_default_workers': 3}
profile_uuid 4c272a87d7f543b08da9fe738d88bb13
---------------------- ------------------------------------------------

By default, the parameters of the default profile are shown, but one can pass the profile name of another, e.g., ``verdi profile show project-two`` to change that.

Deleting profiles
-----------------
A profile can be deleted using the ``verdi profile delete`` command.
By default, deleting a profile will also delete its file repository and the database.
This behavior can be changed using the ``--skip-repository`` and ``--skip-db`` options.

.. note::

In order to delete the database, the system user needs to have the required rights, which is not always guaranteed depending on the system.
In such cases, the database deletion may fail and the user will have to perform the deletion manually through PostgreSQL.
sphuber marked this conversation as resolved.
Show resolved Hide resolved


.. _how-to:installation:configure:
Expand Down Expand Up @@ -54,7 +111,6 @@ Managing multiple users



.. _#4000: https://github.com/aiidateam/aiida-core/issues/4000
.. _#4001: https://github.com/aiidateam/aiida-core/issues/4001
.. _#4002: https://github.com/aiidateam/aiida-core/issues/4002
.. _#4003: https://github.com/aiidateam/aiida-core/issues/4003
Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ Welcome to AiiDA's documentation!
.. toctree::
:maxdepth: 2
:caption: Internal architecture
:hidden:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is unrelated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but should be done at some point. Want me to remove it from this one?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All done


internals/global_design
internals/orm
Expand Down