ZKS Development Environment Setup

ZKS System landscape overview

General remarks

Because access to the database is only possible from the ACC Network, the ZKS Application development takes place on the ´╗┐Controls Infrastructure (ACO INN) managed Linux cluster (machines asl740, asl741, ...).

The ZKS Applications only run inside the ZKS network. From outside, first an ssh login to the ZKS network is mandatory.

Java

A Java 1.11 installation (Open JDK 11) is already installed on the IN Linux cluster. During development keep in mind that the cluster is configured for 64bit (OS, Java, etc.).
Typing "echo $JAVA_HOME" in a console on the cluster should reveal the location of the java installation.

Eclipse

The Eclipse configuration is described here. Please follow all steps to get a fully configured Eclipse workspace.

Git access to ZKS application sources

Open "Window" -> Perspectives -> Other -> Git perspective" and clone the necessary repositories, which you can find here:
Git organization URL: https://git.acc.gsi.de/zks

Code Formatting

The correct code formatter was already configured in the Eclipse configuration step (see above). In order to format an existing Java file in Eclipse:
  • right-click on the file in Java editor -> Source -> Format
  • or type: CTRL+SHIFT+F
Please ALWAYS format files prior to Git checkin.

Build Tool: Maven

The Infrastructure group provides information how to setup maven in Eclipse. Please follow the steps "Maven and Eclipse" and "Configuring the Maven instance used in Eclipse" at this point: https://www-acc.gsi.de/wiki/IN/Maven

Setting up needed projects in Eclipse

To import all necessary projects from the Git repository, clone all zks-* repositories and import the projects, select the cloned repository, open it, right mouse click on "working Tree" -> Import Project.
(Note: the project zks-utilities is not part of the dependencies of the ZKS applications. It is only a collection of tools used during development, e.g. database import utilities, database scripts, etc.).
You can now switch back to the Java perspective.

After checkout of the projects, the resulting project dependencies should look like the following ZKS Java Package Structure: zks-packages.gif

Getting a running application

General aspects

1. Select the appropriate application,
either specify

-Dzks.tier=2 -Dzks.database=dev  (or: test, pro)

or

-Dzks.tier=3 -Dzks.server=pro

as VM properties in the corresponding run configuration.

Optional: For a local log4j configuration file, just add:

-Dlog4j.configurationFile=/home/bel/jfitzek/lnx/dev/zks_log4j2.xml

2. Everything should be running smile

Testing Remote Control

To test the Remote Control Program, you need to receive the ZKS Packages through their own Protocol, usually only available inside the ZKS web. For testing purposes, you can use an ssh tunnel
ssh jfitzek@zkl00e.acc.gsi.de -L 13334:zkl00e.acc.gsi.de:21377

and connect to localhost:13334 in the Remote Control Application (13334 ist just an example).

Getting logging output

Everything about logging configuration is described in the corresponding Logging HowTo. Please note, that the standard logstash server is not accessible from within the ZKS network. Therefore, for ZKS, only file output is supported!!!

Database

Oracle SQL Developer

How to configure and use the SQLDeveloper ist descriebed in the corresponding SQLDeveloper HowTo.

Schema

20191024 zks db schema.png

Connection Details (user, host etc.)

List of Databases:
TNS Name Description Backup
AccDbU Development Database No
AccDbT Test Database Yes
AccDbP Production Database Yes

List of ZKS users:
User Name Description
ZKS_SYSTEM Table owner
ZKS_APPS User for the applications to access the DB content
ZKS_SIST Special user with full read but restricted write access
Since the access is limited for data protection privacy reasons, passwords have to be explicitely requested with Jutta Fitzek or Susi J├╝licher and can only be given to people involved directly in the ZKS project.

-- JuttaFitzek - 22 Jul 2019
-- JuttaFitzek - 07 Jan 2015
-- JuttaFitzek - 11 Feb 2011
Topic attachments
I Attachment Action Size Date Who Comment
20191024_zks_db_schema.pngpng 20191024_zks_db_schema.png manage 235 K 28 Oct 2019 - 07:40 JuttaFitzek ZKS DB Schema
zks-packages.gifgif zks-packages.gif manage 28 K 24 Oct 2019 - 12:01 JuttaFitzek ZKS Package Structure
Topic revision: r14 - 15 Apr 2020, JuttaFitzek
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback