Automatische Aktualisierungen: Unterschied zwischen den Versionen

Aus MoodleDocs
Wechseln zu:Navigation, Suche
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 10: Zeile 10:
Damit diese Funktionalität der automatischen Aktualiserung genutzt werden kann, muss die [[Aktualisierungsmitteilung]] aktiviert sein.
Damit diese Funktionalität der automatischen Aktualiserung genutzt werden kann, muss die [[Aktualisierungsmitteilung]] aktiviert sein.


== How it works ==
== Wie funktioniert das? ==
Als Teil der Information über verfügbare Aktualisierungen wird die URL einer ZIP-Datei übermittelt, die die neue Version des Plugins enthält. Wenn Sie den entsprechenden Button klicken, um das Plugin zu installieren und auf der mächsten Seite bestätigen, dass Sie die Installation tatsächlich ausführen wollen, dann wird ein Dienstprogramm ''mdeploy.php'' ausgeführt.


As a part of the information about available updates for the site, URL of the ZIP package with the new version of an installed plugin is returned. When ''Install this update'' button is pressed and the the deployment is confirmed at the next page, a standalone utility called ''mdeploy.php'' is executed.
Dieses Dienstprogramm macht im einzelnen folgendes:
# Es autorisiert die Anfrage um sicherzustellen, dass Sie tatsächlich direkt von der Seite kommen, auf der Sie die Installation bestätigt haben.
# Die ZIP-Datei wird aus der [https://moodle.org/plugins Moodle Plugins Datenbank] heruntergeladen.
# Eine Integritätsprüfung stellt sicher, dass die ZIP-Datei korrekt heruntergeladen wurde.
# Der aktuelle Code des Plugins wird im Verzeichnis ''moodledata/mdeploy/archive/'' archiviert, damit Sie eine Sicherung haben, falls etwas schief geht oder falls Sie Ihre eigenen Codeanpassungen noch benötigen.
# Das Verzeichnis, in dem das aktuelle Plugin installiert war, wird gelöscht und durch den Inhalt der ZIP-Datei ersetzt.
# Ihr Browser wird auf die Seite weitergeleitet, auf der der normale Aktualisierungsprozess durchgeführt wird.


# The mdeploy utility authorizes the request to make sure you are coming ''exactly'' from the confirmation page displayed in the previous step.
Ab diesem Moment können Sie die Aktualisierung durchführen, wie Sie es gewohnt sind, also so, als ob Sie die ZIP-Datei manuell heruntergeladen und an der richtigen Stelle entpackt hätten.
# The ZIP package with the new version is fetched from the [https://moodle.org/plugins Moodle plugins directory].
# A simple integrity check is performed to make sure the ZIP was downloaded correctly.
# The current version of the plugin code is archived into a directory at ''moodledata/mdeploy/archive/'' so you have a backup (just in case you had some local tweaks in the code, for example).
# The current directory with the plugin is removed and replaced with the content of the downloaded ZIP.
# Your browser is redirected to the page where the normal upgrade procedure happens.


At this moment, you can deploy another available update (if there is such) or perform the upgrade procedure as if you uploaded the ZIP contents to your site manually.
== Automatische Aktualisierungen deaktivieren ==
 
In einigen Situationen (z.B. Server mit vielen lokalen Codeanpassungen oder Server mit einem eigenen Aktualisierungsprozess über [[Git für Administratoren|Git]]) können automatische Aktualisierungen unerwünscht sein. Sie können diese Funktionalität vollständig deaktivieren, indem Sie in der [[Moodle-Konfigurationsdatei]] ''config.php folgende Zeile einfügen:
== Disabling updates deployment ==
 
In a few circumstances (such as completely managed servers, which may have a lot of local modifications, or sites that have their own solution for updates deployment - for example via [[Git for Administrators|Git checkouts]]) it is desirable to not to allow automatic updates deployment. The feature may be disabled completely by adding the following code to the [[Configuration file|config.php file]]:


  $CFG->disableupdateautodeploy = true;
  $CFG->disableupdateautodeploy = true;


== Missing install button ==
== Fehlender Installations-Button ==
 
Wenn die automatische Aktualisierung deaktiviert ist, wird kein Installations-Button angezeigt. Wenn die Funktionalität aktiviert ist, werden auf der Seite, die die verfügbaren Aktualisierungen anzeigt, einige Vorabtests durchgeführt, um sicherzustellen, dass die automatische Aktualisierung tatsächlich durchgeführt werden kann. Falls diese Vorabtests fehlschlagen, erscheint eine entsprechende Information.
If the updates deployment feature is not enabled (or if it was disabled at the config.php file), no button to install the update is displayed. If the feature is enabled, the page displaying the list of available updates performs some pre-checks to make sure the deployment will work. If a pre-check fails, a short information with a help pop-up is displayed.


=== Plugin files not writable ===
=== Plugin-Dateien sind nicht schreibbar ===


