Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Table of Content Zone
locationtop
typelist
separatorbrackets


Info
titleSkrócenie procesu aktualizacji

Od wersji From version 1.1.0 Aktualizator umożliwia uaktualnienie dowolnej wersji do najnowszej w jednym kroku!

Aktualizacja systemu dLibra

Aktualizacja systemu dLibra w ogólności polega na skopiowaniu do katalogów Serwera i Aplikacji Czytelnika nowych wersji plików. W przypadku poważniejszych zmian konieczna może być też edycja niektórych plików konfiguracyjnych. Trzeba oczywiście wiedzieć które pliki zostały zmienione oraz gdzie je przekopiować.  Aby uniknąć potencjalnych błędów związanych z błędnym kopiowaniem plików, zdecydowaliśmy w możliwie najszerszym zakresie zautomatyzować ten proces. W tym celu stworzony został Aktualizator systemu dLibra. Jest to niewielka aplikacja, która pozwala przyśpieszyć proces aktualizacji. W niniejszym dokumencie przedstawione zostaną ogólne zagadanienia związane z instalacją i działaniem Aktualizatora, oraz to jak wygląda aktualizacja przeprowadzana przy użyciu tego narzędzia.

Proszę nie uruchamiać Aktualizatora zanim nie zapoznają się Państwo z poniższą dokumentacją.

Instalacja Aktualizatora

Aby zainstalować Aktualizator systemu dLibra należy pobrać archiwum w wybranym formacie

, the updater makes it possible to update any version to the newest one in just one step!

Updating the dLibra System

In general, updating the dLibra system consists in copying newer file versions to the server and to the Reader Application. In the case of greater changes, it may be necessary to also edit some configuration files. Off course, the user must know which files have been changed and where they should be copied to. In order to avoid potential errors related to erroneous copying of files, we have decided to automate that process as much as possible. For that purpose, we have created the updater of the dLibra system. It is a small application which makes it possible to accelerate the update process. In this document, we discuss the general issues related to the installation and operation of the updater, and we explain how to do updates with the use of that tool.

Please do not start up the updater before you have read the following documentation.

Installing the Updater

In order to install the updater of the dLibra system, you have to download the archive, in the selected format: dlibra-jnlp-updater.zip

lub 

or dlibra-jnlp-updater.tar.gz.

Umieścić jego zawartość w dowolnie wybranej lokalizacji na komputerze na którym zainstalowana jest dLibra.

Aktualizator jest aplikacją Javową wykorzystującą protokół JNLP. Przy pierwszym uruchomieniu, na dysk zostaną ściągnięte wszystkie wymagane biblioteki, każde kolejne uruchomienie spowoduje ściągnięcie już tylko ewentualnych zmian (poprawek) w Aktualizatorze, a nie całej aplikacji.

Po rozpakowaniu (a przed pierwszym uruchomieniem) w katalogu Aktualizatora powinny znajdować się następujące pliki

The content of the archive should be placed in any location on the computer on which the dLibra system is installed.

The updater is a Java application which makes use of the JNLP protocol. After the first start-up, all the required libraries will be downloaded to the drive, and for the following start-ups, only the possible changes (corrections) in the updater will be downloaded (not the whole application).

After the unpacking (and before the first start-up), the updater directory should contain the following files:

jnlp-updater.bat

jnlp-updater.sh

Skrypty uruchamiające Aktualizator dla systemów Windows i Linux. W przypadku systemów Linuxowych należy pamiętać o wywołaniu polecenia

The scripts which run the updater for Windows and Linux systems. In the case of Linux system, the chmod +x jnlp-updater.sh

przed uruchomieniem skryptu

command should be called.

netx.jar

netxjar

NETX-LICENSE.TXT

Minimalistyczna implementacja protokołu JNLP pozwalająca na wykorzystanie tego protokołu niezależnie od Java Web Start firmy Sun Microsystems.

A minimalist implementation of the JNLP protocol which make it possible to use that protocol regardless of the Java Web Start framwork of the Sun Microsystems Inc. company.

updater.properties

