Skip to content

Commit

Permalink
Add hacks/ to keep sample data and scripts to help developers
Browse files Browse the repository at this point in the history
Modeled after tackle2-hub's `hacks/` folder, add a `hacks/` folder
where sample import files (and in future helpful scripts) can be
centrally held.  The goal is to have a common place to hold things
that are useful for developers.

Signed-off-by: Scott J Dickerson <[email protected]>
  • Loading branch information
sjd78 committed Sep 21, 2023
1 parent 44a40e8 commit 9d0d7f0
Show file tree
Hide file tree
Showing 5 changed files with 279 additions and 64 deletions.
17 changes: 17 additions & 0 deletions hack/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Scripts and samples of import data

This folder is a place to keep sample data and scripts to help developers with
creating/importing various pieces of data.

## Adding a base set of data to an empty instance

For creating a base set of data in a tackle-hub instance, a good place to start
is [tackle-hub's hack folder](https://github.com/konveyor/tackle2-hub/tree/main/hack).
If you have hub running or port forwarded on port :9002, a basic set of data can be
added to the instance by:

```sh
> git clone https://github.com/konveyor/tackle2-hub.git
> cd tackle2-hub/hack
> HOST=localhost:9002 ./add/all.sh
```
6 changes: 6 additions & 0 deletions hack/import-applications/sample-applications.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Record Type 1,Application Name,Description,Comments,Business Service,Dependency,Dependency Direction,Binary Group,Binary Artifact,Binary Version,Binary Packaging,Repository Type,Repository URL,Repository Branch,Repository Path,Tag Category 1,Tag 1,Tag Category 2,Tag 2,Tag Category 3,Tag 3,Tag Category 4,Tag 4,Tag Category 5,Tag 5,Tag Category 6,Tag 6,Tag Category 7,Tag 7,Tag Category 8,Tag 8,Tag Category 9,Tag 9,Tag Category 10,Tag 10,Tag Category 11,Tag 11,Tag Category 12,Tag 12,Tag Category 13,Tag 13,Tag Category 14,Tag 14,Tag Category 15,Tag 15,Tag Category 16,Tag 16,Tag Category 17,Tag 17,Tag Category 18,Tag 18,Tag Category 19,Tag 19,Tag Category 20,Tag 20
1,Customers,Legacy Customers management service,,Retail,,,corp.acme.demo,customers-tomcat,0.0.1-SNAPSHOT,war,git,https://git-acme.local/customers.git,,,Operating System,RHEL 8,Database,Oracle,Language,Java,Runtime,Tomcat,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1,Inventory,Inventory service,,Retail,,,corp.acme.demo,inventory,0.1.1-SNAPSHOT,war,git,https://git-acme.local/inventory.git,,,Operating System,RHEL 8,Database,Postgresql,Language,Java,Runtime,Quarkus,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
1,Gateway,API Gateway,,Retail,,,corp.acme.demo,gateway,0.1.1-SNAPSHOT,war,git,https://git-acme.local/gateway.git,,,Operating System,RHEL 8,,,Language,Java,Runtime,Spring Boot,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
2,Gateway,,,,Inventory,southbound
2,Gateway,,,,Customers,southbound
Original file line number Diff line number Diff line change
@@ -1,75 +1,77 @@
name: Cloud Native
description: |
Questionnaire that includes the Twelve Factor Application principles.
sections:
- name: Application technologies 1
- order: 1
name: Application technologies 1
questions:
- formulation: What is the main technology in your application?
- text: What is the main technology in your application?
explanation: What would you describe as the main framework used to build your application.
answers:
- choice: Unknown
- text: Unknown
rationale: This is a problem because of the uncertainty.
mitigation: Gathering more information about this is required.
risk: unknown
- choice: Quarkus
- text: Quarkus
risk: green
autoanswer_if_tags_present:
autoAnswerFor:
- category: Technology
tag: Quarkus
autotag:
applyTags:
- category: Technology
tag: Quarkus
- choice: Spring Boot
- text: Spring Boot
risk: green
autoanswer_if_tags_present:
autoAnswerFor:
- category: Technology
tag: Spring Boot
autotag:
applyTags:
- category: Technology
tag: Spring Boot
- choice: Java EE
- text: Java EE
rationale: This might not be the most cloud friendly technology.
mitigation: Maybe start thinking about migrating to Quarkus or Jakarta EE.
risk: yellow
autoanswer_if_tags_present:
autoAnswerFor:
- category: Technology
tag: Java EE
autotag:
applyTags:
- category: Technology
tag: Java EE
- choice: J2EE
- text: J2EE
rationale: This is obsolete.
mitigation: Maybe start thinking about migrating to Quarkus or Jakarta EE.
risk: red
autoanswer_if_tags_present:
autoAnswerFor:
- category: Technology
tag: J2EE
autotag:
applyTags:
- category: Technology
tag: J2EE
- formulation: "What version of Java EE does the application use?"
- text: "What version of Java EE does the application use?"
explanation: "What version of the Java EE specification is your application using?"
answers:
- choice: Below 5.
- text: Below 5.
rationale: This technology stack is obsolete.
mitigation: Consider migrating to at least Java EE 7.
risk: red
- choice: 5 or 6
- text: 5 or 6
rationale: This is a mostly outdated stack.
mitigation: Consider migrating to at least Java EE 7.
risk: yellow
- choice: "7"
- text: "7"
risk: green
include_if_tags_present:
includeFor:
- category: Technology
tag: Java EE
- formulation: Does your application use any caching mechanism?
- text: Does your application use any caching mechanism?
answers:
- choice: Yes
- text: Yes
rationale: This could be problematic in containers and Kubernetes.
mitigation: Review the clustering mechanism to check compatibility and support for container environments.
risk: yellow
autoanswer_if_tags_present:
autoAnswerFor:
- category: Caching
tag: Infinispan
- category: Caching
Expand All @@ -78,97 +80,99 @@ sections:
tag: eXtreme Scale
- category: Caching
tag: Coherence
- choice: No
- text: No
risk: green
- choice: Unknown
- text: Unknown
rationale: This is a problem because of the uncertainty.
mitigation: Gathering more information about this is required.
risk: unknown
- formulation: What implementation of JAX-WS does your application use?
- text: What implementation of JAX-WS does your application use?
answers:
- choice: Apache Axis
- text: Apache Axis
rationale: This version is obsolete
mitigation: Consider migrating to Apache CXF
risk: red
- choice: Apache CXF
- text: Apache CXF
risk: green
- choice: Unknown
- text: Unknown
rationale: This is a problem because of the uncertainty.
mitigation: Gathering more information about this is required.
risk: unknown
skip_if_tags_present:
excludeFor:
- category: Technology
tag: Spring Boot
- category: Technology
tag: Quarkus
- name: Application technologies

- order: 2
name: Application technologies
questions:
- formulation: What is the main technology in your application?
- text: What is the main technology in your application?
explanation: What would you describe as the main framework used to build your application.
answers:
- choice: Unknown
- text: Unknown
rationale: This is a problem because of the uncertainty.
mitigation: Gathering more information about this is required.
risk: unknown
- choice: Quarkus
- text: Quarkus
risk: green
autoanswer_if_tags_present:
autoAnswerFor:
- category: Technology
tag: Quarkus
autotag:
applyTags:
- category: Technology
tag: Quarkus
- choice: Spring Boot
- text: Spring Boot
risk: green
autoanswer_if_tags_present:
autoAnswerFor:
- category: Technology
tag: Spring Boot
autotag:
applyTags:
- category: Technology
tag: Spring Boot
- choice: Java EE
- text: Java EE
rationale: This might not be the most cloud friendly technology.
mitigation: Maybe start thinking about migrating to Quarkus or Jakarta EE.
risk: yellow
autoanswer_if_tags_present:
autoAnswerFor:
- category: Technology
tag: Java EE
autotag:
applyTags:
- category: Technology
tag: Java EE
- choice: J2EE
- text: J2EE
rationale: This is obsolete.
mitigation: Maybe start thinking about migrating to Quarkus or Jakarta EE.
risk: red
autoanswer_if_tags_present:
autoAnswerFor:
- category: Technology
tag: J2EE
autotag:
applyTags:
- category: Technology
tag: J2EE
- formulation: "What version of Java EE does the application use?"
- text: "What version of Java EE does the application use?"
explanation: "What version of the Java EE specification is your application using?"
answers:
- choice: Below 5.
- text: Below 5.
rationale: This technology stack is obsolete.
mitigation: Consider migrating to at least Java EE 7.
risk: red
- choice: 5 or 6
- text: 5 or 6
rationale: This is a mostly outdated stack.
mitigation: Consider migrating to at least Java EE 7.
risk: yellow
- choice: "7"
- text: "7"
risk: green
include_if_tags_present:
includeFor:
- category: Technology
tag: Java EE
- formulation: Does your application use any caching mechanism?
- text: Does your application use any caching mechanism?
answers:
- choice: Yes
- text: Yes
rationale: This could be problematic in containers and Kubernetes.
mitigation: Review the clustering mechanism to check compatibility and support for container environments.
risk: yellow
autoanswer_if_tags_present:
autoAnswerFor:
- category: Caching
tag: Infinispan
- category: Caching
Expand All @@ -177,34 +181,36 @@ sections:
tag: eXtreme Scale
- category: Caching
tag: Coherence
- choice: No
- text: No
risk: green
- choice: Unknown
- text: Unknown
rationale: This is a problem because of the uncertainty.
mitigation: Gathering more information about this is required.
risk: unknown
- formulation: What implementation of JAX-WS does your application use?
- text: What implementation of JAX-WS does your application use?
answers:
- choice: Apache Axis
- text: Apache Axis
rationale: This version is obsolete
mitigation: Consider migrating to Apache CXF
risk: red
- choice: Apache CXF
- text: Apache CXF
risk: green
- choice: Unknown
- text: Unknown
rationale: This is a problem because of the uncertainty.
mitigation: Gathering more information about this is required.
risk: unknown
skip_if_tags_present:
excludeFor:
- category: Technology
tag: Spring Boot
- category: Technology
tag: Quarkus

thresholds:
red: 1%
yellow: 30%
unknown: 15%
risk_messages:
red: 1
yellow: 30
unknown: 15

riskMessages:
red: Application requires deep changes in architecture or lifecycle
yellow: Application is Cloud friendly but requires some minor changes
green: Application is Cloud Native
Expand Down
Loading

0 comments on commit 9d0d7f0

Please sign in to comment.