During the deployment, Moodle will replace the whole folder with the plugin code with a new version. The web server process has to have write access to the folder and all its contents. There are several ways how to achieve this, depending on your web server setup and personal preferences. The exact location of the plugin folder depends on the type of the plugin. For a full list of locations see the Moodle path on https://docs.moodle.org/dev/Plugins
During the deployment, Moodle will replace the whole folder with the plugin code with a new version. The web server process has to have write access to the folder and all its contents. There are several ways how to achieve this, depending on your web server setup and personal preferences. The exact location of the plugin folder depends on the type of the plugin. For a full list of locations see the Moodle path on https://docs.moodle.org/dev/Plugins
Zeile 72: Zeile 70:
This suggests problems with the validation of the SSL certificate of the remote (moodle.org) site when fetching the ZIP package. See [[SSL certificate for moodle.org]] for more info.
This suggests problems with the validation of the SSL certificate of the remote (moodle.org) site when fetching the ZIP package. See [[SSL certificate for moodle.org]] for more info.


==Fehler und Ausnahmen==
Wenn Fehler auftreten, aktivieren Sie bitte das [[Debugging]]. Die Debugging-Mitteilungen enthalten zusätzliche Informationen zu den Fehlern.
===Unable to fetch available updates data - unexpected cURL error ===
;cURL error 7 couldn't connect to host
:Prüfen Sie, ob die Webseite http://download.moodle.org momentan verfügbar ist. Wenn diese Seite nicht läuft, kann Ihre Moodle-Site den Webservice dieser Seite nicht aufrufen und damit die Aktualisierungsinformation nicht erhalten. Warten Sie, bis http://download.moodle.org wieder verfügbar ist.
;cURL error 60 (SSL certificate problem)
:Dieser Fehler deutet auf Probleme mit der Validierung des SSL-Zertifikats der moodle.org Site hin. Siehe [[SSL-Zertifikat für moodle.org]] für detaillierte Informationen. Dieser Fehler kann auch auftreten, wenn Ihre Moodle-Site hinter einem falsch konfiguruierten Proxy-Server läuft.
===Unable to fetch available updates data - unexpected HTTP response code ===
Achten Sie in der Debugmeldung auf den HTTP Response Code. Bei fehlerfreier Verarbeitung ist der HTTP Response Code 200. Alle anderen Codes führen zu einem Fehler.
===Unexpected version of the response format ===
Dieser Fehler kann auftreten, wenn die Aktualisierungsprüfung während der Aktualisierung Ihrer Moodle-Site. Warten Sie, bis die Aktualisierung abgeschlossen ist.
[[en:Automatic updates deployment]]
[[en:Automatic updates deployment]]

Version vom 5. Dezember 2012, 11:31 Uhr

Neue Funktionalität
in Moodle 3.11!


Vorlage:Zum Übersetzen

Automatische Aktualisierungen aktivieren

Ab Moodle 2.4 können Administrator/innen auf der Seite Einstellungen > Website-Administration > Server automatische Aktualisierungen aktivieren, indem sie die entsprechende Checkbox markieren. Wenn Aktualisierungen verfügbar sind, werden auf den Seiten Einstellungen > Website-Administration > Plugins > Übersicht bzw. Einstellungen > Website-Administration > Mitteilungen Buttons angezeigt, um das jeweilige Plugin in der aktuelleren Version zu installieren.

Damit diese Funktionalität der automatischen Aktualiserung genutzt werden kann, muss die Aktualisierungsmitteilung aktiviert sein.

Wie funktioniert das?

Als Teil der Information über verfügbare Aktualisierungen wird die URL einer ZIP-Datei übermittelt, die die neue Version des Plugins enthält. Wenn Sie den entsprechenden Button klicken, um das Plugin zu installieren und auf der mächsten Seite bestätigen, dass Sie die Installation tatsächlich ausführen wollen, dann wird ein Dienstprogramm mdeploy.php ausgeführt.

Dieses Dienstprogramm macht im einzelnen folgendes:

  1. Es autorisiert die Anfrage um sicherzustellen, dass Sie tatsächlich direkt von der Seite kommen, auf der Sie die Installation bestätigt haben.
  2. Die ZIP-Datei wird aus der Moodle Plugins Datenbank heruntergeladen.
  3. Eine Integritätsprüfung stellt sicher, dass die ZIP-Datei korrekt heruntergeladen wurde.
  4. Der aktuelle Code des Plugins wird im Verzeichnis moodledata/mdeploy/archive/ archiviert, damit Sie eine Sicherung haben, falls etwas schief geht oder falls Sie Ihre eigenen Codeanpassungen noch benötigen.
  5. Das Verzeichnis, in dem das aktuelle Plugin installiert war, wird gelöscht und durch den Inhalt der ZIP-Datei ersetzt.
  6. Ihr Browser wird auf die Seite weitergeleitet, auf der der normale Aktualisierungsprozess durchgeführt wird.

Ab diesem Moment können Sie die Aktualisierung durchführen, wie Sie es gewohnt sind, also so, als ob Sie die ZIP-Datei manuell heruntergeladen und an der richtigen Stelle entpackt hätten.

