Installation doc improvements for Ubuntu 20.04/22.04
During pip install of several modules, 'cffi==1.11.5' and 'cryptography==1.4' were specifically defined, but they failed to install properly. Instead, I dropped the version specifications and the tool seems to be working as expected.
Under step 5, you need to use sudo for both commands:
sudo git submodule init && sudo git submodule update
sudo git submodule init && sudo git submodule update
We're trying to avoid this, by giving ownership to apache user, sudo is not necessary. This reduces the chances of privilege escalation through apache user since he's not in sudoers file
Yeah, perhaps what needs to be done is added instructions to "sudo su - apache" and then run those commands as the apache user?
Yes documentation needs a brush up. Perhaps this can be in the todo list? The gist I've written needs some changes as well due to the recent new activities. Someone can help track those? I got busy with my job lately, apologies.
I had recently tried installing and setting up Software Discovery Tool on Ubuntu 20.04(based on the instructions provided) and even I had faced some trouble. Some of the issues I encountered were :
- Issue with installing cffi (v 1.11.5) and cryptography(v 1.4) as stated above by @pleia2 Solution : Simply installing cffi and cryptography was enough for me to proceed with the installation steps.
- Issue following the instructions (provided here) for Ubuntu 20.04 Solution : Instead of copying the .conf files in sites-enabled directory , the instruction should be to copy them to sites-available directory as copying the sites to the former directory leads to an error showing that the site is not available.
I would love to work on this issue for improving the docs for the installation steps for Ubuntu 20.04 Thanks!
Good catch! Assigning this to you. Also, consider joining our slack channel (on openmainframeproject workspace) if you want to discuss anything.
Hey @pleia2 , @rachejazz I just made a PR(#85) on this issue.Looking forward to your suggestions
Thank you @arshPratap. This was on my list so this was the nudge I needed to look at it :smile:
The last outstanding part of this is how we handle the submodules command, but that's going to be a longer discussion around the ownership of the files in general from a best practices perspective. Still, I'll leave this open until we resolve that as well.
@pleia2 I totally understand.Handling git submodules could really be a tough job (saying this from personal experience)
In this section: https://github.com/openmainframeproject/software-discovery-tool/blob/master/docs/Installation.md#updating-data-directory
The commands should be run by the apache user with sudo, so:
sudo -u apache git pull <upstream remote> <default branch> --recurse-submodules
sudo -u apache git submodule update --recursive --remote
Also, let's include some common gotchas for installation. This is a big one we're running into a lot: when source files in distro_data/data_files/ don't matching up with what's in src/config/supported_distros.py the cached data file isn't created and the tool fails to work.