Export / Import Configuration Via GIT Repository

Prerequisites

To establish a new Git repository, an initial branch (such as "main" or "master") is required.

  • Setting up SSH connection to GIT

The integration of FIXICC H2 and a GIT repository is facilitated through SSH. First, the appropriate SSH key must be generated and installed into the environment where FIXICC H2 is installed. This could be a docker container, cloud, or a dedicated server.
In addition, the SSH key should be authorized in the GIT lab repository.
Detailed instructions for this process can be found here: 
Authorizing an SSH key for use with SAML single sign-on - GitHub Enterprise Cloud Docs

  • Adding the Connection to Property File

The connection to the GIT repository is established in the ““/etc/fixicc-h2/local.app.property” file using the following parameter:  fixicch2.git.url=GIT@<path_to_GIT_server>/<path_to_GIT_repository>
Once an authorized connection between FIXICC H2 and the GIT repository is established, the export and import functionality becomes accessible through the FIXICC H2 UI.

Connection to GIT for RPM Installation

 

NOTE!
All commands should be executed with sudo privileges.

  1. Create the .ssh directory

sudo mkdir -p /home/fixicc-h2/.ssh
  1. Set the temporary permissions for the .ssh directory

sudo chmod 777 /home/fixicc-h2/.ssh
  1. Scan the SSH keys from the remote server and append them to known_hosts

sudo ssh-keyscan -H git.epam.com >> /home/fixicc-h2/.ssh/known_hosts
  1. Generate the SSH key pair

  1. Change the ownership of the .ssh directory and its contents

  1. Set the permissions (the owner has read and write permissions, and no one else has any permissions) for the known_hosts file and for the .ssh directory (the owner has read, write, and execute permissions, and no one else has any permissions):

  1. Add the SSH key to GitLab. The SSH key (public) can be obtained with the following command

  1. Stop the fixicc-h2 service

  1. Start the fixicc-h2 service

Setting up configurations

Servers can be configured one time in GIT settings for more convenient usage.

image-20240502-084016.png

This includes adding the following details:

  • Branch Name: This field is used to specify the branch name where the selected server configuration will be stored. If the branch name is new, a corresponding branch name is created in the GIT repository. If the branch name already exists, the configuration is saved as a new commit in the specified branch. *This is a mandatory field.

  • Path: This field is used to specify the relative path for saving the current server configuration into the selected branch. *This is an optional field.

    image-20240502-084204.png

Export to GIT

The export functionality can be accessed under the Configuration -> Export Server Configuration to GIT section of FIXICC H2 UI.

Upon selecting 'Export Server Configuration to GIT', a window appears showing the initially set up "Branch Name" and "Path".

Should there be a need to override the "Branch Name" and "Path", the "Override Target Location" option can be selected.

After the export process is successfully completed, a notification appears on the screen indicating the completion of the export.

This process exports Fix sessions, schedules, Server BL configurations (both file and component ones), as well as 'Kafka' and 'JMS' Transport Adaptors for Java FE.


Import from GIT

The import functionality can be accessed in the Configurations -> Import Server Configuration from GIT menu for the selected server.

Upon triggering this submenu item, a dialog for selecting the GIT branch is displayed:

  • The most recent information is shown when the "Refresh Commit" button is selected.

  • The "Override Source Location" functionality allows viewing of all other branches and facilitates the import from a selected branch.

    The following steps are then executed:

  • The branch and commit from which the respective configuration should be imported are selected.

  • If multiple configurations are present in the selected GIT branch, a dedicated dialog appears. Otherwise, the import configuration process begins.

    In the following dialog, only the configurations compatible with the selected server can be selected. Initiating the import process will replace the configuration with the one from the selected GIT branch.

Upon successful completion of the import, a notification appears on the screen confirming the successful operation.