Jinstall-3.3.1

Mis à jour par Xavier Masia · le 07/12/2023 à 09:59 · Version 1.34
Déposé par · le 21/12/2020 à 16:56
Archive ZIP (430,38 Mo)

Jinstall is an automatic procedure installing the application components of JPlatform:

  • jplatform : the JPlatform application
  • httpd : the Apache HTTPD front-end
  • postgres_jplatform : the PostgreSQL database dedicated to JPlatform
  • jodconverter : the JODConverter server
  • horizon : the Horizon messaging system

This procedure is based on RedHat Ansible, a tool that automates configuration management and application deployment.

Prerequisites

Operating systems

Distributions supported by the scripts.

  • Debian : 10, 11
  • Ubuntu : 20.04, 22.04
  • Red Hat Enterprise Linux : 8, 9
  • Rocky Linux : 8, 9

Jinstall Win is the automatic installation procedure dedicated to Microsoft Windows systems.

Utilities

The package(s) to install via the package manager

  • python3: version 3.5 or higher

Access

  • SSH
  • user account with sudo privileges
  • Internet (package manager)

Installation procedure

In the case of an installation on several instances (front-end, application, services), the entire installation procedure is to be performed on 1 instance only.

Remote authentication

This step is only necessary if you are installing on several instances.

To facilitate and automate the remote authentication, we will generate private/public keys for each remote machine.

(If ever done) Generate a private/public key :

ssh-keygen

Then authenticate to create an SSH key with the remote machine (repeat for each remote instance) :

ssh-copy-id -p 22 ssh_user@server.example.com

You can test the authentication :

ssh ssh_user@ssh_user@server.example.com python3 --version

The expectation is no password prompt.

Get the installation scripts

Télécharger l'archive de Jinstall depuis Community.

Download the Jinstall archive from Community.

Extract the archive in a dedicated directory :

mkdir ~/Jinstall
unzip Jinstall-X.Y.Z.zip -d ~/Jinstall

Restrict access rights to the owner of the directory :

chmod 700 ~/Jinstall

Move into the directory:

cd ~/Jinstall

Install dependencies

Python packages for installation will be installed via PyPI in a virtual environment (can be removed at the end of the installation).

On Debian & Ubuntu, install these components :

sudo apt install python3-pip python3-venv -y

Create a virtual environment :

python3 -m venv venv_jinstall

Place yourself in the environment :

source venv_jinstall/bin/activate

The appearance of the terminal has been changed accordingly.

Update pip :

python3 -m pip install --upgrade pip

Install dependencies :

python3 -m pip install -r requirements.txt

Identify the components to be deployed

Adapt the installation variables

You can customize the installation architecture (directory, memory, URL, ...).

Put in the files directory your WAR to deploy and your SSL certificates, to have a HTTPS URL.

Edit the files associated to the different components you want to deploy:

  • group_vars/all.yml : common / general file
  • group_vars/horizon.yml : Horizon messaging
  • group_vars/httpd.yml : Apache frontend
  • group_vars/jplatform.yml : JPlatform application
  • group_vars/jodconverter.yml : document conversion server
  • group_vars/postgres_jplatform.yml : PostgreSQL database for JPlatform

Declare the remote servers

Identify the FQDN (or IP) of the remote servers where to perform the installation.

Installation architecture:

  • on 1 node: edit the inventory_local.yml file
  • on several nodes (e.g. application VM and service): edit the inventory_remote.yml file.

Then rename this file to inventory.yml.

Test the configuration

Let's check that the accesses are well established.

Run the ping test command:

ansible all -i inventory.yml -m ping

The expected result is a ok received successfully for each remote server.

Deployment of applications

Install software components. You will be prompted for the elevation of privileges password (sudo):

ansible-playbook -i inventory.yml playbooks/install.yml -K

The installation must end without failed operations. Example:

PLAY RECAP ****************************************************************************************************
example.com: ok=123 changed=78 unreachable=0 failed=0 skipped=34 rescued=0 ignored=0

After installation

Exit the virtual environment:

deactivate

The appearance of the terminal returns to normal.

Remove the virtual environment:

rm -rf venv_jinstall

Also remove the Jinstall directory:

cd ~
rm -rf ~/Jinstall

Tips & Tricks

Installed services

After installation here are the available services.

Software Service Status after installation Information
Apache HTTPD [apache2 | httpd] started systemctl status [apache2 | httpd]
Tomcat JPlatform jplatform not started systemctl status jplatform
Tomcat JOD jodconverter not started systemctl status jodconverter
LibreOffice libreoffice not started systemctl status libreoffice
PostgreSQL postgresql started systemctl status postgresql

The Apache HTTPD service name is apache2 for Debian & Ubuntu and httpd for RedHat & RockyLinux.

Handy commands

Commands to run on remote servers.

Start services (not yet started):

sudo systemctl start jplatform jodconverter libreoffice

View the JPlatform logs:

sudo -u jplatform tail -f /opt/jalios/app/tomcat/jplatform/webapps/ROOT/WEB-INF/data/logs/jcms.log

Install on multiple environments

See How to build your inventory

Links