-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Issue description
Hi colleagues,
In my CAP java application I am using mta.yaml to generate mta.tar file and then use cf deploy mta.tar to deploy my java application. In order to copy otel secrets required for mls I created .profile file which is part of my srv folder. And then when I generate mta.tar, I notice that .profile is never getting added inside the tar.
If anyone have this kind of use case working fine then please suggest the solution.
when I extract mta.tar I see following directories part of if, but it doesn't contain .profile. Expectation here is that under cap-bootstrap-srv it should also have .profile file because I added .profile file under the same in my source.
Shell gen % tar -tf mta.tar META-INF/ META-INF/MANIFEST.MF META-INF/mtad.yaml cap-bootstrap/ cap-bootstrap/data.zip cap-bootstrap-ams-policies-deployer/ cap-bootstrap-ams-policies-deployer/srv/ cap-bootstrap-ams-policies-deployer/srv/src/ cap-bootstrap-ams-policies-deployer/srv/src/gen/ cap-bootstrap-ams-policies-deployer/srv/src/gen/policies/ cap-bootstrap-ams-policies-deployer/srv/src/gen/policies/data.zip cap-bootstrap-app-deployer/ cap-bootstrap-app-deployer/resources/ cap-bootstrap-app-deployer/resources/data.zip cap-bootstrap-mtx/ cap-bootstrap-mtx/gen/ cap-bootstrap-mtx/gen/data.zip cap-bootstrap-portal-deployer/ cap-bootstrap-portal-deployer/data.zip cap-bootstrap-srv/ cap-bootstrap-srv/target/ cap-bootstrap-srv/target/cap-bootstrap-exec.jar
following is configuration of my mta.yaml for cap-bootstrap-srv
`YAML
modules:
- name: cap-bootstrap-srv
type: java
path: srv
parameters:
instances: 1
buildpack: sap_java_buildpack_jakarta
keep-existing-routes: true
routes:
- route: "${default-url}"
- route: "${default-host}.cert.${default-domain}"
properties:
SPRING_PROFILES_ACTIVE: cloud
JBP_CONFIG_COMPONENTS: "jres: ['com.sap.xs.java.buildpack.jre.SAPMachineJRE']"
JBP_CONFIG_SAP_MACHINE_JRE: '{ version: 21.+ }'
AMS_DCL_ROOT: ams/dcl
CDS_MULTITENANCY_APPUI_TENANTSEPARATOR: "-"
JBP_CONFIG_JAVA_OPTS:
from_environment: false
java_opts: >
-javaagent:META-INF/.sap_java_buildpack/otel_agent/opentelemetry-javaagent.jar
-Dotel.javaagent.extensions=META-INF/.sap_java_buildpack/otel_agent_extension/otel-agent-ext-java.jar
-Dotel.javaagent.debug=true
OTEL_METRICS_EXPORTER: otlp
OTEL_TRACES_EXPORTER: otlp
OTEL_LOGS_EXPORTER: otlp
OTEL_EXPORTER_OTLP_PROTOCOL: "http/protobuf"
OTEL_EXPORTER_OTLP_METRICS_PROTOCOL: "http/protobuf"
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL: "http/protobuf"
OTEL_EXPORTER_OTLP_LOGS_PROTOCOL: "http/protobuf"
OTEL_EXPORTER_OTLP_ENDPOINT: https://4317-gp4suite.op1-gcp-euw4.caas.shoot.live.k8s-hana.ondemand.com:3333/
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT: https://4317-gp4suite.op1-gcp-euw4.caas.shoot.live.k8s-hana.ondemand.com:3333/v1/traces
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT: https://4317-gp4suite.op1-gcp-euw4.caas.shoot.live.k8s-hana.ondemand.com:3333/v1/metrics
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT: https://4317-gp4suite.op1-gcp-euw4.caas.shoot.live.k8s-hana.ondemand.com:3333/v1/logs
OTEL_LOG_LEVEL: debug
OTEL_PROPAGATORS: tracecontext,baggage
OTEL_EXPORTER_OTLP_COMPRESSION: gzip
OTEL_TRACES_SAMPLER: "always_on"
OTEL_SERVICE_NAME: "CAP Bootstrap Service"
OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE: /tmp/otel/otel_client.crt
OTEL_EXPORTER_OTLP_CLIENT_KEY: /tmp/otel/otel_client.key
OTEL_EXPORTER_OTLP_CERTIFICATE: /tmp/otel/otel_client.crt
build-parameters:
builder: custom
commands:
- mvn clean package -DskipTests=true --batch-mode
build-result: target/*-exec.jar
build-artifacts:
- .profile
provides:- name: srv-api # required by consumers of CAP services (e.g. approuter)
properties:
srv-url: ${default-url}
srv-cert-url: '${protocol}://${default-host}.cert.${default-domain}'
requires: - name: cap-bootstrap-ias
parameters:
config:
credential-type: X509_GENERATED
app-identifier: srv - name: mtx-api
properties:
CDS_MULTITENANCY_SIDECAR_URL: ~{mtx-url} - name: cap-bootstrap-sms
- name: app-api
properties:
CDS_MULTITENANCY_APPUI_URL: ~{url} - name: cap-bootstrap-html5-runtime
- name: cap-bootstrap-portal
- name: cap-bootstrap-db
- name: cap-bootstrap-credstore-small
deployed-after: - cap-bootstrap-ams-policies-deployer`
- name: srv-api # required by consumers of CAP services (e.g. approuter)
Following is the screenshot of my source where I added .profile under srv folder, which represents cap-bootstrap-srv
Feedback Type (Optional)
clarity
Page Title on SAP Help Portal (prefilled)
List of Supported MTA Parameters
Page URL on SAP Help Portal (prefilled)
https://help.sap.com/docs/btp/sap-business-technology-platform/list-of-supported-mta-parameters