Automatische Aktualisierungen deaktivieren

In einigen Situationen (z.B. Server mit vielen lokalen Codeanpassungen oder Server mit einem eigenen Aktualisierungsprozess über Git) können automatische Aktualisierungen unerwünscht sein. Sie können diese Funktionalität vollständig deaktivieren, indem Sie in der Moodle-Konfigurationsdatei config.php folgende Zeile einfügen:

$CFG->disableupdateautodeploy = true;

Fehlender Installations-Button

Wenn die automatische Aktualisierung deaktiviert ist, wird kein Installations-Button angezeigt. Wenn die Funktionalität aktiviert ist, werden auf der Seite, die die verfügbaren Aktualisierungen anzeigt, einige Vorabtests durchgeführt, um sicherzustellen, dass die automatische Aktualisierung tatsächlich durchgeführt werden kann. Falls diese Vorabtests fehlschlagen, erscheint eine entsprechende Information.

Plugin-Dateien sind nicht schreibbar

During the deployment, Moodle will replace the whole folder with the plugin code with a new version. The web server process has to have write access to the folder and all its contents. There are several ways how to achieve this, depending on your web server setup and personal preferences. The exact location of the plugin folder depends on the type of the plugin. For a full list of locations see the Moodle path on https://docs.moodle.org/dev/Plugins

Example: Let us assume your web server is an Apache running at a Linux server as the user www-data. Your Moodle is installed at /var/www/vhosts/moodle/htdocs. You want to give it write access to the folder with your Stamp collection activity module:

   # cd /var/www/vhosts/moodle/htdocs
   # cd mod
   # chown -R www-data stampcoll
   # chmod -R u+w stampcoll

See also more about Installing plugins.

Can not download the package

Make sure that the site http://moodle.org/plugins is up and running at the moment. If it is down, your site can't fetch the ZIP packages from it. Wait for the moodle.org site is up again and try to repeat the deployment procedure.

There can also be a problem with the validation of the SSL certificate of the moodle.org site. See SSL certificate for moodle.org for more info.

Errors and exceptions

Datei:mdeploy-exception.png
Error screen during the plugin deployment

If anything goes wrong during the deployment, please read the error page carefully and copy the error message together with the debugging information for later reference. Also, check the mdeploy.log file. The mdeploy utility logs all the steps into this file located at moodledata/mdeploy/mdeploy.log. The log file usually contains additional details and debugging information describing the reason of the failure.

When you navigate back from the error screen, always remember to go back up to the screen with the list of available plugins (where you clicked the Install this update button originally). Just going back to the previous confirmation screen or even reloading the current page will not work as the request would not be authorized any more. Doing so leads to the unauthorized_access_exception with the message Unable to read the passphrase file.

The following section describes some errors that may raise and how to deal with them.

Unable to download the package (download_file_exception)

Check the bottom of the mdeploy.log file. It will probably contain a line starting with "cURL error" followed by the error number and the cURL error description.

cURL error 7 couldn't connect to host

Make sure that the site http://moodle.org/plugins is up and running at the moment. If it is down, your site can't fetch the ZIP packages from it. Wait for the moodle.org site is up again and try to repeat the deployment procedure.

cURL error 60 SSL certificate problem

This suggests problems with the validation of the SSL certificate of the remote (moodle.org) site when fetching the ZIP package. See SSL certificate for moodle.org for more info.

Fehler und Ausnahmen

Wenn Fehler auftreten, aktivieren Sie bitte das Debugging. Die Debugging-Mitteilungen enthalten zusätzliche Informationen zu den Fehlern.

Unable to fetch available updates data - unexpected cURL error

cURL error 7 couldn't connect to host
Prüfen Sie, ob die Webseite http://download.moodle.org momentan verfügbar ist. Wenn diese Seite nicht läuft, kann Ihre Moodle-Site den Webservice dieser Seite nicht aufrufen und damit die Aktualisierungsinformation nicht erhalten. Warten Sie, bis http://download.moodle.org wieder verfügbar ist.
cURL error 60 (SSL certificate problem)
Dieser Fehler deutet auf Probleme mit der Validierung des SSL-Zertifikats der moodle.org Site hin. Siehe SSL-Zertifikat für moodle.org für detaillierte Informationen. Dieser Fehler kann auch auftreten, wenn Ihre Moodle-Site hinter einem falsch konfiguruierten Proxy-Server läuft.

Unable to fetch available updates data - unexpected HTTP response code

Achten Sie in der Debugmeldung auf den HTTP Response Code. Bei fehlerfreier Verarbeitung ist der HTTP Response Code 200. Alle anderen Codes führen zu einem Fehler.

Unexpected version of the response format

Dieser Fehler kann auftreten, wenn die Aktualisierungsprüfung während der Aktualisierung Ihrer Moodle-Site. Warten Sie, bis die Aktualisierung abgeschlossen ist.