Skip to content

Commit

Permalink
removed documentation for sles (#230)
Browse files Browse the repository at this point in the history
* removed sles

Signed-off-by: Apurv Sonawane <[email protected]>

* fixing conflict

Signed-off-by: Apurv Sonawane <[email protected]>

* fixing merge conflicts

Signed-off-by: Apurv Sonawane <[email protected]>

* removed referrence to ubuntu versions

Signed-off-by: Apurv Sonawane <[email protected]>

---------

Signed-off-by: Apurv Sonawane <[email protected]>
  • Loading branch information
Apurv428 authored Aug 9, 2024
1 parent 7ac5b39 commit 9226476
Showing 1 changed file with 9 additions and 59 deletions.
68 changes: 9 additions & 59 deletions docs/docs/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,17 @@

## Steps for setting up software-discovery-tool application on server

The instructions provided below specify the steps for SLES 11 SP4/12/12 SP1/12 SP2 and Ubuntu 18.04/20.04/22.04:
The instructions provided below specify the steps for Ubuntu 20.04/22.04/24.04:

_**NOTE:**_
* make sure you are logged in as user with sudo permissions

### Step 1: Install prerequisite

* For SLES (11 SP4, 12):

sudo zypper install -y python python-setuptools gcc git libffi-devel python-devel openssl openssl-devel cronie python-xml pyxml tar wget aaa_base which w3m
sudo easy_install pip
sudo pip install 'cryptography==1.4' Flask launchpadlib simplejson logging

* For Ubuntu (18.04, 20.04, 22.04):

sudo apt-get update
sudo apt-get install -y python3 python3-pip gcc git python3-dev libssl-dev libffi-dev cron python3-lxml apache2 libapache2-mod-wsgi-py3
sudo pip3 install cffi cryptography Flask launchpadlib simplejson requests pytest

* For SLES (12 SP1, 12 SP2, 12 SP3):

sudo zypper install -y python3 python3-pip python3-setuptools gcc git libffi-devel python3-devel openssl openssl-devel cronie python3-lxml tar wget aaa_base which w3m apache2 apache2-devel apache2-worker apache2-mod_wsgi-python3
sudo pip3 install cryptography launchpadlib simplejson Flask pytest

* if "/usr/local/bin" is not part of $PATH add it to the path:

echo $PATH
Expand All @@ -49,49 +36,21 @@ Note: In case software-discovery-tool code is already checked out, do the follow

### Step 4: Install and configure software-discovery-tool

* SLES (11 SP4, 12):

#### Copy the init.d script to start/stop/restart software-discovery-tool application

sudo chmod 755 -R /opt/software-discovery-tool/src/setup
cd /opt/software-discovery-tool/src/setup
sudo ./create_initid_script.sh

#### Enable software-discovery-tool service

sudo systemctl reload software-discovery-tool

#### Start the Flask server as below

sudo service software-discovery-tool start
#### Copy the apache configuration file from `/opt/software-discovery-tool/src/config/sdt.conf` into respective apache configuration folder as below

* SLES (12 SP1, 12 SP2, 12 SP3) and Ubuntu (18.04, 20.04, 22.04):
sudo cp -f /opt/software-discovery-tool/src/config/sdt.conf /etc/apache2/sites-available/sdt.conf
sudo mv /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/z-000-default.conf

#### Copy the apache configuration file from `/opt/software-discovery-tool/src/config/sdt.conf` into respective apache configuration folder as below
* SLES (12 SP1, 12 SP2, 12 SP3):

sudo cp -f /opt/software-discovery-tool/src/config/sdt.conf /etc/apache2/conf.d/sdt.conf

* For Ubuntu (18.04, 20.04, 22.04):

sudo cp -f /opt/software-discovery-tool/src/config/sdt.conf /etc/apache2/sites-available/sdt.conf
sudo mv /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/z-000-default.conf

#### Create new user and group for apache
#### Create new user and group for apache

sudo useradd apache
sudo groupadd apache

#### Enable authorization module in apache configuration(Only for SLES 12 SP1, 12 SP2, 12 SP3)

sudo a2enmod mod_access_compat

#### Set appropriate folder and file permission on /opt/software-discovery-tool/ folder for apache
#### Set appropriate folder and file permission on /opt/software-discovery-tool/ folder for apache

sudo chown -R apache:apache /opt/software-discovery-tool/


#### Start/Restart Apache service
#### Start/Restart Apache service

sudo apachectl restart

Expand Down Expand Up @@ -151,7 +110,6 @@ Step 2 of
[Adding_new_distros](https://github.com/openmainframeproject/software-discovery-tool/blob/master/docs/Adding_new_distros.md#step-2-update-the-supported_distros-variable-in-configuration-file-sdt_basesrcconfigconfigpy)

### Step 6: Install and populate the SQL database
* For Ubuntu (18.04, 20.04, 22.04):

#### Install dependencies and complete the secure installation. Remember the root password you set, you will need this in the future.

Expand All @@ -175,7 +133,6 @@ The "CHANGE_ME" password above should have been changed, and this should be adju
./database_build.py

### Step 7: Verify that the software-discovery-tool server is up and running
* For Ubuntu (18.04, 20.04, 22.04):
We now run the following commands to properly enable the config files of the software-discovery-tool server and then restart the apache server.

sudo a2ensite z-000-default.conf
Expand All @@ -197,8 +154,7 @@ If you run `pytest` as your logged user, it may give errors/warnings since you h

_**NOTE:**_

* For SLES (11 SP4, 12) by default the port_number will be 5000
* For SLES (12 SP1, 12 SP2, 12 SP3) and Ubuntu (18.04, 20.04, 22.04) by default the port_number will be 80
* By default the port_number will be 80

### Step 8: (Optional) Custom configuration
Following configuration settings can be managed in `/opt/software-discovery-tool/src/config/config.py`:
Expand Down Expand Up @@ -236,16 +192,10 @@ _**NOTE:**_

In case any of the parameters are updated, the server has to be restarted:

* SLES (12 SP1, 12 SP2, 12 SP3) and Ubuntu (18.04, 20.04, 22.04):

#### Start/Restart Apache service
#### Start/Restart Apache service

sudo apachectl restart

* SLES (11 SP4, 12):

#### Start the Flask server as below

### Step 9: Start React (frontend) server

#### Ensure Node.js and npm are installed
Expand Down

0 comments on commit 9226476

Please sign in to comment.