Skip to content
forked from ambitus/pyzkiln

A place for wise guys to put their stuff

License

Notifications You must be signed in to change notification settings

luisamarti/pyzkiln

 
 

Repository files navigation

pyzkiln_core

A place to create bricks that will build new structures on z/OS.

People want to manage resources on z/OS like they manage resources on any other Cloud platform. To do this effectively, we need to create capabilities that hide things like JCL and assembler macros from management tools. This effort is dedicated to creating be basic bricks that can be used to build those new capabilities on the platform.

Imagine managing resources without every writing JCL? Imagine automating management tasks using the same scripting tools that are common on other platforms. Imagine using automation tools like Ansible to manage z/OS resources. This repository will contain the collective Python components from multiple businesses. Together we can build a new management infrastructure for z/OS.

Consider contributing to this repository. Anyone interested in creating Python building blocks for managing z/OS resources is welcome to contribute.

Pre-requisites

The tools in this repository will rely on:

pyzkiln_core Content

Pyzkiln-core package is made up of the following:

  • zcmds - Modules that return the output from a set of z/os operator commands in an array of Python dictionaries
  • zutils - Modules with the purpose to serve as Z automation building blocks
  • pyracf - Python interface to a set of RACF functionality (work in progress)

More detailed documentation under /docs

Installation:

  1. Build Manually using setup.py

Download package ZIP file or clone. In z/OS system, navigate to root directory of pyzkiln_core package and issue the following command:

python3 setup.py sdist bdist_wheel

Note: if transferring zip file via sftp, make sure files are tagged properly

Navigate into /dist directory and issue the following command

pip install pyzkiln_core-0.1-py3-none-any.whl
  1. Use provided Wheel

Download the wheel located root directory. In z/OS system, navigate to the path where wheel is located and issue the following command:

pip install pyzkiln_core-0.1-py3-none-any.whl

Pyracf configuration

pyracf will need the following environment variables configured:

PY_RACF_HOME=<location of pyracf root>
PYRACF_HOME=<location of pyracf root>
PYTHONPATH=$PYTHONPATH:$PY_RACF_HOME:PY_RACF_HOME/common/python:$PY_RACF_HOME/R_admin/python
LIBPATH=$LIBPATH:$PYRACF_HOME

example .profile

PY_RACF_HOME=/u/luisam/working_env/lib/python3.10/site-packages/pyzkiln_core/pyracf
export PY_RACF_HOME
export PYRACF_HOME=${PY_RACF_HOME}
export PYTHONPATH=${PY_RACF_HOME}:${PY_RACF_HOME}/common/python:${PY_RACF_HOME}/R_admin/python:$PYTHONPATH
export LIBPATH=${PY_RACF_HOME}:$LIBPATH

Note: to find location of pyracf root use the pip show command

  pip show pyzkiln_core 

More pyracf documentation can be found /pyracf

Usage: example

from pyzkiln_core import display_active_jobs

active_jobs = display_active_jobs()
print(active_jobs[3]['JobName'])

About

A place for wise guys to put their stuff

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 59.3%
  • Python 35.3%
  • Assembly 3.8%
  • Makefile 1.6%