Skip to content

Commit

Permalink
Update docs (#171)
Browse files Browse the repository at this point in the history
* updating documentation

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* updated links in readme

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* adding documentation for verified publisher

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* adding html page for api's

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* Adding readme for standardizer

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* updating documentation

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* minor updates to documentation

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* Update README.md

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* Adding link to tutorial

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* Update service.md

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* adding CoC and updating chean.sh to remove the generated jsons

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* Adding back to main page link

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

* Modified back link to main page

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>

Signed-off-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>
Co-authored-by: Divya Sankar <divyasankar@Divyas-MacBook-Pro-2.local>
Co-authored-by: Divya Sankar <divyasankar@divyas-mbp-2.myfiosgateway.com>
Co-authored-by: Michele Merler <michele.merler@gmail.com>
Co-authored-by: Divya Sankar <divyasankar@dhcp-9-245-237-8.rcx-us.ibmmobiledemo.com>
  • Loading branch information
5 people authored Oct 31, 2022
1 parent 9256a5c commit bfe2057
Show file tree
Hide file tree
Showing 12 changed files with 2,635 additions and 125 deletions.
99 changes: 19 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
# Tackle Container Advisor (TCA)
## Table of Contents

### Usage
1. [TCA Pipeline](#TCA-Pipeline)
2. [Setup and Running TCA](https://github.com/divsan93/tackle-container-advisor/blob/update_docs/docs/running.md)
3. [API's](https://github.com/divsan93/tackle-container-advisor/blob/update_docs/docs/service.md)
4. [References](https://github.com/divsan93/tackle-container-advisor/blob/update_docs/docs/references.md)



### Development
1. [Knowledge Base](https://github.com/divsan93/tackle-container-advisor/blob/update_docs/docs/db.md)
2. [KG Utils](https://github.com/divsan93/tackle-container-advisor/blob/update_docs/docs/utils.md)
3. [Entity standardizer](https://github.com/divsan93/tackle-container-advisor/blob/update_docs/docs/standardizer.md)


## Purpose

Expand All @@ -11,7 +26,8 @@ TCA takes client applications as a natural language description and recommends w

TCA takes the following steps to recommend the containerization.

1. **Assessment**: It assesses the application to standardize the inputs to relevant named entities present in our knowledge base. For details on the knowledge base please check the *db* folder. For example, the inputs in *App1* get mapped as the following named entities.
1. **Standardization**: It assesses the application to standardize the inputs to relevant named entities present in our knowledge base. For details on the knowledge base please check the [Knowledge Base](https://github.com/divsan93/tackle-container-advisor/blob/update_docs/docs/db.md).
For example, the inputs in *App1* get mapped as the following named entities.

```
1. App1: rhel: Linux|RedHat Linux, db2: DB2, java: Java, tomcat: Apache Tomcat
Expand All @@ -35,83 +51,6 @@ For OpenShift, TCA generates the following images.

The pipeline ingests raw inputs from clients data and standardizes the data to generate named entities and versions. For standardizing or normalizing raw inputs we use a tf-idf similarity based approach. To find container images we represent images in terms of named entities as well. The normalized representation helps to match legacy applications with container images to suggest the best possible recommendations.

## Setting up your environment

Requires Python >= 3.6 environment. You cannot run this code without having a proper
Python environment first. We recommend that you follow the instructions
in the [Developer's Guide](docs/development.md) before proceeding further.

## Running TCA as a service

There are 4 options for deploying TCA as a service.

1. Install the service requirements and start the service from command line.

Requires *gunicorn* standalone installation on your system.
```
bash setup.sh
gunicorn --workers=2 --threads=500 --timeout 300 service:app
OR
waitress-serve --listen=*:8000 service:app
```

2. Running the service as a container.

Using a bash script.
```
bash run.sh
```
Using command line.
```
docker-compose -f 'docker-compose-api.yml' up -d --build
```

3. Running the service in a virtual machine using vagrant.
```
vagrant up
vagrant ssh
cd /vagrant
bash run.sh
```

4. Deploy the container on Redhat Openshift Container Platform.

```
bash deploy.sh
```

## Run a performance test for TCA service
A performance test measures the response time of TCA service under
various load conditions. Before running
performance test, update *config/test.ini* with the hostname
and port where TCA service has been deployed

```
python test/performance/run_payload.py <#users> <#applications/user>
```

## Running TCA with a new version of Knowledge Base

Please perform the following steps.

1. Replace the existing .sql file with the new <new_db>.sql file in the db folder

2. Change the *common.ini* file in the config folder as follows

version = <new_db>

3. Modify the *setup.sh* and *clean.sh* scripts to reflect the version accordingly.

version=<new_db>

4. Re-run *setup.sh* and then deploy the service.


## References

* Anup K. Kalia. Tackle Containerization Advisory for Legacy Applications. (link to the video: https://www.youtube.com/watch?v=VapEooROERw, link to the slides: https://www.slideshare.net/KonveyorIO/tackle-containerization-advisor-tca-for-legacy-applications)

* Anup K. Kalia, Raghav Batta, Jin Xiao, Mihir Choudhury and Maja Vukovic. *ACA: Application Containerization Advisory Framework for Modernizing Legacy Applications*. IEEE International Conference on Cloud Computing (Cloud) [Work-in-progress], sept, pages 1--3, 2021.

## Code of Conduct
Refer to Konveyor's Code of Conduct [here](https://github.com/konveyor/community/blob/main/CODE_OF_CONDUCT.md).

Refer to Konveyor's [Code of Conduct page](https://github.com/konveyor/community/blob/main/CODE_OF_CONDUCT.md)
16 changes: 13 additions & 3 deletions clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,27 @@

version="1.0.4"
db_file="$version.db"
shopt -u extglob

echo "-----------Cleaning Files and Folders---------"

##remove files from entity standardization models
if [ -d models/ ]; then
rm -rf models/
fi

if [ -d kg/ ]; then
#save infer_negative.json
cp kg/infer_negative.json /app/

fi
#remove files from ontologies
if [ -d kg/ ]; then
echo "Skipping kg removal for infer_negative.json"
# rm -rf kg/

cd kg/
GLOBIGNORE=infer_negative.json
rm -v *
cd ..
fi

## remove db file from DB
Expand All @@ -39,7 +49,7 @@ if [[ -d entity_standardizer/entity_standardizer_tca.egg-info/ ]]; then
fi


## remove logs
## remove any logs
rm *.log

echo "-----------Cleaning Completed---------"
Loading

0 comments on commit bfe2057

Please sign in to comment.