diff --git a/.dockerignore b/.dockerignore index ed4e999..9a9af8b 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,7 +6,6 @@ dewey.iml pom.xml pom.xml.asc *.jar -!opentelemetry-javaagent.jar *.class /.lein-* /.nrepl-port diff --git a/.gitignore b/.gitignore index 0169421..28653c9 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,5 @@ test2junit build.xml .nrepl-port *.jar -!opentelemetry-javaagent.jar /.clj-kondo /.lsp/.cache diff --git a/Dockerfile b/Dockerfile index 1fba364..7e4c9f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,12 @@ -FROM clojure:openjdk-17-lein-alpine +FROM clojure:temurin-22-lein-jammy WORKDIR /usr/src/app -RUN apk add --no-cache git +RUN apt-get update && \ + apt-get install -y git && \ + rm -rf /var/lib/apt/lists/* -RUN ln -s "/opt/openjdk-17/bin/java" "/bin/dewey" +RUN ln -s "/opt/java/openjdk/bin/java" "/bin/dewey" ENV OTEL_TRACES_EXPORTER none @@ -14,10 +16,10 @@ RUN lein deps COPY conf/main/logback.xml /usr/src/app/ COPY . /usr/src/app -RUN lein uberjar && \ +RUN lein do clean, uberjar && \ cp target/dewey-standalone.jar . -ENTRYPOINT ["dewey", "-Dlogback.configurationFile=/etc/iplant/de/logging/dewey-logging.xml", "-javaagent:/usr/src/app/opentelemetry-javaagent.jar", "-Dotel.resource.attributes=service.name=dewey", "-cp", ".:dewey-standalone.jar", "dewey.core"] +ENTRYPOINT ["dewey", "-Dlogback.configurationFile=/etc/iplant/de/logging/dewey-logging.xml", "-cp", ".:dewey-standalone.jar", "dewey.core"] CMD ["--help"] ARG git_commit=unknown diff --git a/dewey.properties.tmpl b/dewey.properties.tmpl deleted file mode 100644 index 0d03cd6..0000000 --- a/dewey.properties.tmpl +++ /dev/null @@ -1,23 +0,0 @@ -{{- with $base := (printf "configs/%s" (env "DE_ENV")) -}} -dewey.environment-name = {{ env "DE_ENV" }} - -{{ with $v := (key (printf "%s/irods-amqp/uri" $base)) }}dewey.amqp.uri = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/irods-amqp/exchange/name" $base)) }}dewey.amqp.exchange.name = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/dewey/amqp-queue-name" $base)) }}dewey.amqp.queue_name = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/dewey/qos" $base)) }}dewey.amqp.qos = {{ $v }}{{ end }} - -{{ with $v := (key (printf "%s/amqp/uri" $base)) }}dewey.events.amqp.uri = {{ $v }}{{ end }} - -{{ with $v := (key (printf "%s/elasticsearch/base" $base)) }}dewey.es.uri = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/elasticsearch/username" $base)) }}dewey.es.username = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/elasticsearch/password" $base)) }}dewey.es.password = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/elasticsearch/data-alias" $base)) }}dewey.es.index = {{ $v }}{{ end }} - -{{ with $v := (key (printf "%s/irods/host" $base)) }}dewey.irods.host = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/irods/port" $base)) }}dewey.irods.port = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/irods/zone" $base)) }}dewey.irods.zone = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/irods/user" $base)) }}dewey.irods.user = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/irods/pass" $base)) }}dewey.irods.password = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/irods/resc" $base)) }}dewey.irods.default-resource = {{ $v }}{{ end }} -{{ with $v := (key (printf "%s/irods/base" $base)) }}dewey.irods.home = {{ $v }}{{ end }} -{{- end -}} diff --git a/k8s/dewey.yml b/k8s/dewey.yml index 21f1f8c..f333961 100644 --- a/k8s/dewey.yml +++ b/k8s/dewey.yml @@ -33,71 +33,71 @@ spec: - key: dewey.properties path: dewey.properties containers: - - name: dewey - image: harbor.cyverse.org/de/dewey - resources: - requests: - cpu: "480m" - memory: "512Mi" - ephemeral-storage: "1Gi" - limits: - cpu: "1600m" - memory: "2Gi" - ephemeral-storage: "1Gi" - args: - - --config - - /etc/iplant/de/dewey.properties - volumeMounts: - - name: localtime - mountPath: /etc/localtime - readOnly: true - - name: timezone - mountPath: /etc/timezone - subPath: timezone - - name: service-configs - mountPath: /etc/iplant/de - readOnly: true - env: - - name: JAVA_TOOL_OPTIONS - valueFrom: - configMapKeyRef: - name: java-tool-options - key: low - - name: OTEL_TRACES_EXPORTER - valueFrom: - secretKeyRef: - name: configs - key: OTEL_TRACES_EXPORTER - - name: OTEL_EXPORTER_JAEGER_ENDPOINT - valueFrom: - secretKeyRef: - name: configs - key: OTEL_EXPORTER_JAEGER_ENDPOINT - ports: - - name: listen-port - containerPort: 60000 - livenessProbe: - httpGet: - path: / - port: 60000 - initialDelaySeconds: 60 - periodSeconds: 20 - timeoutSeconds: 10 - startupProbe: - httpGet: - path: / - port: 60000 - initialDelaySeconds: 60 - periodSeconds: 20 - timeoutSeconds: 10 - failureThreshold: 30 - readinessProbe: - httpGet: - path: / - port: 60000 - initialDelaySeconds: 60 - periodSeconds: 20 - timeoutSeconds: 10 + - name: dewey + image: harbor.cyverse.org/de/dewey + resources: + requests: + cpu: "480m" + memory: "512Mi" + ephemeral-storage: "100Mi" + limits: + cpu: "1600m" + memory: "2Gi" + ephemeral-storage: "100Mi" + args: + - --config + - /etc/iplant/de/dewey.properties + volumeMounts: + - name: localtime + mountPath: /etc/localtime + readOnly: true + - name: timezone + mountPath: /etc/timezone + subPath: timezone + - name: service-configs + mountPath: /etc/iplant/de + readOnly: true + env: + - name: JAVA_TOOL_OPTIONS + valueFrom: + configMapKeyRef: + name: java-tool-options + key: low + - name: OTEL_TRACES_EXPORTER + valueFrom: + secretKeyRef: + name: configs + key: OTEL_TRACES_EXPORTER + - name: OTEL_EXPORTER_JAEGER_ENDPOINT + valueFrom: + secretKeyRef: + name: configs + key: OTEL_EXPORTER_JAEGER_ENDPOINT + ports: + - name: listen-port + containerPort: 60000 + livenessProbe: + httpGet: + path: / + port: 60000 + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + startupProbe: + httpGet: + path: / + port: 60000 + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 + failureThreshold: 30 + readinessProbe: + httpGet: + path: / + port: 60000 + initialDelaySeconds: 60 + periodSeconds: 20 + timeoutSeconds: 10 --- apiVersion: v1 kind: Service diff --git a/opentelemetry-javaagent.jar b/opentelemetry-javaagent.jar deleted file mode 100644 index a152125..0000000 Binary files a/opentelemetry-javaagent.jar and /dev/null differ diff --git a/project.clj b/project.clj index 0195ba5..cdfe678 100644 --- a/project.clj +++ b/project.clj @@ -7,7 +7,7 @@ (string/trim (:out (sh "git" "rev-parse" "HEAD"))) "")) -(defproject org.cyverse/dewey "2.12.0-SNAPSHOT" +(defproject org.cyverse/dewey "3.0.1-SNAPSHOT" :description "This is a RabbitMQ client responsible for keeping an elasticsearch index synchronized with an iRODS repository using messages produced by iRODS." :url "https://github.com/cyverse-de/dewey" @@ -16,39 +16,37 @@ :manifest {"Git-Ref" ~(git-ref)} :uberjar-name "dewey-standalone.jar" :main ^:skip-aot dewey.core - :dependencies [[org.clojure/clojure "1.11.2"] + :dependencies [[org.clojure/clojure "1.11.3"] [org.clojure/tools.cli "1.1.230"] [org.clojure/test.check "1.1.1"] - [cheshire "5.12.0" + [cheshire "5.13.0" :exclusions [[com.fasterxml.jackson.dataformat/jackson-dataformat-cbor] [com.fasterxml.jackson.dataformat/jackson-dataformat-smile] [com.fasterxml.jackson.core/jackson-annotations] [com.fasterxml.jackson.core/jackson-databind] [com.fasterxml.jackson.core/jackson-core]]] - [com.novemberain/langohr "3.5.1"] + [com.novemberain/langohr "5.4.0" :exclusions [org.slf4j/slf4j-api]] [liberator "0.15.3"] [compojure "1.7.1"] - [ring "1.12.0"] + [ring "1.12.2"] [slingshot "0.12.2"] - [org.cyverse/clj-jargon "3.1.0" + [org.cyverse/clj-jargon "3.1.1" :exclusions [[org.slf4j/slf4j-log4j12] [log4j]]] - [org.cyverse/clojure-commons "3.0.7"] - [org.cyverse/common-cli "2.8.1"] - [org.cyverse/service-logging "2.8.3"] - [net.logstash.logback/logstash-logback-encoder "7.4"] + [org.cyverse/clojure-commons "3.0.9"] + [org.cyverse/common-cli "2.8.2"] + [org.cyverse/service-logging "2.8.4"] [org.cyverse/event-messages "0.0.1"] [me.raynes/fs "1.4.6"] [cc.qbits/spandex "0.8.2"] [org.apache.httpcomponents/httpcore "4.4.16"]] :eastwood {:exclude-namespaces [:test-paths] :linters [:wrong-arity :wrong-ns-form :wrong-pre-post :wrong-tag :misplaced-docstrings]} - :plugins [[jonase/eastwood "1.4.2"] + :plugins [[jonase/eastwood "1.4.3"] [lein-ancient "0.7.0"] - [test2junit "1.1.3"]] + [test2junit "1.4.4"]] :resource-paths [] :profiles {:dev {:dependencies [[midje "1.10.10"]] - :jvm-opts ["-Dotel.javaagent.enabled=false"] :resource-paths ["dev-resources"]} :uberjar {:aot :all}} - :jvm-opts ["-Dlogback.configurationFile=/etc/iplant/de/logging/dewey-logging.xml" "-javaagent:./opentelemetry-javaagent.jar" "-Dotel.resource.attributes=service.name=dewey"]) + :jvm-opts ["-Dlogback.configurationFile=/etc/iplant/de/logging/dewey-logging.xml"])