Skip to content

Installation

Lukas Fey edited this page Jan 9, 2025 · 142 revisions

Xyna can be installed in various ways. The most common way is a Linux Server, hosting an Apache server for the gui and the xyna server itself.

To get the required BundleItem follow the instructions of the ReadMe in Installation

Table of Contents

Prerequisites

Prerequisites
What Version
OS Oracle Linux or RHEL 7.x/9.x, Ubuntu 20.x 64bit
RAM 1024 MB is minimum
Diskspace 1 GB is minimum
Java JDK 11
Apache Ant 1.9
WebServer Apache 2.4.x

Quick Guide

If you just need a reference to install Xyna on a prepared environment, go ahead. For a more detailed guide, jump to the installation example in the next section.

Prerequisites Package: Quick Guide

The best way to start with the installation is to install the Xyna Prerequisites package. This package asks interactivly for all installation parameters, contains Apache Ant and Tomcat and executes a number of checks to assure, the system is ready for the installation of the Xyna Factory Server. Here are the options of the prerequisites package

 ./install_prerequisites.sh                                                                                                          
  usage: install_prerequisites.sh -nacfgjstuACFGIJSTU -i instance
 -n    dry-run, display the evaluated commandline parameters
 -e    force, do the installation even some of system requirements are not fullfiled (ONLY for experts!!!)
 -v    verbose mode, print additional debug output
 -i    specify instancenumber or 'NEW' to create next instance
       default is 1; 'NEW' is only needed for instances starting at 2
 -I    install scripts into '${INSTALL_PREFIX}/bin'
 -aA   include / exclude all components
 -bB   [don't] check SELinux/AppArmor
 -cC   [don't] install SSL certificate
 -dD   [don't] install remote deployment tools
 -fF   [don't] create installation folder
 -jJ   [don't] install Ant
 -lL   [don't] set limits
 -pP   [don't] configure SNMP-Daemon
 -rR   [don't] configure SSH-Daemon und SSH-Client
 -sS   [don't] configure syslog and logrotation
 -tT   [don't] install Tomcat
 -uU   [don't] create unprivileged user
 -wW   [don't] configure firewall settings
 -xX   [don't] create /etc/init.d-script for xynafactory
 -zZ   [don't] configure NTP-Client and time zone
 Extra options (not included in -aA)
 -gG   [don't] install Geronimo (Java EE, incl. Tomcat) instead of blank Tomcat
 -oO   [don't] install Oracle Instant Client
 -yY   [don't] create /etc/init.d-script and respawning for network-availability-demon

Xyna Factory Server: Quick Guide

After successful installation of the prerequisites the installation of the Xyna Factory Server can be started. Depending on, what the server is used for, following options can be chosen:

  usage: "install_black_edition.sh" -nvabpABEP -cdfgqrstCDFGQRST [csv list] -i instance -m merge -3 check
 
 -n    dry-run, display the evaluated commandline parameters
 -v    verbose mode, display factory commands
 -i    specify instancenumber; default is 1
 -m    specify merge-mode for merging configuration files, e.g. server.policy, log4j2.xml
       possible values are merge, customized, new, abort; default is merge
 -3    specify check-mode for checking third party licenses
       possible values are server, revision, delivery, none
 -aA   include / exclude all components except 'xynacluster', 'oraclecluster'
 -bB   [don't] configure bash_completion
 -lL   [don't] merge log4j2.xml
 -pP   [don't] set xyna properties
 -dD   [don't] deploy in one or more of the following application servers:
     ALL geronimo tomcat oracle
 -cC   [don't] install one or more of the following components:
     ALL filter trigger services xynacluster oraclecluster xynafactory xynaws fractalmodeller
 -fF   [don't] install one or more of the following filters:
     ALL nsnhix5600 dhcp_v4 radius
 -gG   [don't] install one or more of the following datamodeltypes:
     ALL mib,tr069,xsd
 -rR   [don't] install one or more of the following repositoryaccesses:
     ALL svn
 -sS   [don't] install one or more of the following services:
     ALL nsnhix5600 templatemechanism sipuseragent jmsforwarding dhcp_v4
 -tT   [don't] install one or more of the following triggers:
     ALL nsnhix5600 dhcp_v4 radius
 -wW   [don't] install one or more of the following webservices:
     ALL blackedition topologymodeller
 -xX   [don't] install one or more of the following applications:
     ALL ActiveMQ Base BatchProcessMgmt CapacityMgmt Connection Crypto CSV FileMgmt GlobalApplicationMgmt GuiHttp Http IOSDevice IOSXEDevice IOSXRDevice Json JunOSDevice LDAP Mail MultiRoleAdvancedUser Net Node OAS_Base OneOSDevice OracleAQ Processing Queue RegExp ScriptExecutor SNMP SNMPStatistics SOAP SSH SSHFile SSHMock SSHServer SSHTools StorableOperations Telnet Timeseries UserRoleManagement UserSessionMgmt WebSphereMQ XynaPropertyMgmt XynaTestFactoryInfrastructure ZetaFramework;

Installation Example

Server

Operation System

Oracle Linux 7/8/9

The following packages are installed based on the Docker image "oraclelinux:7/8/9":

  # ssh user root
  yum install -y https://cdn.azul.com/zulu/bin/zulu-repo-1.0.0-1.noarch.rpm
  yum -y update
  yum -y upgrade
  yum install -y zip unzip patch wget openssl nc which net-tools passwd rsyslog bind-utils vim less telnet procps bc diffutils hostname perl
  # if (Oracle-Linux Version 7)
    yum install -y xinetd
  # fi
  yum install -y zulu11-jdk-headless
  yum clean all
  groupadd -g 4242 xyna
  useradd -m -u 4242 -g 4242 -s /bin/bash xyna

Ubuntu 22:04/24:04

The following packages are installed based on the Docker image "ubuntu:22.04":

  # ssh user root
  apt -y update
  apt -y upgrade
  apt-get -y install zip unzip patch wget netcat-traditional xinetd net-tools bind9utils vim less dc libxml2-utils gnupg ca-certificates curl
  curl -s https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg
  echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | tee /etc/apt/sources.list.d/zulu.list
  apt -y update
  apt -y install zulu11-jdk-headless
  groupadd -g 4242 xyna
  useradd -m -u 4242 -g 4242 -s /bin/bash xyna
  mkdir /var/log/xyna
  chown -R xyna:xyna /var/log/xyna

Prerequisites

The prerequisites are installed using the following commands:

  Used install options
  -s configure syslog and logrotation
  -x create /etc/init.d-script for xynafactory
  # scp XynaFactory_v*bundle.zip /tmp
  # ssh user root
  # Set XYNA_VERSION, for example Xyna Version 9.1.0.1
  export XYNA_VERSION=v9.1.0.1_20240411_1454
  export XYNA_PATH=${XYNA_PATH:-/opt/xyna/xyna_001}
  export JAVA_HOME=/usr/lib/jvm/zulu11
  export PATH="$JAVA_HOME/bin:$PATH"
  chown xyna:xyna XynaFactory_${XYNA_VERSION}_bundle.zip
  unzip XynaFactory_${XYNA_VERSION}_bundle.zip
  cd XynaFactory_${XYNA_VERSION}_bundle
  unzip XBE_Prerequisites*.zip
  chown -R xyna:xyna XBE_Prerequisites*
  cd XBE_Prerequisites_*
  ./install_prerequisites.sh -xs

Xyna-Factory

The Xyna-Factory is installed using the following commands:

Preparation

  # ssh user root
  # Set XYNA_VERSION, for example Xyna Version 9.1.0.1
  XYNA_VERSION=v9.1.0.1_20240411_1454
  cd XynaFactory_${XYNA_VERSION}_bundle
  unzip XynaFactory_${XYNA_VERSION}.zip
  chown -R xyna:xyna XynaFactory_${XYNA_VERSION}
  chown -R xyna:xyna /etc/opt/xyna/environment
  chown -R xyna:xyna /opt

Xynafactory

  # ssh user xyna
  # Set XYNA_VERSION, for example Xyna Version 9.1.0.1
  XYNA_VERSION=v9.1.0.1_20240411_1454
  cd XynaFactory_${XYNA_VERSION}_bundle/XynaFactory_${XYNA_VERSION}
  ./install_black_edition.sh -v -b -c xynafactory -x GlobalApplicationMgmt,GuiHttp

Client

Apache (OS Oracle Linux / Redhat)

Package httpd

The httpd is installed using the following commands:

  # ssh user root
  yum install -y httpd,mod_ssl

Certificate

Install Certificate files

Update /etc/httpd/conf.d/ssl.conf

  SSLCertificateFile <SSL_CERTIFICATE_FILE>
  SSLCertificateKeyFile <SSL_CERTIFICATE_KEY_FILE>
  SSLCACertificateFile <SSL_CA_CERTIFICATE_FILE>

Rewrite-Rules

Create the file /etc/httpd/conf.d/rewrite.conf with the following content:

  echo '<Directory "/var/www/html">
    Options -Indexes +FollowSymLinks
    AllowOverride None
    Require all granted
    RewriteEngine on
    RewriteRule   "^modeller-api/(.*)$" "http://localhost:4245/$1"  [P]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule modeller/. modeller/index.html [L]
  </directory>' > /etc/httpd/conf.d/rewrite.conf

httpd-Service

Restart httpd

  # ssh user root
  systemctl restart httpd
  systemctl status httpd

httpd_can_network_connect

On OS Oracle Linux / Redhat, the following command is necessary

  # user root
  /usr/sbin/setsebool -P httpd_can_network_connect 1

Apache (OS Ubuntu)

Package apache2

The apache2 is installed using the following commands:

  # ssh user root
  apt install apache2
  a2enmod ssl
  a2enmod actions
  a2enmod proxy
  a2enmod proxy_http
  a2enmod proxy_html
  a2enmod rewrite
  a2enmod deflate
  a2ensite default-ssl

Certificate

Install Certificate files

Update /etc/apache2/sites-available/default-ssl.conf

  SSLCertificateFile <SSL_CERTIFICATE_FILE>
  SSLCertificateKeyFile <SSL_CERTIFICATE_KEY_FILE>
  SSLCACertificateFile <SSL_CA_CERTIFICATE_FILE>

Rewrite-Rules

Update /etc/apache2/sites-available/default-ssl.conf with the following content:

  SSLEngine on
  <Directory "/var/www/html">
    Options -Indexes +FollowSymLinks
    AllowOverride None
    Require all granted
    RewriteEngine on
    RewriteRule   "^modeller-api/(.*)$" "http://localhost:4245/$1"  [P]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule modeller/. modeller/index.html [L]
  </directory>

apache2-Service

Restart apache2

  # ssh user root
  systemctl restart apache2
  systemctl status apache2

Xyna-Modeller

The Modeller is installed using the following commands:

  # ssh user root
  # Set XYNA_VERSION, for example Xyna Version 9.1.0.1
  XYNA_VERSION=v9.1.0.1_20240411_1454
  cd XynaFactory_${XYNA_VERSION}_bundle
  unzip modeller.war -d /var/www/html/modeller
  systemctl restart httpd
  systemctl status httpd

Xyna-User

Create a user (for example userName=xyna and password=xyna), using the following commands:

  # ssh user xyna
  /opt/xyna/xyna_001/server/xynafactory.sh createuser -userName xyna -roleName ADMIN --domainName XYNA -password xyna

Xyna-Properties

Adjust the following properties

  # ssh user xyna
  # Send Session Cookie as __Secure- and add Strict-Transport-Security header
  /opt/xyna/xyna_001/server/xynafactory.sh set -key xmcp.guihttp.sts -value false
  # Add csrf token to login response and validate xyna-csrf-token header.
  /opt/xyna/xyna_001/server/xynafactory.sh set -key xmcp.guihttp.csrf -value false

Log in via the web browser

Test the login via the web browser

  URL: https://<IPADDRESS_XYNA_SERVER>/modeller
  User: xyna
  Password: xyna

Database

Example installation mariadb on Oracle Linux 7/8/9

  ssh user root
  yum -y install mariadb-server
  systemctl enable mariadb
  systemctl start mariadb
  systemctl status mariadb
  mysql_secure_installation

Initial Setup

The use of a mariadb or mysql is recommended. Please use the product specific documentation for the standard installation of the database.

Standalone

After standard installation of the database, the following sql commands have to be executed:

  create user 'xyna' identified by 'xyna';
  create database xyna;
  grant all on xyna.* to 'xyna';

Docker

To start a database on docker, the following commands have to be executed:

Maria DB
  DB_CONTAINER_NAME=mariadb_container
  DB_IMAGE=mariadb:10.11
  DB_ENV="-e MARIADB_ROOT_PASSWORD=root -e MARIADB_USER=xyna -e MARIADB_PASSWORD=xyna -e MARIADB_DATABASE=xyna"
  docker pull ${DB_IMAGE}
  docker run -d --name ${DB_CONTAINER_NAME} ${DB_ENV} ${DB_IMAGE}
MySQL
  DB_CONTAINER_NAME=mysql_container
  DB_IMAGE=mysql:8.3
  DB_ENV="-e MYSQL_ROOT_PASSWORD=root -e MYSQL_USER=xyna -e MYSQL_PASSWORD=xyna -e MYSQL_DATABASE=xyna"
  docker pull ${DB_IMAGE}
  docker run -d --name ${DB_CONTAINER_NAME} ${DB_ENV} ${DB_IMAGE}

DB-Connectors

The DB-Connectors jar-files are installed using the following commands:

  # ssh user xyna
  # Set XYNA_VERSION, for example Xyna Version 9.1.0.1
  XYNA_VERSION=v9.1.0.1_20240411_1454
  /opt/xyna/xyna_001/server/xynafactory.sh stop
  cd XynaFactory_${XYNA_VERSION}_bundle
  ./prepare_db_connector_jars.sh
  /opt/xyna/xyna_001/server/xynafactory.sh start

Connectionpool

Requirement: An existing DB-Server with the user DB_USER/DB_PASSWORD and the database xyna

The dbconnectionpool is created using the following commands:

  # ssh user xyna
  # Set IP-Address, of the DB-Server, for example 192.168.0.1
  DB_IPADDRESS=192.168.0.1
  # Size of the connection pool for example:
  SIZE=100
  # Set DB-user, for example xyna
  DB_USER=xyna
  # Set DB-password, for example xyna
  DB_PASSWORD=xyna
  # mysql:
  CONNECT_STRING="jdbc:mysql://${DB_IPADDRESS}/xyna"
  # mariadb:
  CONNECT_STRING="jdbc:mariadb://${DB_IPADDRESS}/xyna"
  /opt/xyna/xyna_001/server/xynafactory.sh addconnectionpool -connectstring ${CONNECT_STRING} -name Xyna-Infra-Pool -size ${SIZE} -type MySQL -user ${DB_USER} -password ${DB_PASSWORD}

You may add additional parameters to the connect string. If the database is on a different server, setting tcp keep-alive can help prevent issues with dropped connections:

  ?tcpKeepAlive=true&tcpKeepIdle=10&tcpKeepInterval=5&tcpKeepCount=3

Persistancelayer

The persistancelayer is created using the following commands:

  # ssh user xyna
  /opt/xyna/xyna_001/server/xynafactory.sh instantiatepersistencelayer -persistenceLayerName mysql -department xyna -connectionType DEFAULT -persistenceLayerInstanceName Xyna-Infra-Default-Inst -persistenceLayerSpecifics Xyna-Infra-Pool 4000
  /opt/xyna/xyna_001/server/xynafactory.sh instantiatepersistencelayer -persistenceLayerName mysql -department xyna -connectionType HISTORY -persistenceLayerInstanceName Xyna-Infra-History-Inst -persistenceLayerSpecifics Xyna-Infra-Pool 4000
  /opt/xyna/xyna_001/server/xynafactory.sh registertable -c -persistenceLayerInstanceName Xyna-Infra-History-Inst -tableName orderinfo
  /opt/xyna/xyna_001/server/xynafactory.sh registertable -c -persistenceLayerInstanceName Xyna-Infra-History-Inst -tableName orderarchive
  /opt/xyna/xyna_001/server/xynafactory.sh set xnwh.persistence.xmom.defaultpersistencelayerid $(/opt/xyna/xyna_001/server/xynafactory.sh listpersistencelayerinstances | grep Xyna-Infra-Default-Inst | awk '{ print $2 }')
  /opt/xyna/xyna_001/server/xynafactory.sh set xnwh.persistence.xmom.defaulthistorypersistencelayerid $(/opt/xyna/xyna_001/server/xynafactory.sh listpersistencelayerinstances | grep Xyna-Infra-History-Inst | awk '{ print $2 }')

Optional

Optional components can be installed with the command:

   ./install_black_edition.sh -x <appname>

OAS_Base

Install the application OAS_Base, using the following commands:

  # ssh user xyna
  # Set XYNA_VERSION, for example Xyna Version 9.1.0.1
  XYNA_VERSION=v9.1.0.1_20240411_1454
  cd XynaFactory_${XYNA_VERSION}_bundle/XynaFactory_${XYNA_VERSION}
  ./install_black_edition.sh -x OAS_Base

XTF

Set the following xyna-properies:

  # ssh user xyna
  /opt/xyna/xyna_001/server/xynafactory.sh set -key xprc.xfractwfe.different.typeresistant -value 'false'
  /opt/xyna/xyna_001/server/xynafactory.sh set -key xyna.global.set.ordercontext -value true
  /opt/xyna/xyna_001/server/xynafactory.sh set -key xdev.xtestfactory.infrastructure.gui.testcases -value 100

Install the application XynaTestFactoryInfrastructure

  # ssh user xyna  
  # Set XYNA_VERSION, for example Xyna Version 9.1.0.1
  XYNA_VERSION=v9.1.0.1_20240411_1454
  cd XynaFactory_${XYNA_VERSION}_bundle/XynaFactory_${XYNA_VERSION}
  ./install_black_edition.sh -x XynaTestFactoryInfrastructure

Register Order-Input-Source-Type XTFInputSource

  # ssh user xyna
  /opt/xyna/xyna_001/server/xynafactory.sh registerorderinputsourcetype -name XTFInputSource -fqClassName com.gip.xyna.xfmg.xods.orderinputsource.xtf.XTFInputSourceType

XyPilot

The XyPilot alows you to leverage a large language model to generate various objects in xyna, like

  • Datatype, member and service documentation
  • Exception messages
  • Service implementations
The following guide shows you how to create a xyna factory deployment in docker and set up XyPilot.

Setup the copilot-api

You need git and docker installed on your system. As well as a github copilot license associated with your github account. Clone the xyna-factory repository

  git clone https://github.com/Xyna-Factory/xyna-factory.git

Navigate to the copilot-api directory

  cd xyna-factory/modules/xmcp/xypilot/copilot-api

Build the copilot-api image

  docker build -t xypilot-api-server:1.0.0 .

Run the docker-compose file in the parent directory

  cd ..
  docker-compose up

The docker-compose file references the xypilot-api-server image from the previous step. If you chose a difference tag, update the compose file accordingly. Other images referenced by the docker compose file are available on dockerhub and will be pulled automatically.

In a new console, configure github copilot in the copilot-api container. Start by connecting to the container

  docker exec -it xypilot-apiserver-1 bash

In the container, run neovim.

  nvim

It should install required plugins. Press q to exit the dialog. Authorize github copilot:

  :Copilot auth

Follow the setup as promped. Exit nvim and the container.

Applications

Enter the xyna-container

  docker exec -it xypilot-xyna-1 bash  

Install the applications XyPilot,XyPilotMetrics and XyPilotMetricsDefaults using the following commands:

  cd /tmp/XynaBlackEdition
  ./install_black_edition.sh -x XyPilot,XyPilotMetrics,XyPilotMetricsDefaults

server.policy

Update /opt/xyna/xyna_001/server/server.policy

  vi /opt/xyna/xyna_001/server/server.policy
  # add the following lines to the file
  permission java.net.URLPermission "http:*", "POST:Content-Type";
  permission java.lang.RuntimePermission "setFactory";
  permission javax.net.ssl.SSLPermission "setHostnameVerifier";
  # exit vi and the container

Restart Xyna-Factory by restarting the container

  docker container restart xypilot-xyna-1

Configuration

Login to Xyna on localhost:8000/modeller. Use XYNA/XYNAPW as credentials. These come from the compose-file. Feel free to create a different user before continuing with the setup. Every user has to set up their own XyPilot Config under Factory Manager -> XyPilot Config as shown below.

XyPilot Config

Enter a number like 2 for "Max Suggestions", set "URI" to https://apiserver:5000 and use copilot for "Model". Don't forget to press the save button after filling in the fields.

The XyPilot is set up and ready!

Clone this wiki locally