SAP-samples / cf-mta-examples

The repository contains multitarget application (MTA) examples for SAP BTP, Cloud Foundry environment. Examples demonstrate how to achieve different goals using MTAs and show the capabilities of MTA deployment service in the Cloud Foundry environment.
Apache License 2.0
112 stars 44 forks source link

Destinations #38

Open ddonchev opened 4 years ago

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

meakgoz commented 3 years ago

Hi Dido, I am trying this scenario atm and getting an error: [destination-content-deployer] [ERROR] Missing mandatory service instance [backend] required by destination [backend]

We are going to see the created destination in the cockpit after successful deployment, right?

I could create an issue but since this is a PR I thougth writing here would be fine also

my mta.yaml is this:

## Generated mta.yaml based on template version 0.4.0
## appName = sdm-related-situations
## language=nodejs; multiTenant=true
## approuter=
_schema-version: '3.1'
ID: app2app-call-example
version: 1.0.0
description: "A simple CAP project."
parameters:
  enable-parallel-deployments: true

build-parameters:
  before-all:
   - builder: custom
     commands:
      - npm install --production

modules:

- name: destination-content-deployer
  type: com.sap.application.content
  build-parameters:
    no-source: true
  parameters:
    content: #whole content structure moved up to the module's parameters (was in the destinations')
      subaccount:
        destinations:
        - Name: backend
          URL: ~{backend-url/url}  #from here, properties from different requires dependencies can be references - via ~{fully-qualified/references}
          forwardAuthToken: true
          ServiceInstanceName: "backend"
  requires:
  - name: destination-service
    parameters:
      content-target: true
      # content: # Inlinte content can not be defined as this any more!
      #   subaccount:
      #     destinations:
      #     - Name: backend
      #       URL: https://abc.d  #because such values would have to be hard-coded
      #       forwardAuthToken: true
      #       ServiceInstanceName: "backend"
  - name: backend-url   

- name: backend
  type: nodejs
  path: App2
  parameters:
    disk-quota: 128M
    memory: 128M
  provides:
  - name: backend-url
    properties:
      url: ${default-url}

resources:
- name: destination-service
  type: org.cloudfoundry.managed-service
  parameters:
    service: destination
    service-name: destination-service
    service-plan: lite
theghost5800 commented 3 years ago

Hi @meakgoz , Do you deploy your mta using partial deploy feature?

meakgoz commented 3 years ago

Hi Kristian,

tbh I don't even know what is partial deploy feature. Shall I be using this feature then? Could you tell me what it is, and how can I check if I use it or not?