https://github.com/awslabs/app-server-migration

app-server-migration helps in discovering the changes required to migrate the code from source server to target server and provides effort estimations in person days.

https://github.com/awslabs/app-server-migration

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.9%) to scientific vocabulary

Keywords

effort-estimation estimates java migrations person-days tomcat weblogic
Last synced: 5 months ago · JSON representation

Repository

app-server-migration helps in discovering the changes required to migrate the code from source server to target server and provides effort estimations in person days.

Basic Info
  • Host: GitHub
  • Owner: awslabs
  • License: other
  • Language: Java
  • Default Branch: main
  • Homepage:
  • Size: 478 KB
Statistics
  • Stars: 17
  • Watchers: 3
  • Forks: 12
  • Open Issues: 0
  • Releases: 0
Topics
effort-estimation estimates java migrations person-days tomcat weblogic
Created about 4 years ago · Last pushed 9 months ago
Metadata Files
Readme Contributing License Code of conduct

README.md

AppServerMigration

About AppServerMigration

AppServerMigration, an open-source software solution, analyses Java applications to deliver precise effort estimations in person-days, facilitating a seamless transition from source to target states. This tool adeptly identifies necessary modifications, offers insightful recommendations, and presents a comprehensive HTML report for a well-guided migration. It accelerates the migration journey, eliminating the necessity for re-work, ensuring a successful and efficient transition with minimal setbacks. AppServerMigration employs a rule-based analysis, meticulously examining Java applications according to predefined rules. This method ensures a thorough assessment, enabling precise identification of necessary changes and providing accurate effort estimations. Effort estimations in AppServerMigration leverage QSM's (Quantitative Software Management) industry-standard metrics and incorporate the backtracking technique. Customizations are then applied, drawing from firsthand migration experiences. This tailored approach ensures precise calculations, aligning with project nuances and enhancing the accuracy of migration effort predictions.

Cloning the project

bash git clone git@github.com:awslabs/app-server-migration.git cd app-server-migration

Build the project

Prior to building the project, ensure that you have the following tools installed in your machine: - Java 8 - Docker - Maven - Git

For Linux (Ubuntu, CentOS and RHEL) and Mac OS, you may execute the ./setup.sh script to install the above dependencies. For Windows, kindly follow their official documentation guide for installation. - Java 8 - https://www.java.com/en/download/help/windowsmanualdownload.html - https://www.oracle.com/java/technologies/downloads/#java8-windows - Docker - https://docs.docker.com/desktop/windows/install/ - https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers - Maven - https://maven.apache.org/download.cgi - https://maven.apache.org/guides/getting-started/windows-prerequisites.html - https://maven.apache.org/install.html - Git - https://git-scm.com/download/win

Build the project using mvn package command.

Run the project

For Linux and MacOS machines

```bash

Run Database

During installation script may ask for password, enter your system password.

After installation AurangoDB Web interface is accessible on http://localhost:8529 (using default user name: root and password: openSesame)

bash arangoDB.sh

Run Analyzer

Option 1:

This option is helpful when you want to check out projects from SCM and run the scan

In this mode we provide repository details of projects(which needs to be scanned)

in the configuration file and provide path of configuration file as shown below

./run.sh config:

or Option 2:

This option is helpful when you already have source code downloaded on your machine

In this mode we provide local path of the project

./run.sh source: e.g. ./run.sh source:/usr/example/project/ ~/test-directory root openSesame oracle-to-postgres,weblogic-to-tomcat

```

For Windows machines

```powershell

Run Database (default root password will be openSesame)

powershell ./arangoDB.ps1 config:

Run Analyzer

Option 1:

This option is helpful when you want to check out projects from SCM and run the scan

In this mode we provide repository details of projects(which needs to be scanned)

in the configuration file and provide path of configuration file as shown below

powershell ./run.ps1 config:

or Option 2:

This option is helpful when you already have source code downloaded on your machine

In this mode we provide local path of the project

powershell ./run.ps1 source: e.g. powershell ./run.ps1 source:/usr/example/project/ /usr/example/project/reports root openSesame oracle-to-postgres,weblogic-to-tomcat ```

Create custom rules

You may create your own rules which can be fed to the rule engine in order to assess to your source files based on your rules. There are 2 files which you need to create rules.json and recommendations.json. For reference, you can check oracle-to-postgres-javarules.json and oracle-to-postgres-recommendations.json respectively.

The rules.json file would look like:

json { "analyzer": "com.amazon.aws.am2.appmig.estimate.java.JavaFileAnalyzer", "file_type": "java", "rules": [ { "id": 1, "name": "Name", "description": "Detailed Description", "complexity": "minor", "rule_type": "package", "remove": { "import": ["java.sql.DriverManager","oracle.jdbc.driver.OracleDriver"] }, "recommendation": 12 }, ] }

