Setting up to Use Git
Prerequisites
Before you start, make sure you have installed the following components:
-
The ZMF REST services
-
The zowe zmf cli plugin
See documentation for those features if you don’t have them in place already (https://community.microfocus.com/
).
Download the executables
These consist of two executable files and a sample batch/shell file:
-
git-remote-ZMF
is the git protocol helper which enables communication between git and ZMF. -
showZmfMeta
is a utility program which can be used (usually at the request of Micro Focus support) to list the contents of the ZMF meta-database in the local git repo. -
zbld is a sample batch (windows) or shell script (Linux) file which shows how the git user can request that ZMF build a source component. It can also be used as a template for using zowe zmf cli commands in general.
There are also two archive/zip files available:
-
For windows you’ll need
gitZMF_yyyymmdd.zip
. -
For Linux you’ll need
gitZMF_yyyymmdd.tgz
.
Install and activate the facility
The main engine of this support is the executable program git-remote-ZMF. This is a git protocol helper and should onlybe invoked by git itself. However, if you type the name at a command prompt with no parameters, it displays a version identifier:
C:\>git-remote-ZMF
ChangeMan ZMF git protocol helper 1.0 (2022/01/18) [phase #2]
Windows
First, place the executables in a directory on your path and define the environment variable which tells the facility where to write log messages (for example):
ZMF_GIT_LOGFILE=D:\GitDev\ZMF\logs\git-ZMF.log
Note
This document assumes the use of zowe v2 ‘team’ profiles. In the examples that follow we have set up a high level node called ‘d001’ which denotes the lpar on which both of our ZMF subsystems, prodzmf and u825all, are running. Below this we have individual profiles for ‘prodzmf’ and ‘u825all’.
You can change the actual file name to a more friendly name.
Then define a zowe zmf profile to allow you to access your target ZMF subsystem. You may have already done this as part of setting up the zowe zmf explorer vscode plugin. If not, follow instructions in the relevant documentation (e.g. zowe --hw presents structured web browsable documentation).
The name of this profile is the name you will use in the git commands to reference ZMF as a remote repository.
Linux
First, place the executables in a directory on your path. There are several ways to set environment variables. For example, you could add the required commands to the .bashrc script which is executed when the bash shell is invoked (you may use a different shell or do something different).
You can add the following lines to the end of the script.
export ZMF_GIT_LOGFILE="$HOME/Git/logs/zmf-git-client.log"
Note
This document assumes the use of zowe v2 ‘team’ profiles. In the examples that follow we have set up a high level node called ‘d001’ which denotes the lpar on which both of our ZMF subsystems, prodzmf and u825all, are running. Below this we have individual profiles for ‘prodzmf’ and ‘u825all’.
You can change the actual file name to make it more friendly.
Then define a zowe zmf profile to allow you to access your target ZMF subsystem. You may have already done this as part of setting up the zowe zmf explorer vscode plugin. If not, follow instructions in the relevant documentation (e.g. zowe --hw will present structured web browsable documentation).
The name of this profile is the name you will use in the git commands to reference ZMF as a remote repository.