<commit_before>.. _update_esdc:

Updating Danube Cloud
#####################

At the moment, *Danube Cloud* can be updated only using the :ref:`API<API>`. The **es** command line tool is used to perform API calls.

In the examples below the parameters have following meaning:

* ``(version)`` - version of the *Danube Cloud* software to which system should be updated. This can be either git tag or SHA1 of the git commit.

* ``update.key`` - X509 private key file in PEM format used for authentication against EE git server.

* ``update.crt`` - X509 private cert file in PEM format used for authentication against EE git server.

.. note:: If you are using Danube Cloud Enterprise Edition, you should have received the update.key/update.crt files with your :ref:`compute node license <node_license>`.
    In case you haven't received the update key and certificate please contact ``<EMAIL>``.

.. note:: If you are using Danube Cloud Community Edition, -key and -cert parameters can be omitted from the command line.


Updating Management Server
==========================

When updating *Danube Cloud* first the management server should be updated.

.. note:: *file::* prefix must be used when passing files to *-key*/*-cert* parameters, otherwise the **es** will not parse them correctly.

.. code-block:: bash

    user@laptop:~ es login -username admin -password $PW

    user@laptop:~ es set /system/update -version (version) -key file::/full/path/to/update.key -cert file::/full/path/to/update.crt


Updating Compute Nodes
======================

For a compute node one additional parameter needs to be provided:

* ``(hostname)`` - name of the node which you are updating.

.. code-block:: bash

    user@laptop:~ es login -username admin -password $PW

    user@laptop:~ es set /system/node/(hostname)/update -version (version) -key file::/full/path/to/update.crt -cert file::/full/path/to/update.crt<commit_msg>Added info about changing compute node's status before/after update<commit_after>.. _update_esdc:

Updating Danube Cloud
#####################

At the moment, *Danube Cloud* can be updated only using the :ref:`API<API>`. The **es** command line tool is used to perform API calls.

In the examples below the parameters have following meaning:

* ``(version)`` - version of the *Danube Cloud* software to which system should be updated. This can be either git tag or SHA1 of the git commit.

* ``update.key`` - X509 private key file in PEM format used for authentication against EE git server.

* ``update.crt`` - X509 private cert file in PEM format used for authentication against EE git server.

.. note:: If you are using Danube Cloud Enterprise Edition, you should have received the update.key/update.crt files with your :ref:`compute node license <node_license>`.
    In case you haven't received the update key and certificate please contact ``<EMAIL>``.

.. note:: If you are using Danube Cloud Community Edition, -key and -cert parameters can be omitted from the command line.


Updating Management Server
==========================

When updating *Danube Cloud* first the management server should be updated.

.. note:: *file::* prefix must be used when passing files to *-key*/*-cert* parameters, otherwise the **es** will not parse them correctly.

.. code-block:: bash

    user@laptop:~ es login -username admin -password $PW

    user@laptop:~ es set /system/update -version (version) -key file::/full/path/to/update.key -cert file::/full/path/to/update.crt


Updating Compute Nodes
======================

For a compute node one additional parameter needs to be provided:

* ``(hostname)`` - name of the node which you are updating.

.. code-block:: bash

    user@laptop:~ es login -username admin -password $PW

    user@laptop:~ es set /node/(hostname)/define -status 1  # First set the node to offline state
    user@laptop:~ es set /system/node/(hostname)/update -version (version) -key file::/full/path/to/update.crt -cert file::/full/path/to/update.crt
    user@laptop:~ es set /node/(hostname)/define -status 2  # Set the node's status back to online state
{'fraction_non_alphanumeric': 0.13149548670407415, 'fraction_numerical': 0.003903391070992925, 'mean_word_length': 4.080545229244114, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2250193', 'n_tokens_mistral': 1165, 'n_tokens_neox': 1107, 'n_words': 518}