Skip to content

Commit

Permalink
adding updates to demo files
Browse files Browse the repository at this point in the history
Signed-off-by: Shawn Hurley <[email protected]>
  • Loading branch information
shawn-hurley committed Apr 23, 2024
1 parent b823117 commit 4a0b20f
Show file tree
Hide file tree
Showing 5 changed files with 340 additions and 545 deletions.
28 changes: 26 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ deps:
image-build:
docker build -f Dockerfile . -t $(DOCKER_IMAGE)

run-external: build-dotnet-provider build-generic-provider build-golang-dep-provider build-java-provider build-yq-provider run-images
build-external: build-dotnet-provider build-generic-provider build-golang-dep-provider build-java-provider build-yq-provider

build-dotnet-provider:
cd external-providers/dotnet-external-provider/ && go mod edit --replace=github.com/konveyor/analyzer-lsp=/analyzer-lsp
Expand All @@ -45,7 +45,7 @@ build-yq-provider:
cd external-providers/yq-external-provider/ && go mod edit --replace=github.com/konveyor/analyzer-lsp=/analyzer-lsp
podman build -f external-providers/yq-external-provider/Dockerfile -t yq-provider .

run-images:
run-external-providers-local:
podman run --name java-provider -d -p 14651:14651 -v $(PWD)/external-providers/java-external-provider/examples:/examples java-provider --port 14651
podman run --name yq -d -p 14652:14652 -v $(PWD)/examples:/examples yq-provider --port 14652
podman run --name golang-provider -d -p 14653:14653 -v $(PWD)/examples:/examples generic-provider --port 14653
Expand All @@ -68,3 +68,27 @@ stop-external-providers:
cd external-providers/golang-dependency-provider/ && go mod edit --dropreplace=github.com/konveyor/analyzer-lsp
cd external-providers/generic-external-provider/ && go mod edit --dropreplace=github.com/konveyor/analyzer-lsp
cd external-providers/dotnet-external-provider/ && go mod edit --dropreplace=github.com/konveyor/analyzer-lsp

run-external-providers-pod:
podman volume create test-data
# copy data to test data volume
podman run --rm -v test-data:/target -v $(PWD)/examples:/src/ --entrypoint=cp alpine -a /src/. /target/
podman run --rm -v test-data:/target -v $(PWD)/external-providers/java-external-provider/examples:/src/ --entrypoint=cp alpine -a /src/. /target/
# run pods w/ defined ports for the test volumes
podman pod create --name=analyzer
podman run --pod analyzer --name java-provider -d -v test-data:/analyzer-lsp/examples java-provider --port 14651
podman run --pod analyzer --name yq -d -v test-data:/analyzer-lsp/examples yq-provider --port 14652
podman run --pod analyzer --name golang-provider -d -v test-data:/analyzer-lsp/examples generic-provider --port 14653
podman run --pod analyzer --name nodejs -d -v test-data:/analyzer-lsp/examples generic-provider --port 14654 --name nodejs
podman run --pod analyzer --name python -d -v test-data:/analyzer-lsp/examples generic-provider --port 14655 --name pylsp
podman build -f demo.Dockerfile -t localhost/testing:latest

run-demo-image:
podman run --entrypoint /usr/local/bin/konveyor-analyzer --pod=analyzer -v $(PWD)/demo-dep-output.yaml:/analyzer-lsp/demo-dep-output.yaml:Z -v $(PWD)/demo-output.yaml:/analyzer-lsp/output.yaml:Z localhost/testing:latest --dep-output-file=demo-dep-output.yaml

stop-external-providers-pod:
podman pod kill analyzer
podman pod rm analyzer
podman volume rm test-data


Loading

0 comments on commit 4a0b20f

Please sign in to comment.