On-premise
Releases¶
Each Lime CRM Server on-premise release has a specific version of the library lime-crm
included. To enable a matching release, you need to specify the correct version of lime-crm
in your pyproject.toml
file, e.g.:
[tool.poetry.dependencies]
lime-crm = "==1.6.1"
In the list of released on-premise versions, the version of the lime-crm
can be found in parentheses of the version number.
Example
Lime CRM 2020.2.245 (2.22.2) is built against lime-crm==2.22.2
as implied in the version number
Installing¶
Note that your solution is built for a specific version of Lime CRM. That means that every time you upgrade a server, you need to build the solution again. Otherwise, you might re-install the previous version of Lime CRM when installing the solution.
lime-project¶
From Lime CRM 2022.3.1015(2.437.0) it is possible to use lime-project
to install a solution. This will do a clean install of the Lime CRM Python venv.
Info
The registry key Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled
(Type: REG_DWORD) must exist and be set to 1, before running this command. Otherwise there is a high risk that the command will fail. This is because the command takes a backup of the existing Python installation before installing and some files in the Python folder might be longer than 256 characters, which is the default limit in Windows.
Follow these steps to install a solution with lime-project
:
-
Download the wheelhouse of a solution from a github release (
https://github.com/Lundalogik/<solution-name>/releases
) or a localdist
folder (if built using lime-buildtools). -
Stop all Lime CRM services (RabbitMQ and all service named Lime CRM *).
-
Run the following commands in a Command Prompt as admin:
$ "C:\Program Files (x86)\Lundalogik\tools_venv\Scripts\activate.bat"
$ lime-project on-premise install <solution-{solution-name}-{suffix}.tar.gz>
Finally you have to start all Lime CRM services again.
limefu¶
For Lime CRM 2022.2 or earlier, use limefu
to install a solution. Follow these steps to install a solution with limefu
:
-
Download the wheelhouse of a solution from a github release (
https://github.com/Lundalogik/<solution-name>/releases
) or a localdist
folder (if built using lime-buildtools). -
Run the following command in the LIME Pro Command Prompt:
$ limefu solution install <solution-{solution-name}-{suffix}.tar.gz>
Finally, you have to restart every installed Lime CRM service such that the customizations in the solution is picked up by Lime CRM. After that, the solution is installed! 🎉
Configuring an On-Premise Installation¶
Environment configuration¶
The environment configuraiton config.yml
is located in the <service dir>
and differs depending on the type of service and platform.
Tip
Note that each service uses separate configuration files
Tip
Note that the config.yml
file also can be named config.yaml
. If both these files exist, the file with .yml
suffix takes precedence.
The location for config.yml
is %programdata%\Lundalogik\LIME Pro Server\<service name>\configs
Application configuration¶
For Windows On-Premise installations, the application-level configuration is expressed in the file %programdata%\Lundalogik\LIME Pro Server\application_config.yaml
. If it does not already exist, just create it.
Note
Unlike config.yml
, the application_config.yaml
file is shared by all services. That means that if you wish to add configuration for both the web server and the task handler, you only need to edit configuration once.
Run services debug mode¶
The Lime web server can be run in the command prompt rather than as a service. This is good when developing custom endpoints and custom limeobjects. The Lime web server can be started in debug mode, such that everytime you change your Python code, the server will be restarted. The web server will additionally only run the web server on one thread (useful if you wish to run a debugger in your code). Note that this feature only should be done when developing on your local machine! When you are done developing, remember to start your 'Lime CRM Webserver' service again.
-
Run services.msc and stop the
Lime CRM Webserver
service. -
Right click and run the
Limefu prompt
on the desktop as Administrator. Type:lime-webserver-debug
-
The loglevel can be configured in the config file for the webserver). They're also written to the server logs in
%LIME_HOME_PATH%\LIME Pro Server\Web Server\logs
. -
To stop the server, press Ctrl+C (sometimes multiple presses are needed).
With event handlers, which are run with in a separate service, the same principle applies.
-
Run services.msc and stop the
Lime CRM Event Handler
service. -
Right click and run the
Limefu Command Prompt
on the desktop as Administrator. Type:lime-event-handler
-
The logs can be found in
%LIME_HOME_PATH%\LIME Pro Server\Event Handler\logs
.
Note: Always make sure that the corresponding service is stopped when running lime-webserver or lime-event-handler in Limefu!