SAP / cloud-mta-build-tool

Multi-Target Application (MTA) build tool for Cloud Applications https://sap.github.io/cloud-mta-build-tool
Apache License 2.0
139 stars 60 forks source link

Failed mtar file deploy to Cloud Foundry #608

Closed mikolasz closed 4 years ago

mikolasz commented 4 years ago

I'm trying to deploy mtar file to Cloud Foundry but I got similar errors:

Cannot retrieve service parameters of service "productdb_html5_repo_host" Cannot retrieve service parameters of service "productdb-db-hdi-container" Cannot retrieve service parameters of service "productdb_html5_repo_runtime"

for example:

2.0#2019 11 27 12:54:23.414#Z#WARN#com.sap.cloud.lm.sl.xs2.f84a2c16-1114-11ea-9fce-eeee0a801b06.MAIN_LOG.DetermineServiceCreateUpdateActionsTask

com.sap.cloud.lm.sl.cf.persistence.services.ProcessLogger########flowable-async-job-executor-thread-28

[DetermineServiceCreateUpdateServiceActionsStep] Cannot retrieve service parameters of service "productdb_html5_repo_runtime"#

org.cloudfoundry.client.lib.CloudOperationException: 400 Bad Request: This service does not support fetching service instance parameters.

Please provide the following info:

mta.yaml:

ID: productdb
_schema-version: '2.1'
parameters:
  deploy_mode: html5-repo
version: 0.0.1
modules:
  - name: productdb_appRouter
    type: approuter.nodejs
    path: productdb_appRouter
    parameters:
      disk-quota: 256M
      memory: 256M
    requires:
      - name: productdb_html5_repo_runtime
      - name: productdb-uaa
      - name: srv_api
        group: destinations
        properties:
          forwardAuthToken: true
          name: srv_api
          url: '~{url}'
  - name: productdb_ui_deployer
    type: com.sap.html5.application-content
    path: productdb_ui_deployer
    requires:
      - name: productdb_html5_repo_host
    build-parameters:
      requires:
        - name: ui-product
          artifacts:
            - './*'
          target-path: resources/ui-product
  - name: productdb-db
    type: hdb
    path: db
    parameters:
      memory: 256M
      disk-quota: 256M
    requires:
      - name: productdb-db-hdi-container
  - name: productdb-srv
    type: java
    path: srv
    parameters:
      memory: 1024M
    provides:
      - name: srv_api
        properties:
          url: '${default-url}'
    requires:
      - name: productdb-db-hdi-container
        properties:
          JBP_CONFIG_RESOURCE_CONFIGURATION: '[tomcat/webapps/ROOT/META-INF/context.xml: {"service_name_for_DefaultDB" : "~{hdi-container-name}"}]'
      - name: productdb-uaa
  - name: ui-product
    type: html5
    path: ui-product
    build-parameters:
      builder: grunt
      supported-platforms: []
      build-result: dist
    requires:
      - name: srv_api
        group: destinations
        properties:
          forwardAuthToken: true
          strictSSL: false
          name: srv_api
          url: '~{url}'

resources:
  - name: productdb_html5_repo_runtime
    parameters:
      service-plan: app-runtime
      service: html5-apps-repo
    type: org.cloudfoundry.managed-service
  - name: productdb_html5_repo_host
    parameters:
      service-plan: app-host
      service: html5-apps-repo
    type: org.cloudfoundry.managed-service
  - name: productdb-db-hdi-container
    type: com.sap.xs.hdi-container
    properties:
      hdi-container-name: '${service-name}'
  - name: productdb-uaa
    type: org.cloudfoundry.managed-service
    parameters:
      service-plan: application
      service: xsuaa
      config:
        xsappname: 'productdb-${space}'
        tenant-mode: dedicated
ShimiT commented 4 years ago

@mikolasz - I was able to deploy successfully a project with the same modules types, can you please share the project? or some minimal reproducible example.

ShimiT commented 4 years ago

@mikolasz - any update?

katunin-ng commented 4 years ago

Hi,

I am closing the issue since there is no response for a few weeks. Please re-open, if still relevant.

Regards Natalia