Understanding each key of above JSON file: - analyzer: Canonical name of the analyzer class. In the above example, we are using JavaFileAnalyzer.java. You may create your own Analyzer by implementing IAnalyzer interface. - file_type: Type of source files which will be assessed - rules: Array of objects, each corresonding to a rule - id: Rule identifier - name: Name of the rule - description: A verbose rule description - complexity: AppServerMigration identifies the complexity of migration per application either as minor, major or critical, depending on the features that need to be converted to make the application target compatible. If the changes are only in the configurations and not in the code, then it is minor. Major category involves code changes. There might be features specific to the source server which are not supported on the target server. In such scenarios, the whole functionality needs to be re-written. Such categories fall under critical complexity. For instance, trying to migrate a web application from Oracle WebLogic to Apache Tomcat, which has EJB code. - rule_type: Denotes where to search to find a rule match. In the above example rule, it will look for import statements to search for imported packages. The processing logic is coded in the Analyzer. - remove: Action denoting elimination of attributes present inside it. In the above example, the rule will match against any import statement having package name either java.sql.DriverManager or oracle.jdbc.driver.OracleDriver. - recommendation: Maps to the identifier of recommendation present in the associated recommendations.json file.

The recommendations.json file would look like:

``` json "recommendations": [ { "id": 1, "name": "Replace Oracle database driver with Postgres database driver", "description": "Review the driver being loaded in this block of code and change the driver from oracle.jdbc.driver.OracleDriver to org.postgresql.Driver" }, ]

```

Understanding each key of above JSON file: - recommendations: Array of objects, each representing a recommendation. - id: Recommendation identifier - name: Name of the recommendation, which will be displayed on the report - description: A verbose recommendation description, which will be displayed on the report

To run ArangoDB in local (alternative to running arango.sh)


Running in-memory graph database ArangoDB

docker run -p 8529:8529 -e ARANGO_ROOT_PASSWORD=openSesame arangodb/arangodb:3.8.3

Connecting to ArangoDB UI

http://localhost:8529/

You can find the name of the container by running

docker ps

To retrieve the HOST run the following command with container ID obtained from docker ps

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <<CONTAINER ID>>

To stop a ArangoDB database instance, run the following command

docker stop CONTAINER_NAME

Security

See CONTRIBUTING for more information.

License

This project is licensed under the Apache-2.0 License.

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
  • Watch event: 1
  • Delete event: 1
  • Member event: 3
  • Push event: 9
  • Pull request review event: 1
  • Pull request event: 2
  • Fork event: 2
  • Create event: 3
Last Year
  • Watch event: 1
  • Delete event: 1
  • Member event: 3
  • Push event: 9
  • Pull request review event: 1
  • Pull request event: 2
  • Fork event: 2
  • Create event: 3

Issues and Pull Requests

Last synced: almost 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 44
  • Average time to close issues: N/A
  • Average time to close pull requests: 1 day
  • Total issue authors: 0
  • Total pull request authors: 11
  • Average comments per issue: 0
  • Average comments per pull request: 0.05
  • Merged pull requests: 42
  • Bot issues: 0
  • Bot pull requests: 3
Past Year
  • Issues: 0
  • Pull requests: 7
  • Average time to close issues: N/A
  • Average time to close pull requests: about 5 hours
  • Issue authors: 0
  • Pull request authors: 4
  • Average comments per issue: 0
  • Average comments per pull request: 0.29
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
Pull Request Authors
  • agoteti (13)
  • saikatak (10)
  • ferozbaig-amzn (5)
  • rajkag (4)
  • satyacloudcode (4)
  • dependabot[bot] (4)
  • mansiyd (3)
  • MDeekshit (2)
  • ganvamsi (1)
  • RiserKnight (1)
  • sandeep7658 (1)
  • praghu1 (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (4)

Dependencies

pom.xml maven
  • com.arangodb:arangodb-java-driver 6.14.0
  • com.googlecode.json-simple:json-simple 1.1.1
  • com.opencsv:opencsv 5.3
  • org.antlr:antlr4 4.9.2
  • org.antlr:antlr4-runtime 4.9.2
  • org.apache.commons:commons-io 1.3.2
  • org.apache.commons:commons-lang3 3.9
  • org.apache.logging.log4j:log4j-api 2.17.1
  • org.apache.logging.log4j:log4j-core 2.17.1
  • org.apache.maven.plugins:maven-dependency-plugin 3.1.1
  • org.json:json 20210307
  • org.neo4j.driver:neo4j-java-driver 4.1.1
  • org.slf4j:slf4j-api 1.7.29
  • org.slf4j:slf4j-log4j12 1.7.29
  • org.thymeleaf:thymeleaf 3.0.11.RELEASE
  • org.tmatesoft.svnkit:svnkit 1.10.5
.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite