Installer: различия между версиями
Нет описания правки |
|||
Строка 1: | Строка 1: | ||
[[Installer|en]] | [[Инсталлятор|ru]] | [[Installer|en]] | [[Инсталлятор|ru]] | ||
'''ATTENTION: The installer is used for ERP "UserSide" versions 3.11 and higher. For versions below 3.11 - use individual instructions for [[Installation for version 3.10 and earlier|installation]]. | |||
The installer is available in the client's personal cabinet at https://my.userside.eu/soft/installer | |||
It is a console utility that '''runs on the server in the directory where ERP "UserSide" is/will be installed''' and allows [[Installation|install the current version]] ERP "UserSide" or [[Upgrade_(installer)|upgrade the current version]] to the current version. | |||
The installer process will require you to enter your licence key, which is also visible in your personal account in the main customer information section in the Licence Information subsection. Additional authorisation is done by the IP address of the server where the installer is running. | |||
== Commands and options == | |||
The installer supports several commands, each of which can use different options. | |||
Options start with the symbol <code>-</code> (short naming) or <code>--</code> (full naming). Several options can be specified at the same time. | |||
A command is specified without an initial <code>-</code> or <code>--</code> and can be only one. The command is what the installer should execute. | |||
=== Global options === | |||
Global options are available in all commands. | |||
To see the global options, you can use the help command | |||
php userside_install.phar help | |||
List of global options: | |||
<code> --format=FORMAT</code> - Output format (txt, xml, json, md) defaults to txt | |||
<code>-q, --quiet</code> - Quiet Mode. Do not display any messages | |||
<code>-V, --version</code> - Installer version output | |||
<code> --ansi</code> - Forced output in ANSI mode (with support for colour console, etc.) | |||
<code> --no-ansi</code> - Disable ANSI mode | |||
<code>-n, --no-interaction</code> - Do not ask any questions. It is worth noting that the installer is not always able to perform actions in this mode. In cases where mandatory input is required during the operation, the installer will stop with an error. | |||
<code> --dir[=DIR]</code> - Target directory. We recommend to run the installer in the same directory where Userside is (or is planned to be) located. But if for some reason this is not possible, you can specify the target directory in the value of this option. | |||
<code>-v|vv|vvv, --verbose</code> - Increase the amount of output information: 1 - normal output, 2 - more informative output, 3 - output everything, including debugging information | |||
To see the options for a particular command, specify it after the word help | |||
php userside_install.phar help install | |||
Displays help on the install command. | |||
=== Available commands === | |||
To see a list of available commands, you can use the list command | |||
php userside_install.phar list | |||
The current version of the installer implements the following commands: | |||
<code>config</code> - installer configuration command (installer settings are saved in the installer.json file) | |||
<code>install</code> - userside installation command. It is also used for upgrading, as it is the same procedure. | |||
<code>repair</code> - command to restore userside files for the current version (version number is taken from the database). The command should be executed after restoring the database backup to update the userside system version itself with respect to the data version. | |||
<code>check:integrity</code> - command to check file integrity. File integrity is also checked in the install and repair rooms, so you may never need to run this command specifically. But you can always use it just to check file integrity. | |||
<code>check:updates</code> - command to check if there is a new version of Userside. It may be useful to run this command just to see if there is a new version. If there are no new versions, the installer termination code will be 1 (as opposed to the normal termination code of 0), allowing the command to be run in scenarios based on status code checking. | |||
<code>maintenance:disable</code> - forcibly switch off the maintenance mode. Perform at your own risk. If the system has not been properly installed or the upgrade has errors that prevent the system from being used (i.e. the atomic integrity of the system has been compromised, for example, only part of the migrations have been performed), userside remains locked until the installer completes correctly. If this happens, you should either fix the error yourself or contact technical support for help and then run the installer again. After the error is fixed and the update is successfully completed, the lock flag will be removed automatically. But if you suddenly have an urgent need to use userside with broken integrity, you can run this command and the flag will be removed. | |||
==== Default command ==== | |||
In the 2.0.x installer branch, the default command is install. This means that if you run the installer without specifying any command, the installer will run in install mode. However, this behaviour will be eliminated in the next minor versions (starting with 2.1), so it is recommended that you explicitly specify the install command whenever you run the installer, especially if you run it automatically from cron. | |||
==== Example of running the command with the options ==== | |||
Command: | |||
php userside_install.phar install -q -n | |||
In this example, the install command will be run in silent mode (-q) without displaying any prompts (-n), automatically accepting default values as responses. It should be re-emphasised here that there are situations where user input is required (e.g. you can only upgrade to a new minor version, and this requires confirmation, as this process can make quite serious changes to the system). | |||
== Commands == | |||
=== Configuration === | |||
To see the options available for configuration, you can run one of the following commands (they are equivalent): | |||
php userside_install.phar help config | |||
or | |||
php userside_install.phar config --help | |||
In addition to the standard options, you will see two options for the config command: | |||
<code>--stability[=STABILITY]</code> - The minimum Userside stability level that can be set (stable, rc, beta, alpha) defaults to stable. | |||
<code>--key[=KEY]</code> - Changing the licence key. When you enter a licence key during the installer, it is saved in the installer.json installer config and will not be requested again. If you need to change the licence key, you can edit the installer.json file or run the config command with this option, passing the new key as the value. | |||
==== Changing the stability mode in more detail ==== | |||
Using the configuration mode, you can set the stability level of the updates you receive. To do this, run the installer with the '''config''' command and the --stability=''level'' option: | |||
php userside_install.phar config --stability=stable | |||
By default, if no stability level is configured, you will always receive only stable updates. | |||
You can select one of the following stability levels: | |||
* '''stable''' - you will receive only stable versions | |||
* '''rc''' - you will receive stable versions and release candidates | |||
* '''beta''' - you will receive stable versions, release candidates and beta versions | |||
* '''alpha''' - you will receive stable versions, release candidates, beta and alpha versions | |||
* '''dev''' - you will receive all versions, including those in active development |
Версия от 17:18, 28 февраля 2024
ATTENTION: The installer is used for ERP "UserSide" versions 3.11 and higher. For versions below 3.11 - use individual instructions for installation.
The installer is available in the client's personal cabinet at https://my.userside.eu/soft/installer
It is a console utility that runs on the server in the directory where ERP "UserSide" is/will be installed and allows install the current version ERP "UserSide" or upgrade the current version to the current version.
The installer process will require you to enter your licence key, which is also visible in your personal account in the main customer information section in the Licence Information subsection. Additional authorisation is done by the IP address of the server where the installer is running.
Commands and options
The installer supports several commands, each of which can use different options.
Options start with the symbol -
(short naming) or --
(full naming). Several options can be specified at the same time.
A command is specified without an initial -
or --
and can be only one. The command is what the installer should execute.
Global options
Global options are available in all commands.
To see the global options, you can use the help command
php userside_install.phar help
List of global options:
--format=FORMAT
- Output format (txt, xml, json, md) defaults to txt
-q, --quiet
- Quiet Mode. Do not display any messages
-V, --version
- Installer version output
--ansi
- Forced output in ANSI mode (with support for colour console, etc.)
--no-ansi
- Disable ANSI mode
-n, --no-interaction
- Do not ask any questions. It is worth noting that the installer is not always able to perform actions in this mode. In cases where mandatory input is required during the operation, the installer will stop with an error.
--dir[=DIR]
- Target directory. We recommend to run the installer in the same directory where Userside is (or is planned to be) located. But if for some reason this is not possible, you can specify the target directory in the value of this option.
-v|vv|vvv, --verbose
- Increase the amount of output information: 1 - normal output, 2 - more informative output, 3 - output everything, including debugging information
To see the options for a particular command, specify it after the word help
php userside_install.phar help install
Displays help on the install command.
Available commands
To see a list of available commands, you can use the list command
php userside_install.phar list
The current version of the installer implements the following commands:
config
- installer configuration command (installer settings are saved in the installer.json file)
install
- userside installation command. It is also used for upgrading, as it is the same procedure.
repair
- command to restore userside files for the current version (version number is taken from the database). The command should be executed after restoring the database backup to update the userside system version itself with respect to the data version.
check:integrity
- command to check file integrity. File integrity is also checked in the install and repair rooms, so you may never need to run this command specifically. But you can always use it just to check file integrity.
check:updates
- command to check if there is a new version of Userside. It may be useful to run this command just to see if there is a new version. If there are no new versions, the installer termination code will be 1 (as opposed to the normal termination code of 0), allowing the command to be run in scenarios based on status code checking.
maintenance:disable
- forcibly switch off the maintenance mode. Perform at your own risk. If the system has not been properly installed or the upgrade has errors that prevent the system from being used (i.e. the atomic integrity of the system has been compromised, for example, only part of the migrations have been performed), userside remains locked until the installer completes correctly. If this happens, you should either fix the error yourself or contact technical support for help and then run the installer again. After the error is fixed and the update is successfully completed, the lock flag will be removed automatically. But if you suddenly have an urgent need to use userside with broken integrity, you can run this command and the flag will be removed.
Default command
In the 2.0.x installer branch, the default command is install. This means that if you run the installer without specifying any command, the installer will run in install mode. However, this behaviour will be eliminated in the next minor versions (starting with 2.1), so it is recommended that you explicitly specify the install command whenever you run the installer, especially if you run it automatically from cron.
Example of running the command with the options
Command:
php userside_install.phar install -q -n
In this example, the install command will be run in silent mode (-q) without displaying any prompts (-n), automatically accepting default values as responses. It should be re-emphasised here that there are situations where user input is required (e.g. you can only upgrade to a new minor version, and this requires confirmation, as this process can make quite serious changes to the system).
Commands
Configuration
To see the options available for configuration, you can run one of the following commands (they are equivalent):
php userside_install.phar help config
or
php userside_install.phar config --help
In addition to the standard options, you will see two options for the config command:
--stability[=STABILITY]
- The minimum Userside stability level that can be set (stable, rc, beta, alpha) defaults to stable.
--key[=KEY]
- Changing the licence key. When you enter a licence key during the installer, it is saved in the installer.json installer config and will not be requested again. If you need to change the licence key, you can edit the installer.json file or run the config command with this option, passing the new key as the value.
Changing the stability mode in more detail
Using the configuration mode, you can set the stability level of the updates you receive. To do this, run the installer with the config command and the --stability=level option:
php userside_install.phar config --stability=stable
By default, if no stability level is configured, you will always receive only stable updates.
You can select one of the following stability levels:
- stable - you will receive only stable versions
- rc - you will receive stable versions and release candidates
- beta - you will receive stable versions, release candidates and beta versions
- alpha - you will receive stable versions, release candidates, beta and alpha versions
- dev - you will receive all versions, including those in active development