This guide will walk you through the process of setting up the Software Discovery Tool deployment repository from scratch on an Ubuntu system. We'll use submodules to include the main repository and the data repository within the deployment repository.
Submodules in Git allow you to include other Git repositories as subdirectories of your own repository. In our case, we use submodules to include the main Software Discovery Tool repository and the data repository within the deployment repository.
-
Install Ubuntu: Follow the installation instructions for Ubuntu on your virtual machine (VM) Link
-
Clone the Deployment Repository: Use the following command to clone the deployment repository and its submodules:
sudo git clone --recurse-submodules https://github.com/openmainframeproject/software-discovery-tool-deploy.git /opt/software-discovery-tool-deploy
This command will clone the deployment repository and automatically initialize and update all submodules. -
Create Symbolic Link: Create a symbolic link to the Software Discovery Tool directory:
This command creates a symbolic link named /opt/software-discovery-tool
pointing to the software-discovery-tool
directory within the deployment repository.
After completing the above steps, your directory structure should resemble the following:
/opt/
├── software-discovery-tool-deploy/ # Deployment repository
│ ├── software-discovery-tool/ # Main repository (submodule)
│ └── data/ # Data repository (submodule)
└── software-discovery-tool/ # Symbolic link to the Software Discovery Tool directory
The whole SDT deployment is maintained by:
- cicd.yml workflow
- config_build.py to create new sections in the distro config file
- package_build.py to update existing distro files to latest versions
The deployment uses appleboy's ssh workflow The deployment is thus triggered at every new pusb into the main branch. The script section uses the required server credentials to be able to host the tool.
script: |
cd /opt/software-discovery-tool-deploy
sudo chown -R sdtuser .
git checkout main
git pull origin main --recurse-submodules
sudo cp -u -r software-discovery-tool/ ../software-discovery-tool/
[cicd.yml](https://github.com/rachejazz/software-discovery-tool-deploy/blob/main/.github/workflows/cicd.yml)
It includes
- Pulling the latest changes
- Copies the contents to the main directory
- Uses config_build.py to check for new data files
- Uses package_build.py to update the existing files with the recent pkg versions
- Restart the server
The binary has separate methods to extract data from Linux Distributions and PDS. Check SDT-data repo to find out the distro list we support.
This file controls the supported_distro.py
file that resides inside src/config
directory.
It checks for any new data file inside distro_files
directory and adds it's mapping to the supported_distro.py
.
Any existing data file from PDS is updated from upstream.
NOTE Any contribution to the binary should be done in the main repository.
Feel free to add new issues or features that you would like SDT to support. Bugs are given high priority since this is an active project used by users of IBM zSystems and LinuxONE .
For deployment improvements, use this repository. For new feature request to SDT, use the main repository. For new data files request, use the data repository.
Appreciating all the contributions that you do for the Open Mainframe Project.