Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Added jaeger to images so it runs out of the box #297

Merged
merged 5 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,13 @@ COPY Makefile /analyzer-lsp/Makefile

RUN make build

FROM jaegertracing/all-in-one:latest AS jaeger-builder

# The unofficial base image w/ jdtls and gopls installed
FROM quay.io/konveyor/jdtls-server-base

COPY --from=jaeger-builder /go/bin/all-in-one-linux /usr/bin/

COPY --from=builder /analyzer-lsp/konveyor-analyzer /usr/bin/konveyor-analyzer
COPY --from=builder /analyzer-lsp/konveyor-analyzer-dep /usr/bin/konveyor-analyzer-dep
COPY --from=builder /analyzer-lsp/external-providers/generic-external-provider/generic-external-provider /usr/bin/generic-external-provider
Expand All @@ -28,4 +32,6 @@ COPY provider_container_settings.json /analyzer-lsp/provider_settings.json

WORKDIR /analyzer-lsp

ENTRYPOINT ["konveyor-analyzer"]
EXPOSE 16686

ENTRYPOINT ["sh", "-c", "all-in-one-linux & sleep 5 && konveyor-analyzer"]
2 changes: 1 addition & 1 deletion cmd/analyzer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func init() {
rootCmd.Flags().StringVar(&labelSelector, "label-selector", "", "an expression to select rules based on labels")
rootCmd.Flags().StringVar(&depLabelSelector, "dep-label-selector", "", "an expression to select dependencies based on labels. This will filter out the violations from these dependencies as well these dependencies when matching dependency conditions")
rootCmd.Flags().IntVar(&logLevel, "verbose", 9, "level for logging output")
rootCmd.Flags().BoolVar(&enableJaeger, "enable-jaeger", false, "enable tracer exports to jaeger endpoint")
rootCmd.Flags().BoolVar(&enableJaeger, "enable-jaeger", true, "enable tracer exports to jaeger endpoint")
rootCmd.Flags().StringVar(&jaegerEndpoint, "jaeger-endpoint", "http://localhost:14268/api/traces", "jaeger endpoint to collect tracing data")
rootCmd.Flags().IntVar(&limitIncidents, "limit-incidents", 1500, "Set this to the limit incidents that a given rule can give, zero means no limit")
rootCmd.Flags().IntVar(&limitCodeSnips, "limit-code-snips", 20, "limit the number code snippets that are retrieved for a file while evaluating a rule, 0 means no limit")
Expand Down
4 changes: 4 additions & 0 deletions demo.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ WORKDIR /analyzer-lsp
COPY rule-example.yaml /analyzer-lsp/rule-example.yaml
COPY examples /analyzer-lsp/examples
COPY open-source-libs.txt /analyzer-lsp/open-source-libs.txt

EXPOSE 16686

ENTRYPOINT ["sh", "-c", "all-in-one-linux & sleep 5 && konveyor-analyzer && curl -o traces.json http://localhost:16686/api/traces?service=analyzer-lsp"]