Installing Wazi Deploy in an air-gapped environment
Wazi Deploy is provided as a Python package, which allows for usage on a multitude of operating systems. The package must be installed in Python to become functional. You install the Wazi Deploy core package on a z/OS® environment (in a z/OS UNIX System Services file system) or on a distributed environment (x86 or Linux® on Z).
Follow these explanations if your system does not have access to the internet or to a pypi.org mirror repository in your organization. Refer to Installing Wazi Deploy in an online environment if the system does have this access.
Stage the requisites
Installing Wazi Deploy requires that Python has access to some requisite libraries. If the target system does not have access to the internet or a pypi.org mirror repository, then you must, before the Wazi Deploy installation, build a package that contains these requisites on a system that has Python installed and that has access to the internet or a pypi.org mirror repository in your organization. This package must then be staged on the target system so that it can be used during the Wazi Deploy installation.
- On the system with access to the internet or a pypi.org mirror repository
in your organization, create 2 text files that list the requisites needed to install Wazi Deploy.Note: Create these text files in ISO8859-1 (ASCII) encoding when you work on z/OS. You can use the iconv command to convert from EBCDIC to ASCII, for example:
iconv -f IBM-1047 -t ISO8859-1 requirements_bin.ebcdic > requirements_bin.txt
- Create a requirements_bin.txt file with the following content:
requests setuptools>=65.6.3 idna==3.3 wheel Cython<3.0 whoosh certifi>=2022.12.07 jsonschema>=4.0, <4.18.0 attrs importlib_resources pyrsistent urllib3 zipp charset-normalizer<3.0.0 pkgutil_resolve_name
- Create a requirements_src.txt file with the following content:
pyyaml>=5.3.1 MarkupSafe>=2.0 jinja2>=3.1.2
- Create a requirements_bin.txt file with the following content:
- On the same system, build the requisites package with the commands that are adapted to the
installation target.Note: The following sample commands assume that the Python executable files can be found from the command line that you are using.
- To create a package to be used on z/OS, issue the
following commands.
- Create a temporary directory to stage the requisites.
rm -rf zos_wheelhouse mkdir -p zos_wheelhouse
- Download the requisites.
In the following commands, replace
X
with your version of IBM® Open Enterprise SDK for Python, without the dot (for example 39 or 310). See the list of the supported versions.pip3 download --no-deps --python-version X -r requirements_src.txt -d zos_wheelhouse --platform os390 --no-cache-dir
pip3 download --no-deps --python-version X -r requirements_bin.txt -d zos_wheelhouse --platform os390 --no-cache-dir --only-binary=:all:
- Create an archive that contains the
requisites.
cat requirements_src.txt requirements_bin.txt > zos_wheelhouse/requirements.txt tar -cvf zos_wheelhouse.tar zos_wheelhouse/
- Create a temporary directory to stage the requisites.
- For a distributed environment (x86 or Linux on
Z), only for the usage of the Wazi Deploy
Ansible® translator, issue the following commands.
- Create a temporary directory to stage the requisites.
rm -rf linux_wheelhouse mkdir -p linux_wheelhouse
- Download the requisites.
In the following commands, replace
X
with your version of IBM Open Enterprise SDK for Python, without the dot (for example 39 or 310). See the list of the supported versions.For an x86 distributed environment, enter the following commands:pip3 download --no-deps --python-version X -r requirements_src.txt -d linux_wheelhouse --platform linux_x86_64 --no-cache-dir
pip3 download --no-deps --python-version X -r requirements_bin.txt -d linux_wheelhouse --platform linux_x86_64 --no-cache-dir --only-binary=:all:
For a Linux on Z distributed environment, enter the following commands:pip3 download --no-deps --python-version X -r requirements_src.txt -d linux_wheelhouse --platform s390x --no-cache-dir
pip3 download --no-deps --python-version X -r requirements_bin.txt -d linux_wheelhouse --platform s390x --no-cache-dir --only-binary=:all:
- Create an archive that contains the
requisites.
cat requirements_src.txt requirements_bin.txt > linux_wheelhouse/requirements.txt tar -cvf linux_wheelhouse.tar linux_wheelhouse/
- Create a temporary directory to stage the requisites.
- To create a package to be used on z/OS, issue the
following commands.
- From the system where you created the zos_wheelhouse.tar or linux_wheelhouse.tar file, transfer the .tar file to the system where you want to install Wazi Deploy. In the instructions of the next section, it is assumed the file is transferred to the /tmp directory.
Install the requisites and Wazi Deploy
- Set the environment variables if you install on z/OS.Your command shell must be able to find the Python executable files. On z/OS, the command shell must also allow scripts that are not EBCDIC encoded. To do so, you must set environment variables by using the following commands:
export PYTHONHOME=/usr/lpp/IBM/cyp/pyz export PATH=$PYTHONHOME/bin:$PATH export _BPXK_AUTOCVT=ON
- Create a Python virtual environment if you install on z/OS.
Creating a virtual environment is recommended to isolate the Python package installation. You can then manage separate package installations for different projects and test the installations.
To create a virtual environment named gdp in the /global/opt/pyenv directory, enter the following command:python3 -m venv /global/opt/pyenv/gdp
Next, you must activate the virtual environment with the following command:. /global/opt/pyenv/gdp/bin/activate
Note: If you use a bash shell, you can use the source command instead of the . command. So for example, you can enter the following command:source /global/opt/pyenv/gdp/bin/activate
- Extract the zos_wheelhouse.tar or linux_wheelhouse.tar
file.
Stage the installation requisites in a central location, such as /global/opt/pypi.airgap/zos_wheelhouse.
For z/OS, issue the following commands:mkdir -p /global/opt/pypi.airgap cd /global/opt/pypi.airgap tar -xvf /tmp/zos_wheelhouse.tar
For a distributed environment (x86 or Linux on Z), issue the following commands:mkdir -p /global/opt/pypi.airgap cd /global/opt/pypi.airgap tar -xvf /tmp/linux_wheelhouse.tar
- Install the requisites.Note: This sample command assumes that the wheelhouse directory is a subdirectory of the current directory. If you follow the sample commands, you should be in /global/opt/pypi.airgap.For z/OS, issue the following command:
pip3 install --no-deps --no-cache-dir -r zos_wheelhouse/requirements.txt --no-index --find-links zos_wheelhouse
For a distributed environment (x86 or Linux on Z), issue the following command:pip3 install --no-deps --no-cache-dir -r linux_wheelhouse/requirements.txt --no-index --find-links linux_wheelhouse
- Install Wazi Deploy.
Now that Python has access to the requisite libraries, you can install Wazi Deploy.
- Get the Wazi Deploy installable files that are present on z/OS.
These files were created on z/OS when the Wazi Deploy FMID was installed through SMP/E, as described in the Wazi Deploy Program Directory.
By default, the SMP/E installation created the /usr/lpp/IBM/gdp z/OS UNIX directory. This directory contains the installable files for usage on z/OS, and atar
subdirectory that contains the wazideploy.tar file. Thewazideploy.tar
file can be sent to a distributed environment (x86 or Linux on Z) for the installation of Wazi Deploy on that system. You can extract the installable files from the file by using the following command:tar -xvf wazideploy.tar
The installable files are wheel files. A wheel file is a ZIP-format archive with a specially formatted file name followed by the .whl extension. It contains a precompiled Python module ready to install. The current Python versions support this installation method.
The /usr/lpp/IBM/gdp directory contains a .whl file for each of the currently supported versions of IBM Open Enterprise SDK for Python. The following table lists the Wazi Deploy .whl files, the environments where they can be used, and the corresponding versions of IBM Open Enterprise SDK for Python.Note: The .whl file names and the installation command include 3.0.2. Replace 3.0.2 with 3.0.0 or 3.0.1 for earlier versions.File names Execution environments IBM Open Enterprise SDK for Python versions wazideploy_3.0.2-py3.12-none-any.whl z/OS and distributed (x86 or Linux on Z) environments 3.12 wazideploy_3.0.2-py3.11-none-any.whl z/OS and distributed (x86 or Linux on Z) environments 3.11 wazideploy_3.0.2-py3.10-none-any.whl z/OS and distributed (x86 or Linux on Z) environments 3.10 wazideploy_3.0.2-py3.9-none-any.whl z/OS and distributed (x86 or Linux on Z) environments 3.9 wazideploy_3.0.2-py3.8-none-any.whl Distributed (x86 or Linux on Z) environment 3.8 Warning: The Python wheel installation method performs version matching against the .whl file name. Any modification to the file name can break and corrupt the installation. - Install Wazi Deploy on z/OS or on a distributed environment (x86 or Linux on
Z) by running the following command.
In this command,
X
represents the Python version in the Wazi Deploy wheel file. For example, the wheel file can be wazideploy-3.0.2-py3.10-none-any.whl. See the list of the Wazi Deploy .whl files.pip3 install --no-deps --no-cache-dir wazideploy-3.0.2-py3.X-none-any.whl
Note: If you are not the administrator of the environment where you are installing Wazi Deploy, and if you are not installing Wazi Deploy in a virtual environment, the Wazi Deploy binary files are installed in your home folder ($HOME/.local/bin). In this case, before you validate the Wazi Deploy installation, you must add this folder to thePATH
environment variable with the following command:export PATH=$PATH:$HOME/.local/bin
- Get the Wazi Deploy installable files that are present on z/OS.
- Validate the Wazi Deploy installation.
To do so, verify that all the Wazi Deploy command-line interface (CLI) modules are correctly installed by triggering the help options of the various CLI modules with the following commands:
-
wazideploy-package -h
-
wazideploy-generate -h
-
wazideploy-deploy -h
Note: This command (wazideploy-deploy -h
) does not work on Linux. -
wazideploy-evidence -h
All these commands must display the command arguments.
-
Results
If you plan to deploy with Python, which directly targets the z/OS environment, the installation is now complete.
However, if you plan to deploy with Ansible, you must install the Wazi Deploy Ansible collection.