Konfiguracja aktualizatora (por. rozdział "Przed aktualizacją"

The updater configuration (see chater “Before Updating”).

Przed aktualizacją

Informacje o nowych wydaniach systemu dLibra znajudją się tutaj.

W chwili gdy nowa wersja jest publikowana w repozytorium aktualizacji (patrz "Repozytorium oprogramowania dLibra") jest również uaktualniany kanał RSS. Po opublikowaniu nowej wersji systemu dLibra możemy rozpocząć proces aktualizacji. W tym celu należy uzupełnić wartości parametrów w pliku updater.properties oraz założyć konto w repozytorium oprogramowania dLibra. Proszę pamiętać, że wszystkie ścieżki do plików/katalogów powinny być zapisane przy użyciu "/" niezależnie od używanego systemu operacyjnego.

Plik updater.properties zawiera następujące parametry konfiguracyjne:

general.serverHomeDirectory -  katalog w którym zainstalowany jest serwer dLibry

general.webappHomeDirectory -  katalog w którym zainstalowana jest Aplikacja Czytelnika systemu dLibra.

general.target

Aktualizator może realizować dwa cele aktualizacji : server lub webapp. Tryb serwer uruchamia aktualizacje serwera (por. Aktualizacja Serwera) natomiast tryb webapp to aktualizacja Aplikacji Czytelnika (por. Aktualizacja Aplikacji Czytelnika).

webdav.url - Adres do Repozytorium oprogramowania dLibra

webdav.username i webdav.password  - Nazwa użytkownika i hasło pozwalające na dostęp do repozytorium oprogramowania dLibra.

Przed przeprowadzeniem właściwego procesu aktualizacji należy najpierw wykonać kopie zapasową obecnie zainstalowanej wersji systemu.

Zaleca się aby w pierwszej kolejności przeprowadzić aktualizacje serwera dLibry, a następnie zakualizować Aplikację Czytelnika.

System umożliwia aktualizację w ramach tej samej tzw. małej wersji, a także pomiędzy małymi wersjami. Na małą wersję składają się dwie pierwsze liczby numeru wersji. przykładowo małą wersją dla 6.1.0 jest 6.1. Aktualizacja w ramach małej wersji następuje automatycznie. Jeżeli chcemy zaktualizować system do innej małej wersji, np z 6.1 do 6.2, musimy przekazać do Aktualizatora parametr z żądaną wersją. Jeżeli dostępne są nowe wersje z samej oraz innej małej wersji to także musimy podać, którą wersję chcemy zainstalować.

Do wymuszenia aktualizacji do określonej wersji służy parametr updater.requestedVersion. Przykładowo, jeżeli posiadamy wersję 6.1.0 i chcemy uaktualnić system do wersji 6.2.0, to w pliku updater.properties umieszczamy następujący wpis

Before Updating

For information about new releases of the dLibra system, see here.

When a new version is published in the update repository (see “The Repository of the dLibra Software”, the RSS channel is also updated. After the new version of the dLibra system has been published, the update process can begin. First, the person doing the update should enter parameter values in the updater.properties file and create an account in the repository of the dLibra software. Please remember that all paths to files/directories should be entered with the use of “/”, regardless of the operating system.

The updater.properties file contains the following configuration parameters:

general.serverHomeDirectory – a directory in which the dLibra server is installed;

general.webappHomeDirectory – a directory in which the Reader Application of the dLibra system is installed;

general.target

The updater can serve two update-related purposes: server or webapp; the server mode starts up a server update (see “Updating the dLibra Server”) while the webapp mode means updating the Reader Application (see “Updating the Reader Application”);

webdav.url – an address for the repository of the dLibra system; and

webdav.username and webdav.password – the user name and the password which make it possible for the user who is doing an update to access the repository of the dLibra system.

Before the actual update process, a backup of the currently installed version of the system should be done.

It is recommended that the dLibra server be updated first, before the Reader Application.

The system makes it possible to do an update within the framework of the same, ‘small’ version and between ‘small’ versions. The small version consists of the two first numbers of a version number, for example, for 6.1.0, the ‘small’ version is 6.1. An update within the framework of a ‘small’ version is done automatically. In order to update the system to another ‘small’ version, for example, from 6.1 to 6.2, a parameter with the required version must be passed on to the updater. If new versions of the same and of another ‘small’ version are available, the user must also indicate which version is to be installed.

An update of a particular version of is enforced with the use of parameter updater.requestedVersion. For example, if we have version 6.1.0 and want to update the system to the 6.2.0 version, we enter the following code in the “updater.properties” file:

Code Block
updater.requestedVersion=6.2.0

Należy pamiętać, aby po aktualizacji usunąć ten wpis z pliku.

Please remember to delete that entry from the file after the update.

The update process makes it possible to update any version to any other version, as long as there is such a possibility. In the case of an automatic update within the framework of one ‘small’ version, whenever the updater is called, an update to the latest version takes place. For example, when version 5.0.11 is installed, the updater has to be called once for the dLibra server to be updated to the newest version, for example, Proces aktualizacji pozwala na uaktualnienie pomiędzy dowolnymi wersjami, o ile oczywiście jest taka możliwość. W przypadku automatycznej aktualizacji w ramach tej samej małej wersji każdorazowe wywołanie Aktualizatora powoduje uaktualnienie do najnowszej wersji. Przykładowo: mając zainstalowaną wersję 6.0.11,  po jednym wywołaniu Aktualizatora serwer dLibry zostanie uaktualniony do najnowszej wersji, np 6.0.24.

Aktualizacja serwera dLibry

Updating the dLibra Server
Anchor
serwer
serwer

Proces aktualizacji serwera dLibry przebiega następująco:

  1.   Wykonać kopie zapasową obecnie zainstalowanej wersji serwera
  2.   Zakończyć działanie serwera dLibry (i serwera Tomcat)
  3.   W pliku updater.properties ustawić general.serverHomeDirectory oraz general.target na wartość server.
  4.   Wywołać skrypt uruchamiający Aktualizator odpowiedni dla zainstalowanego systemu operacyjnego

Po wywołaniu skryptu startowego rozpocznie się procesu aktualizacji. Jeżeli jest to pierwsze uruchomienie Aktualizator ściągnie najpierw "sam siebie", a następnie rozpocznie właściwy proces aktualizacji. Sam proces aktualizacji przebiega następująco:

The server is updated in the following steps:

  1. Do a backup of the currently installed version of the server.
  2. End the dLibra server (and the Tomcat server).
  3. In the updater.propertiesfile set general.serverHomeDirectory and general.target to value server.
  4. Call the script which starts up the updater – it should be the appropriate script for the installed operating system.

When the startup script has been called, the updating process will begin. If it is the first start-up, the updater will first download ‘itself’, and then it will begin the actual updating process. The updating process looks as follows:

  1.   The updater determines the parameters of the server (that information is taken mainly from databases; the updater uses information from the database.properties file of the server):
    1. Which services are installed?
    2. Does the server work?
    3. Which version of the dLibra system is currently installed? 
  2. Are there newer versions in the repository?
    1. If not, the updater is ended.
  3. The updater connects with the repository of the dLibra software, which contains updates, and downloads the files necessary for the update.
  4. The status of the dLibra server is checked:
    1. If the dLibra server is running, the updater will wait until it is ended.
    2. If it is ended, the updater will move to the next step of the update.
  5. Old files are removed and replaced with new ones.
  6. If the person who is doing the update has to intervene, the information about it will be displayed on the console.
    1. For each such file:
      1. copy of the old file with the
  7.   Aktualizator ustala parametry serwera (Informacje te są pobierane głównie z bazy danych. Aktualizator korzysta z informacji branych z pliku database.properties serwera) :
    1. Które usługi są zainstalowane?
    2. Czy serwer działa?
    3. Jaka jest aktualnie zainstalowana wersja dLibry?  
  8. Czy w repozytorium są dostępne nowsze wersje?
    1. Jeżeli nie, kończy to pracę Aktualizatora.
  9. Aktualizator łączy się z repozytorium oprogramowania dLibra, gdzie znajdują się aktualizacje i ściąga stamtąd pliki niezbędne do przeprowadzenia aktualizacji.
  10. Sprawdzany jest stan serwera dLibry:
    1.  Jeżeli serwer dLibry jest uruchomiony, aktualizator będzie czekał, aż zostanie wyłączony.
    2. Jeżeli jest wyłączony przejdzie do kolejnego kroku aktualizacji.
  11. Usuwane są stare pliki, a na ich miejsce kopiowane nowe.
  12. Jeżeli zmiany w plikach wymagają interwencji osoby przeprowadzającej aktualizacje informacja o tym zostanie wypisana na konsole.
    1. dla każdego takiego pliku:
      1. stworzona zostanie kopia starego pliku z rozszerzeniem "fromVersion_x_x_x_" extension (gdzie where x_x_x_ ) to stara wersja dLibry np. is an old version of the dLibra system, for example, pages.xml.fromVersion_5_0_1l_
      2. stary plik zostanie zastąpiony nowym
  13. Usuwane są pliki Aktualizacji sciagnięte do katalogu tymczasowego.
  14. Na koniec aktualizacji serwera wyświetlana jest informacja o tym, jakie pozostałe usługi serwera oraz Aplikacje Czytelnika trzeba jeszcze zaktualizować (w przypadku gdy serwer dLibry jest zainstalowany na więcej niż jednym komputerze proces aktualizacji trzeba powtórzyć dla każdej z nich).
  15. Kończy to proces automatycznej aktualizacji serwera, serwer posiada jest jeżeli w repozytorium znajdują się nowsze wersje Aktualizator wyświetli o tym informacje.  

Po zakończeniu działania Aktualizatora należy przejrzeć pliki, które zostały wskazane przez Aktualizator jako wymagające interwencji osoby przeprowadzającej aktualizacje. Gdy serwer został już uaktualniony do najnowszej wersji możemy przejść do Aktualizacji Aplikacji Czytelnika.

Aktualizacja Aplikacji Czytelnika systemu dLibra
      1. ) will be created;
      2. the old file will be replaced with a new one.
  1. The update files downloaded to the temporary directory are deleted.
  2. At the end of the server update, the program displays information about which server services and Reader Applications are still to be updated (if the dLibra server is installed on more than one computer, the updating process has to be repeated for each of them).
  3. That ends the process of the automatic update of the server; if there are newer versions in the repository, the updater will display an appropriate message. 

After the updater has finished its job, the user should review the files indicated by the program as requiring an intervention of the person who is doing the update. After the server has been updated to the latest version, the user can proceed to update the Reader Application.

Updating the Reader Application of the dLibra System
Anchor
czytelnik
czytelnik

Proces aktualizacji Aplikacji Czytelnika przebiega podobnie jak omówiona w poprzednim rozdziale aktualizacja serwera dLibry.

  1. Wykonać kopie zapasową obecnie zainstalowanej wersji Aplikacji Czytelnika.
  2. Wyłączyć Tomcata (o ile nie został jeszcze wyłączony)
  3. W pliku updater.properties ustawić general.webappHomeDirectory oraz general.target na wartość webapp.
  4. Wywołać skrypt uruchamiający Aktualizator odpowiedni dla zainstalowanego systemu operacyjnego

Proces aktualizacji przeprowadzany dla Aplikacji Czytelnika ma bardzo podobny przebieg z pominięciem pewnych kroków charakterystycznych dla serwera. Po zakończeniu procesu aktualizacji dla Serwera i Aplikacji Czytelnika możemy uruchomić system dLibra.

Aktualizacja Aplikacji Redaktora i Administratora

Po aktualizacji Aplikacji Czytelnika, wszystkie instalacje Aplikacji Redaktora i Administratora automatycznie zaktualizują się przy następnym uruchomieniu.

Najczęściej zadawane pytania

Co zrobić w przypadku gdy serwer dLibry działa na dwóch maszynach?

Jeżeli serwer dLibry działa na kilku serwerach, aktualizator należy zainstalować na każdym z komputerów, a sam proces aktualizacji powtórzyć dla każdej instancji serwera. Analogicznie należy postąpić w przypadku gdy aplikacja czytelnika jest zainstalowana na innej maszynie niż serwer dLibry.

updater.properties : parametry opcjonalne

server.checkRunning - Jeżeli parametr ten ma wartość false (domyślna wartość to true), aktualizator pominie etap sprawdzania, czy serwer jest uruchomiony. Ustawienie tej wartości na false może być pomocne, gdy chcemy zaktualizować kopie plików aplikacji czytelnika i serwera. Nie ma wtedy potrzeby wyłączania żadnego z elementów systemu dLibra, a po pomyślnym zakończeniu aktualizacji można zamienić stary plik na nowy.

delete.downloaded.patch - Domyślne zachowanie aktualizatora dla tego parametru reprezentuje wartość true. Aktualizator ściąga z repozytorium oprogramowania dLibra pliki aktualizacji, przy zachowaniu wartości domyślnych tuż przed zakończeniem działania Aktualizator usunie wszystkie ściągnięte pliki. Jeżeli chcemy zachować ściągniętą aktualizacje należy ustawić wartość false. Niezależnie od ustawienia tego parametru przy kolejnym uruchomieniu aktualizatora do którego są sciągne aktualizacje zostanie wyczyszczony.

general.tempDirectoryPath - Aktualizator domyślnie ściąga pliki do katalogu dLibraUpdater jest on tworzony w lokalizacji którą wskazuje zmienna systemowa java.io.tmp (jest to zmienna wirtualnej maszyny javy). W przypadku systemów linuxowych przważnie katalog ten odpowiada wartości zmiennej $TEMP. Aby zmodyfikować katalog do którego zapisywane są aktualizacje należy plik updater.properties i dodać klucz : general.tempDirectoryPath, a jako wartość podać żądany katalog.

...