Giter Club home page Giter Club logo

multiapps-cli-plugin's Introduction

MultiApps logo

MultiApps CF CLI Plugin Multiapps CLI Plugin build

This is a Cloud Foundry CLI plugin (formerly known as CF MTA Plugin) for performing operations on Multitarget Applications (MTAs) in Cloud Foundry, such as deploying, removing, viewing, etc. It is a client for the CF MultiApps Controller (known also as CF MTA Deploy Service), which is an MTA deployer implementation for Cloud Foundry. The business logic and actual processing of MTAs happens into CF MultiApps Controller backend.

Requirements

  • Installed CloudFoundry CLI - ensure that CloudFoundry CLI is installed and working. For more information about installation of CloudFoundry CLI, please visit the official CloudFoundry documentation. You need to have CF CLI v7 or v8 (recommended one)
  • Working CF MultiApps Controller - this a CF plugin for the MultiApps Controller application. Thus, a working MultiApps Controller must be available on the CF landscape

Download and Installation

🚨 Check whether you have a previous version installed, using the command: cf plugins. If the MtaPlugin is already installed, you need to uninstall it first and then to install the new version. You can uninstall the plugin using command cf uninstall-plugin MtaPlugin.

CF Community Plugin Repository

The MultiApps CF CLI Plugin is now also available on the CF Community Repository. To install the latest available version of the MultiApps CLI Plugin execute the following:

cf install-plugin multiapps

If you do not have the community repository in your CF CLI you can add it first by executing:

cf add-plugin-repo CF-Community https://plugins.cloudfoundry.org

Manual Installation

Alternatively you can install any version of the plugin by manually downloading it from the releases page and installing the binaries for your specific operating system.

Download

The latest version of the plugin can also be downloaded from the project's releases. Download the plugin for your platform (Darwin, Linux, Windows).

Mac OS X 64 bit Mac OS X Arm64 Windows 32 bit Windows 64 bit Linux 32 bit Linux 64 bit Linux Arm64
multiapps-plugin.osx multiapps-plugin.osxarm64 multiapps-plugin.win32.exe multiapps-plugin.win64.exe multiapps-plugin.linux32 multiapps-plugin.linux64 multiapps-plugin.linuxarm64

Installation

Install the plugin, using the following command:

cf install-plugin <path-to-the-plugin> -f

🚨 Note: if you are running on an Unix-based system, you need to make the plugin executable before installing it. In order to achieve this, execute the following commad chmod +x <path-to-the-plugin>

Usage

The MultiApps CF plugin supports the following commands:

Command Name Command Description
deploy Deploy a new multi-target app or sync changes to an existing one
undeploy Undeploy (remove) a multi-target app
mtas List all multi-target apps
mta Display health and status for a multi-target app
mta-ops List active multi-target app operations
download-mta-op-logs / dmol Download logs of multi-target app operation
bg-deploy Deploy a multi-target app using blue-green deployment
purge-mta-config Purge stale configuration entries

For more information, see the command help output available via cf [command] --help or cf help [command].

Here is an example deployment of the open-sourced spring-music:

git clone https://github.com/nvvalchev/spring-music.git
cf deploy mta-assembly/spring-music.mtar -e config.mtaext

Configuration

The configuration of the MultiApps CF plugin is done via env variables. The following are supported:

  • DEBUG=1 - Enables the logging of HTTP requests in STDOUT and STDERRR.
  • MULTIAPPS_CONTROLLER_URL=<URL> - By default, the plugin attempts to deduce the multiapps-controller URL based on the available shared domains. In case of issues, or if you want to target a non-default multiapps-controller instance, you can configure the targeted URL via this env variable.
  • MULTIAPPS_UPLOAD_CHUNK_SIZE=<POSITIVE_INTEGER> - By default, large MTARs are not uploaded as a single unit, but are split up into smaller chunks of 45 MBs that are uploaded separately. The goal is to prevent failed uploads due to gorouter's request timeout. In case the default chunk size is still too large, you can configure it via this environment variable. The specified values are in megabytes. 🚨 Note: The total number of chunks in which an MTAR is split cannot exceed 50, since the multiapps-controller could interpret bigger values as a denial-of-service attack. For this reason, the minimum value for this environment variable is computed based on the formula: MIN = MTAR_SIZE / 50 For example, with a 100MB MTAR the minimum value for this environment variable would be 2, and for a 400MB MTAR it would be 8. Finally, the minimum value cannot grow over 50, so with a 4GB MTAR, the minimum value would be 50 and not 80.
  • MULTIAPPS_UPLOAD_CHUNKS_SEQUENTIALLY=<BOOLEAN> - By default, MTAR chunks are uploaded in parallel for better performance. In case of a bad internet connection, the option to upload them sequentially will lessen network load.
  • MULTIAPPS_DISABLE_UPLOAD_PROGRESS_BAR=<BOOLEAN> - By default, the file upload shows a progress bar. In case of CI/CD systems where console text escaping isn't supported, the bar can be disabled to reduce unnecessary logs.

How to contribute

Development

WARNING : with Issue 117 the master branch of this repository as well as other artifacts will be renamed. Adaptation to any CI/CD infrastructure & scritps will be required.

Cloning the repository

To clone the project in your Go workspace $GOPATH/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin execute the following commands:

mkdir -p $GOPATH/src/github.com/cloudfoundry-incubator
cd $GOPATH/src/github.com/cloudfoundry-incubator
git clone [email protected]:cloudfoundry-incubator/multiapps-cli-plugin.git

Building new release version

You can automatically build new release for all supported platforms by calling the build.sh script with the version of the build. The version will be automatically included in the plugin, so it will be reported by cf plugins.

🚨 Note that the version parameter should follow the semver format (e.g. 1.2.3).

./build.sh 1.2.3

This will produce mta_plugin_linux_amd64, mta_plugin_darwin_amd64 and mta_plugin_windows_amd64 in the repo's root directory.

Further reading

Presentations, documents, and tutorials:

License

This project is licensed under the Apache Software License, v. 2 except as noted otherwise in the LICENSE file.

multiapps-cli-plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

multiapps-cli-plugin's Issues

Question: Handling OnGoing Deploy Operation

Hi,

I am using the cf deploy plugin to deploy an MTAR from our Jenkins Pipeline to Cloud Foundry.
The following command is being used:

cf mta-ops && cf bg-deploy ${cfTarget.mtar} -f

However, when there is already an ongoing deploy operation - idk why it is ongoing because it has failed already- the deployment does not work.

Ongoing Operations: ERROT & ACTION REQUIRED
image

Failure of blue-green deployment:
image

Does someone know how to handle this issue?

  • I could not find a command to respond to ACTION_REQUIRED nor to Delete an errored deployment
  • Are there additional commands for the initial deploy command that prevent deploy operations to go into Error or Action_Req state when they fail?

Thank you very much.

[Question] CLI option to abort the ongoing process

Description

If there was a deployment failed before, the plugin promtps a question;
There is an ongoing operation for multi-target app <appname>. Do you want to abort it? (y/n)>
What is the flag to suppress this prompt and abort automatically?

If there is a flag already, then it would be very nice to add this to the usage section in the README file.
If there is no flag, then can we request it as a feature?

Best,
Emin.

Can "--namespace" key be ignored for existing services?

Hi,

I am using the plugin: cf deploy, however my mta.yaml file has the service definition as "org.cloudfoundry.existing-service":

  - name: my_workflow
    type: org.cloudfoundry.existing-service
    parameters:
      service-name: my_workflow_service
      service: workflow
      service-plan: standard

When I deploy the mtar file using the command below, I get an error:

> cf deploy mta_archives\my.mtar --namespace com.test

Creating application "com.test-my_approuter" from MTA module "my_approuter"...
Error creating or updating application "com.test-my_approuter":
    Could not bind application "com.test-my_approuter" to service "com.test.my_workflow_service":
        404 Not Found: Service instance com.test.my_workflow_service not found.  <-- HERE!!!!!!
Proceeding with automatic retry... (3 of 3 attempts left)

Is it possible to ignore the namespace for a particular service? At least for the existing one? Otherwise, this feature "namespace" seems useless to me.

Thanks

cf deploy failed due to 403

Dear all,
I'm using the latest version 2.0.3 to deploy. I'm sure I have the role space-developer and space-manager.
However, when I deploy our application, it said:

Creating service "readinesscheck-applogs"...
Error creating services: Controller operation failed: 403 Forbidden: You are not authorized to perform the requested action

My colleagues can deploy the same application successfully. So I guess it's neither because of the application itself nor the role. Why can't I deploy it?
Thank you very much in advance and looking forward to your reply :)

Vetting of go packages is failing

When the command is run:
go vet ./... intro the project root, there are a lot of errors.

Need to reexamine the vet errors and fix the possible issues.

Run automated smoke tests before switching the routes during a mta blue green deployment

Description

Context: I'm working on s4sdk pipeline, which can build mta projects and deploy them to SAP Cloud Platform using this plugin and the cf cli.

We would like to run automated smoke tests as part of the blue-green deployment before the routes are switched. The goal is to avoid the need of manual tests. If the new version of the app is broken (as in, does not even pass smoke tests), the old version should stay up. In the best case, this could be fully automated. For example, after deploying the new version of the application, a test script should run (in the most simple case this would just check if some api endpoint is up), and if this script succeeds the deployment should continue as usual. If the script fails, in the best case the old deployment should stay up automatically and the cf cli should return with a non-zero exit code to indicate the issue.

This request originates in a request by one of our consumers of s4sdk pipeline.

Is there a way to do this as of now? If not, can it be implemented?

Your environment

  • MultiApps CF CLI Plugin version - 2.0.7
  • which CF vendor is used - SAP

Steps to reproduce

Does not apply

Additional information

We use cloudFoundryDeploy step, method deployMta in piper-lib-os with flags -f --no-confirm.

invalid memory address or nil pointer dereference when deploying using *.mtar as the filename

Description

Looking to streamline the commands generated in our application so that there is only every one *.mtar produced and deployed. This will allow our application to work with other yeoman generators which produce mtar archives with a different naming convention.

The commands work fine on SBAS and on latest Mac Big Sur but fail on windows 10 machines as the wildcard i.e. *.mtar is not being expanded into a full filename.

Your environment

  • MultiApps CF CLI Plugin version - 2.6.2 / cf6(6.53.0+8e2b70a4a.2020-10-01) / cf7( 7.2.0+be4a5ce2b.2020-12-10)
  • which CF vendor is used - cf installed following these instructions
  •  OS - Mac/Windows/SBAS
    

Screenshot 2021-06-28 at 10 30 04

Steps to reproduce

Our application is using the following npm command on Windows 10 machine;

"deploy": "cf deploy mta_archives/*.mtar"

Issue is experienced for both cf6 and cf7

Additional information

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x18 pc=0x1195638]

goroutine 1 [running]:
github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands.getMtaArchive(0xc00004ad20, 0x1, 0x1, 0x101, 0xc000017208, 0xc0004ff4d0, 0xe93076, 0xc00007ef00)
        /root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands/deploy_command.go:354 +0x218
github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands.(*DeployCommand).executeInternal(0xc00059c700, 0xc00004ad20, 0x1, 0x1, 0xc000498270, 0x2b, 0xc00029eba0, 0xc000499ce0, 0x24, 0xc00068e940, ...)
        /root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands/deploy_command.go:183 +0x290
github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands.(*BaseCommand).Execute(0xc00051e3f0, 0xc0000280b0, 0x1, 0x1, 0x0)
        /root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/commands/base_command.go:132 +0x5b5
main.(*MultiappsPlugin).Run(0x16d8ad0, 0x13524c0, 0xc00050fb00, 0xc0000280a0, 0x2, 0x2)
        /root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/multiapps_plugin.go:45 +0x1c2
github.com/cloudfoundry-incubator/multiapps-cli-plugin/vendor/github.com/cloudfoundry/cli/plugin.Start(0x1346340, 0x16d8ad0)
        /root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/vendor/github.com/cloudfoundry/cli/plugin/plugin_shim.go:30 +0x1eb
main.main()
        /root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/multiapps_plugin.go:65 +0x45

Partial deployment of application from a module without updating the services

Hi,
we've got a module which requires a lot of resources/services, that don't change.
If I make a partial deployment via "cf deploy -m <module_name>" then all resources also get's processed/updated.
Is it possible to just "update" one application/module without updating all the resources/services?

Thanks,
Steve

run build.sh failure

When I run build.sh I got error
cannot find package "github.com/go-errors/errors" and I indeed couldn't find this package in this project.

cf install-plugin command fails on

Dear all,

I try to execute the following command on my Apple M1 Max MBP to install the multiapps-cli-plugin:

cf install-plugin -f https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/releases/latest/

I get the following error as response, any idea how to resolve the problem?:

download/multiapps-plugin.linux32 
Attention: Plugins are binaries written by potentially untrusted authors.
Install and use plugins at your own risk.
Starting download of plugin binary from URL...
 13.16 MiB / 13.16 MiB [================================================================================] 100.00% 0s
fatal: morestack on g0
SIGTRAP: trace trap
PC=0x80a8712 m=1 sigcode=128

goroutine 0 [idle]:
runtime.abort()
        /usr/local/go/src/runtime/asm_386.s:843 +0x2
runtime.morestack()
        /usr/local/go/src/runtime/asm_386.s:437 +0x24

goroutine 1 [running, locked to thread]:
        goroutine running on other thread; stack unavailable

eax    0x17
ebx    0x2
ecx    0x857b2a1
edx    0x17
edi    0x86f71b9
esi    0x8c002a0
ebp    0x0
esp    0x8c3c668
eip    0x80a8712
eflags 0x202
cs     0x23
fs     0x0
gs     0x33
exit status 2
File is not a valid cf CLI plugin binary.
FAILED

cf version:
cf version 6.53.0+8e2b70a4a.2020-10-01

cf is running inside a docker (alpine linux v3.15) container

thx

Console output doesn't count services correctly

Description

When I'm deploying a mta, which uses multiple services (>2), the console doesn't indicate how many services have been created yet. It only shows "0 of 1" multiple times.
Here's an example of this outout:

 cf deploy city-explorer-demo-app_1.1.0.mtar
Deploying multi-target app archive city-explorer-demo-app_1.1.0.mtar in org D00000trial_d00000 / space dev as [email protected]...

Uploading 1 files...
  /home/adele/city-explorer-demo-app_1.1.0.mtar
OK
Deploying in org "D00000trial_d00000" and space "dev"
Detected MTA schema version: "2"
No deployed MTA detected - this is initial deployment
Detected new MTA version: "1.1.0"
Processing service "azure-blob-storage"...
Creating service "azure-blob-storage" from MTA resource "azure-blob-storage"...
Processing service "city-hdi-container"...
Creating service "city-hdi-container" from MTA resource "city-hdi-container"...
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
1 of 1 done
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
0 of 1 done, (1 creating)
1 of 1 done
Creating application "city-app-router" from MTA module "city-app-router"...
Uploading application "city-app-router"...
Scaling application "city-app-router" to "1" instances...
Staging application "city-app-router"...
Application "city-app-router" staged
Starting application "city-app-router"...
...

Your environment

  • MultiApps Controller version -
  • MultiApps CF CLI Plugin version -
  • which CF vendor is used - SAP Cloud Platform Trial
  • which backing services are used - HANA HDI trial, and Azure storage account via OSB for Azure

Steps to reproduce

Tell us how to reproduce this issue: Here's the descriptor file (the issue might be related that both services come from two service brokers):

_schema-version: 2.0.0
ID: city-explorer-demo-app
version: 1.1.0
modules:
  - name: city-app-router
    type: approuter.nodejs
    path: app
    parameters:
      disk-quota: 256M
      memory: 256M
    requires:
      - name: srv_api
        group: destinations
        properties:
          forwardAuthToken: true
          strictSSL: false
          name: srv_api
          url: ~{url}
      - name: uploader_api
        group: destinations
        properties:
          forwardAuthToken: true
          strictSSL: false
          name: uploader_api
          url: ~{url}
  - name: city-app-db
    type: hdb
    path: db
    parameters:
      memory: 256M
      disk-quota: 512M
    requires:
      - name: city-hdi-container
  - name: city-cap-srv
    type: nodejs
    path: srv
    parameters:
      memory: 512M
      disk-quota: 512M
    provides:
      - name: srv_api
        properties:
          url: ${default-url}
    requires:
      - name: city-hdi-container
  - name: city-image-uploader
    type: nodejs
    path: uploader
    parameters:
      memory: 512M
      disk-quota: 512M
    provides:
      - name: uploader_api
        properties:
          url: ${default-url}
    requires:
      - name: azure-blob-storage
resources:
  - name: city-hdi-container
    type: com.sap.xs.hdi-container
    properties:
      hdi-container-name: ${service-name}
    parameters:
      service: hanatrial
  - name: azure-blob-storage
    type: org.cloudfoundry.managed-service
    parameters:
      service: azure-storage-blob-storage-account-and-container
      service-plan: all-in-one
      config:
        location: "northeurope"
        resourceGroup: "SAPTechEd"
        accessTier: "Cool"

runtime error produced

version 2.0.0

using newest version instead of 1.0.2 to cf deploy gives me following error:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x0 pc=0x7d516d]

goroutine 131 [running]:
github.com/SAP/cf-mta-plugin/clients/mtaclient.MtaRestClient.UploadMtaFile(0xbba8e0, 0xc0423706f0, 0xc04239e720, 0xc042479480, 0x902060, 0xc0424b4550, 0xc042445f48)
C:/prj/root/go-workspace/src/github.com/SAP/cf-mta-plugin/clients/mtaclient/mta_rest_client.go:190 +0x18d
github.com/SAP/cf-mta-plugin/clients/mtaclient.(*MtaRestClient).UploadMtaFile(0xc04239e780, 0xc042479480, 0xc56420, 0xc0421f9040, 0x1200db0)
:12 +0x70
github.com/SAP/cf-mta-plugin/clients/mtaclient.RetryableMtaRestClient.UploadMtaFile.func1(0x0, 0xc0424b4550, 0xc0421f90f0, 0xc042445dd8)
C:/prj/root/go-workspace/src/github.com/SAP/cf-mta-plugin/clients/mtaclient/retryable_mta_rest_client.go:120 +0x42
github.com/SAP/cf-mta-plugin/clients/baseclient.CallWithRetry(0xc0424028a0, 0x3, 0xb2d05e00, 0xc042445fa8, 0x1, 0x1, 0xc0423169f0)
C:/prj/root/go-workspace/src/github.com/SAP/cf-mta-plugin/clients/baseclient/client_util.go:13 +0x43
github.com/SAP/cf-mta-plugin/clients/mtaclient.RetryableMtaRestClient.UploadMtaFile(0xbc3b60, 0xc04239e780, 0x3, 0xb2d05e00, 0xc042479480, 0x0, 0x0, 0x0)
C:/prj/root/go-workspace/src/github.com/SAP/cf-mta-plugin/clients/mtaclient/retryable_mta_rest_client.go:122 +0xb0
github.com/SAP/cf-mta-plugin/clients/mtaclient.(*RetryableMtaRestClient).UploadMtaFile(0xc04239e7a0, 0xc042479480, 0x1, 0x1, 0xc042445fa8)
:38 +0x79
github.com/SAP/cf-mta-plugin/commands.uploadFilePart(0xc0422e6f78, 0xc04245d040, 0x3c, 0xbc3c00, 0xc04239e7a0, 0x0, 0x0, 0x0)
C:/prj/root/go-workspace/src/github.com/SAP/cf-mta-plugin/commands/file_uploader.go:177 +0x87
github.com/SAP/cf-mta-plugin/commands.uploadInChunks.func1(0x8, 0x9811f0)
C:/prj/root/go-workspace/src/github.com/SAP/cf-mta-plugin/commands/file_uploader.go:128 +0x69
github.com/SAP/cf-mta-plugin/vendor/golang.org/x/sync/errgroup.(*Group).Go.func1(0xc04246e9c0, 0xc04227cab0)
C:/prj/root/go-workspace/src/github.com/SAP/cf-mta-plugin/vendor/golang.org/x/sync/errgroup/errgroup.go:58 +0x5e
created by github.com/SAP/cf-mta-plugin/vendor/golang.org/x/sync/errgroup.(*Group).Go
C:/prj/root/go-workspace/src/github.com/SAP/cf-mta-plugin/vendor/golang.org/x/sync/errgroup/errgroup.go:66 +0x6d

BG deployment is not successful

Description

Hi all,

In my space, I have an application named "portal-cf-technical-support"

I am doing BG deployment with Piper step in order to deploy a newer version of it by:
deployToCloudFoundry( script: this, deployTool: 'mtaDeployPlugin', deployType: blue-green, mtaDeployParameters: '-f', cfApiEndpoint: api, cfOrg: org, cfSpace: space, cfCredentialsId: deployUser, mtaPath: pathToFile, mtaExtensionDescriptor: 'mta.mtaext')

after deployment is done, i see 2 versions of the application.
the original one named "portal-cf-technical-support" and another one named "portal-cf-technical-support-green" with almost same url but with postfix "idle"
I would expect that after deployment is done, i would have only the new version deployed with the original name.

Your environment

Listing installed plugins...

plugin version command name command help
blue-green-deploy 1.3.0 blue-green-deploy, bgd Zero-downtime deploys with smoke tests
MtaPlugin 2.0.0 bg-deploy Deploy a multi-target app using blue-green deployment
MtaPlugin 2.0.0 deploy Deploy a new multi-target app or sync changes to an existing one
MtaPlugin 2.0.0 download-mta-op-logs, dmol Download logs of multi-target app operation
MtaPlugin 2.0.0 mta Display health and status for a multi-target app
MtaPlugin 2.0.0 mta-ops List multi-target app operations
MtaPlugin 2.0.0 mtas List all multi-target apps
MtaPlugin 2.0.0 purge-mta-config Purge no longer valid configuration entries
MtaPlugin 2.0.0 undeploy Undeploy a multi-target app

Steps to reproduce

In jenkins job login to your cf space, clone the mtar application and use Piper:
deployToCloudFoundry( script: this, deployTool: 'mtaDeployPlugin', deployType: blue-green, mtaDeployParameters: '-f', cfApiEndpoint: api, cfOrg: org, cfSpace: space, cfCredentialsId: deployUser, mtaPath: pathToFile, mtaExtensionDescriptor: 'mta.mtaext')

Additional information

This is the console output:
[deployToCloudFoundry] Deploying MTA (target/portal-cf-technical-support.mtar) with following parameters: -e mta-prod.mtaext -f
[Pipeline] sh
[GRADLE-DEPLOY-portal-cf-technical-support-i066861-gradle-dsl] Running shell script
API endpoint: https://api.cf.sap.hana.ondemand.com
Authenticating...
OK

Targeted org SAP_PORTAL_SERVICES

Targeted space val

API endpoint: https://api.cf.sap.hana.ondemand.com (API version: 2.120.0)
User: ****
Org: SAP_PORTAL_SERVICES
Space: val
Listing installed plugins...

plugin version command name command help
blue-green-deploy 1.3.0 blue-green-deploy, bgd Zero-downtime deploys with smoke tests
MtaPlugin 2.0.0 bg-deploy Deploy a multi-target app using blue-green deployment
MtaPlugin 2.0.0 deploy Deploy a new multi-target app or sync changes to an existing one
MtaPlugin 2.0.0 download-mta-op-logs, dmol Download logs of multi-target app operation
MtaPlugin 2.0.0 mta Display health and status for a multi-target app
MtaPlugin 2.0.0 mta-ops List multi-target app operations
MtaPlugin 2.0.0 mtas List all multi-target apps
MtaPlugin 2.0.0 purge-mta-config Purge no longer valid configuration entries
MtaPlugin 2.0.0 undeploy Undeploy a multi-target app

Use 'cf repo-plugins' to list plugins in registered repos available to install.
Deploying multi-target app archive target/portal-cf-technical-support.mtar in org SAP_PORTAL_SERVICES / space val as ****...
Aborting multi-target app operation with id 426415992...
OK
Uploading 1 files...
/home/jenkins/workspace/deployServiceJobs-i066861-gradle-dsl/GRADLE-DEPLOY-portal-cf-technical-support-i066861-gradle-dsl/target/portal-cf-technical-support.mtar
OK
Uploading 1 files...
/home/jenkins/workspace/deployServiceJobs-i066861-gradle-dsl/GRADLE-DEPLOY-portal-cf-technical-support-i066861-gradle-dsl/mta-prod.mtaext
OK
Starting deployment process...
OK
Monitoring process 427998041...
Validating parameters...
Processing MTA archive...
Processing MTA extension descriptors...
Detecting MTA major schema version...
MTA schema version: 3.1.0
Detecting deploy target...
Detected deploy target "SAP_PORTAL_SERVICES val"
Validating and merging descriptors...
Detecting deployed MTA...
No deployed MTA detected
Collecting system parameters...
New MTA version: 2.10.0-20181003140145+b39ccc1495f2101159987b982aa0693b6252459c
Building cloud deployment model...
Building cloud undeployment model...
Validating services to create...
Validating applications to deploy...
Deleting unused reserved routes...
Creating or updating services...
Preparing applications deployment...
Building cloud deployment model for application "portal-cf-technical-support"...
Checking application "portal-cf-technical-support"...
Application "portal-cf-technical-support" does not exist
Creating application "portal-cf-technical-support"...
Uploading application "portal-cf-technical-support"...
Matched files count: 112
Matched resources processed, total size is 9,943,750
Upload status: queued
Upload status: running
Upload status: running
Upload status: running
Upload status: running
Application "portal-cf-technical-support" uploaded
Scaling application "portal-cf-technical-support"...
Upload status: finished
Starting application "portal-cf-technical-support"...
Application "portal-cf-technical-support" staged
1 of 1 instances running (1 running)
Application "portal-cf-technical-support" started and available at "https://portal-cf-technical-support-val.cfapps.sap.hana.ondemand.com"
Publishing public provided dependencies for application "portal-cf-technical-support"...
Building cloud deployment model for application "portal-cf-health-check"...
Checking application "portal-cf-health-check"...
Application "portal-cf-health-check" does not exist
Creating application "portal-cf-health-check"...
Uploading application "portal-cf-health-check"...
Matched files count: 106
Matched resources processed, total size is 7,653,833
Upload status: queued
Upload status: running
Upload status: running
Upload status: running
Upload status: running
Application "portal-cf-health-check" uploaded
Scaling application "portal-cf-health-check"...
Upload status: finished
Starting application "portal-cf-health-check"...
Application "portal-cf-health-check" staged
1 of 1 instances running (1 running)
Application "portal-cf-health-check" started and available at "https://portal-cf-health-check-val.cfapps.sap.hana.ondemand.com"
Publishing public provided dependencies for application "portal-cf-health-check"...
Building cloud deployment model for application "portal-cf-technical-support-ar"...
Checking application "portal-cf-technical-support-ar"...
Application "portal-cf-technical-support-ar" does not exist
Creating application "portal-cf-technical-support-ar"...
Uploading application "portal-cf-technical-support-ar"...
Matched files count: 116
Matched resources processed, total size is 12,826,544
Upload status: queued
Upload status: running
Upload status: running
Upload status: running
Upload status: running
Upload status: finished
Application "portal-cf-technical-support-ar" uploaded
Scaling application "portal-cf-technical-support-ar"...
Starting application "portal-cf-technical-support-ar"...
Application "portal-cf-technical-support-ar" staged
0 of 1 instances running (1 starting)
1 of 1 instances running (1 running)
Application "portal-cf-technical-support-ar" started and available at "https://portal-cf-technical-support-ar-val.cfapps.sap.hana.ondemand.com"
Publishing public provided dependencies for application "portal-cf-technical-support-ar"...
Creating subscriptions...
Registering service URLs...
Deleting discontinued subscriptions...
Deleting discontinued published dependencies...
Unregistering discontinued service URLs...
Creating service brokers...
Updating subscribers...
Process finished.
Use "cf dmol -i 427998041" to download the logs of the process.

Jenkins CICD tool to deploy MTA projects with HDI Containers getting 502 Bad Gateway error in HCA

Description

we are facing this issue a lot of times between 8.30am CET and 9.30am CET. After 9.30 it is working again, can you help us to figure out and the solution of this issue. why it is not always working between 8.30 and 9.30
open source Jenkins CI.

And this not limited to one container and getting on multiple containers. kindly let us know solution approach

Error from Jenkins:
Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/d5f7cd21-9078-4ea4-9b31-52acdffbdaf1/service_bindings/42a44068-49be-4f09-8401-be7102208135

[2022-10-10T07:06:29.961Z] Error while binding service instance "hdi_ecc" to application "sc_r4r_db": Could not bind service "hdi_ecc" to application "sc_r4r_db": 502 Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/0e7bb3b0-a4c0-4358-81dc-030ee1f22d6e/service_bindings/31ad652b-2aef-4d8c-bff7-ea8bbfd859ae

[2022-10-10T07:06:29.961Z] Error while binding service instance "hdi_secobs" to application "sc_r4r_db": Could not bind service "hdi_secobs" to application "sc_r4r_db": 502 Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/a8f5867c-f6a6-4a56-8c89-64bcff0d60b9/service_bindings/c6d66994-dcaf-4abd-a6c2-d202bbc7a02b

[2022-10-10T07:06:29.961Z] Proceeding with automatic retry... (3 of 3 attempts left)

[2022-10-10T07:06:29.961Z] Binding service instance "hdi_sc_r4r" to application "sc_r4r_db"...

[2022-10-10T07:06:29.961Z] Binding service instance "hdi_ecc" to application "sc_r4r_db"...

[2022-10-10T07:06:29.961Z] Binding service instance "hdi_secobs" to application "sc_r4r_db"...

[2022-10-10T07:06:31.887Z] Error while binding service instance "hdi_r4r" to application "sc_r4r_db": Could not bind service "hdi_r4r" to application "sc_r4r_db": 502 Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/30e19cfc-c743-4807-8948-0121c2dacb27/service_bindings/2d9de929-3f1f-41e6-b08a-710c1c42e143

[2022-10-10T07:06:31.887Z] Error while binding service instance "hdi_sc_md" to application "sc_r4r_db": Could not bind service "hdi_sc_md" to application "sc_r4r_db": 502 Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/38e18e9d-dc26-4b10-8eaa-d63287531b4d/service_bindings/e1b57fe2-cccb-4e9a-928c-676b07bbc3c5

[2022-10-10T07:06:31.887Z] Proceeding with automatic retry... (2 of 3 attempts left)

[2022-10-10T07:06:32.151Z] Binding service instance "hdi_r4r" to application "sc_r4r_db"...

[2022-10-10T07:06:32.151Z] Binding service instance "hdi_sc_md" to application "sc_r4r_db"...

[2022-10-10T07:09:08.863Z] Error while binding service instance "hdi_sc_se" to application "sc_r4r_db": Could not bind service "hdi_sc_se" to application "sc_r4r_db": 502 Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/ddcaf5c8-1fbd-4461-96bc-ea2af62a169a/service_bindings/2350a3b0-ba43-4fc6-9634-e0bfbd9b32b1

[2022-10-10T07:09:08.863Z] Proceeding with automatic retry... (1 of 3 attempts left)

[2022-10-10T07:09:08.863Z] Binding service instance "hdi_sc_se" to application "sc_r4r_db"...

[2022-10-10T07:09:30.947Z] Error while binding service instance "hdi_secobs" to application "sc_r4r_db": Could not bind service "hdi_secobs" to application "sc_r4r_db": 502 Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/a8f5867c-f6a6-4a56-8c89-64bcff0d60b9/service_bindings/ff078ac7-2dee-4628-a3f5-fee9034468a0

[2022-10-10T07:09:30.947Z] Error while binding service instance "hdi_sc_r4r" to application "sc_r4r_db": Could not bind service "hdi_sc_r4r" to application "sc_r4r_db": 502 Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/d5f7cd21-9078-4ea4-9b31-52acdffbdaf1/service_bindings/af81acdf-d713-4a72-9de6-aa828059050b

[2022-10-10T07:09:30.947Z] Error while binding service instance "hdi_ecc" to application "sc_r4r_db": Could not bind service "hdi_ecc" to application "sc_r4r_db": 502 Bad Gateway: CF-ServiceBrokerBadResponse(10001): Service broker error: Service broker hana-broker failed with: could not reach service broker hana-broker at https://hana-broker.cf.eu20.hana.ondemand.com/v2/service_instances/0e7bb3b0-a4c0-4358-81dc-030ee1f22d6e/service_bindings/e861379b-cb73-45af-894a-084a389ef391

[2022-10-10T07:09:30.947Z] Process failed.

[2022-10-10T07:09:30.947Z] Use "cf deploy -i a0b7333f-4869-11ed-8d3a-eeee0a9741df -a abort" to abort the process.

[2022-10-10T07:09:30.947Z] Use "cf deploy -i a0b7333f-4869-11ed-8d3a-eeee0a9741df -a retry" to retry the process.

[2022-10-10T07:09:30.947Z] Use "cf dmol -i a0b7333f-4869-11ed-8d3a-eeee0a9741df" to download the logs of the process.

kindly let us know any further additional information required.

Thanks in Advance!

build_log.txt
operation_log.txt

Resolved descriptor uses wrong route if host definition is too long

Description

When a application has defined a host parameter which is too long (it looks like 64 characters are the boundary) and the definition of the provides property is using url: '${default-url}'
then the url will be truncated using the first 56 character of the host definition + 8 (random) characters.

See also resolved deployment descriptor in MAIN_LOG

"parameters" : {
  "default-url" : "https://000000000000000000000000000000000000000000000000000000000000000-more-than-64.cfapps.eu10.hana.ondemand.com",
  "default-uri" : "000000000000000000000000000000000000000000000000000000000000000-more-than-64.cfapps.eu10.hana.ondemand.com",
  "app-name" : "backend",
  "protocol" : "https",
  "domain" : "cfapps.eu10.hana.ondemand.com",
  "host" : "00000000000000000000000000000000000000000000000000000006ba5e791"
}

In the resolved deployment descriptor the MAIN_LOG also shows the resolved endpoint for the broker service configuration

"SBF_SERVICE_CONFIG" : "{\n  \"backend\": {\n    \"extend_credentials\": {\n      \"shared\": {\n        \"endpoints\": {\n          \"backend\": \"https://000000000000000000000000000000000000000000000000000000000000000-more-than-64.cfapps.eu10.hana.ondemand.com\"\n        }\n      }\n    }\n  }\n}\n"

But the resolved endpoint is not the defined route of the application.

Your environment

  • MultiApps CF CLI Plugin version - 2.1.2
  • which CF vendor is used - SAP (cfapps.eu10.hana.ondemand.com)

Steps to reproduce

I created a example project with this mta.yaml

ID: multiapps-deploy-bug
_schema-version: '3.1'
parameters:
  deploy_mode: html5-repo
version: 0.0.1

modules:
 - name: backend
   type: java
   path: backend
   parameters:
      host: 000000000000000000000000000000000000000000000000000000000000000-more-than-64
      memory: 1024M
   build-parameters:
      builder: maven
      timeout: 15m
      build-result: target/*.jar
   provides:
    - name: backend
      properties:
         url: '${default-url}'

 - name: broker
   type: nodejs
   path: broker
   parameters:
      host: ${app-name}-${space}
      memory: 1024M
      create-service-broker: true 
      service-broker-name: ${app-name}-${space}
      service-broker-user: "BrokerUser"
      service-broker-password: "SomeFancyBrokerPassword!"
      service-broker-url: ${default-url}
      service-broker-space-scoped: true
   build-parameters:
      ignore: [".gitignore", manifest.yml, "*.mtaext", "mta.*", "*.mtar", ".mta/"]
      timeout: 15m
   properties:
      SBF_CATALOG_SUFFIX: ${space}
      SBF_ENABLE_AUDITLOG: false
      SBF_BROKER_CREDENTIALS: >
        {
          "BrokerUser": "SomeFancyBrokerPassword!"
        }
      SBF_SERVICE_CONFIG: >
        {
          "backend": {
            "extend_credentials": {
              "shared": {
                "endpoints": {
                  "backend": "~{backend/url}"
                }
              }
            }
          }
        }
   requires:
   - name: backend
   - name: uaa
   - name: html5-host

resources:
 - name: uaa
   type: com.sap.xs.uaa
   parameters:
      service: xsuaa
      service-plan: broker
      shared: true
      config:
         xsappname: uaa-${space}
         tenant-mode: "dedicated"
         scopes:
         - name: "uaa.user"
           description: TODO what does this scope do?"
         role-templates:
         - name: "Token_Exchange"
           description: TODO what does this role template do?"
           scope-references:
           - uaa.user
 - name: html5-host
   type: org.cloudfoundry.managed-service
   optional: true
   parameters:
      service: html5-apps-repo
      service-plan: app-host

For the creation of the MTAR is used the Multi-Target Application Archive Builder in Version 1.1.19 from here

java -jar mta_archive_builder-1.1.19.jar --build-target=CF build

I created a new space and did the deploy

cf deploy multiapps-deploy-bug.mtar

The log for that was

Detected MTA schema version: "3"
No deployed MTA detected - this is initial deployment
Detected new MTA version: "0.0.1"
Service "uaa" exists but doesnt have any bound applications
Service "html5-host" exists but doesnt have any bound applications
Processing service "html5-host"...
Processing service "uaa"...
Updating service "uaa"...
Creating application "backend" from MTA module "backend"...
Uploading application "backend"...
Scaling application "backend" to "1" instances...
Staging application "backend"...
Application "backend" staged
Starting application "backend"...
Application "backend" started and available at "00000000000000000000000000000000000000000000000000000006ba5e791.cfapps.eu10.hana.ondemand.com"
Creating application "broker" from MTA module "broker"...
Uploading application "broker"...
Scaling application "broker" to "1" instances...
Staging application "broker"...
Application "broker" staged
Starting application "broker"...
Application "broker" started and available at "XXX"
Updating service broker "broker-cuh-test"...
Skipping deletion of services, because the command line option "--delete-services" is not specified.
Process finished.
Use "cf dmol -i 184392687" to download the logs of the process.

Additional information

The MAIN_LOG can be found here

Windows download broken?

when I try to install the cf-mta-plugin from https://tools.hana.ondemand.com/additional/cfcliplugin/cf-cli-mta-plugin-2.0.3-windows-x86_64.exe I get the following error:

cf-cli-mta-plugin-2.0.3-windows-x86_64.exe
panic: runtime error: index out of range

goroutine 1 [running]:
github.wdf.sap.corp/xs2ds/cf-mta-plugin/vendor/github.com/cloudfoundry/cli/plugin.Start(0xbd9b00, 0xc8e180)
/data/xmake/prod-build10010/w/xs2ds/xs2ds-cf-mta-plugin-OD-linuxx86_64/gen/go-workspace/go-path/src/github.wdf.sap.corp/xs2ds/cf-mta-plugin/vendor/github.com/cloudfoundry/cli/plugin/plugin_shim.go:16 +0x3c4
main.main()
/data/xmake/prod-build10010/w/xs2ds/xs2ds-cf-mta-plugin-OD-linuxx86_64/gen/go-workspace/go-path/src/github.wdf.sap.corp/xs2ds/cf-mta-plugin/mta_plugin.go:65 +0x4e

"'deployΒ my.mtar' is not a registered command" on MacOS

Description

Command $ cf deployΒ my.mtar -e my.mtaext on MacOS is returning following message

'deployΒ my.mtar' is not a registered command. See 'cf help -a'

Your environment

  • MultiApps CF CLI Plugin version - 2.6.2
  • which CF vendor is used - SAP

Steps to reproduce

Tell us how to reproduce this issue.
run command: $ cf deployΒ my.mtar -e my.mtaext

Additional information

multiapps usage from java

Description

I have a maven java project and I'm using https://github.com/cloudfoundry/cf-java-client to interact with my SCP Cloud foundry subaccount.

Is it possible to use the java client to deploy a mtar?

I know how to do it from command line using this plugin, but I'd like to integrate it into a java program. Is it possible (maybe a java version of the plugin)?

Your environment

  • MultiApps CF CLI Plugin version - 2.1.0
  • which CF vendor is used - SAP

Steps to reproduce

No info required it's not a bug :)

Additional information

Update just the resources with --all-resources

Description

With an older version of the multiapps plugin it was possible to just update resources inside an mta when doing the following:

mbt mtad-gen -t ./mta
cd mta; cf deploy --all-resources

With the newer version 2.6.3 cf deploy complains about the paths generated inside the mtad.yaml under modules. But with the option --all-resources, cf deploy should not validate the modules section at all.

It would be beneficial to have a chance to have the partial deployment feature available again to just update the resources and their configs without uploading and redeploying modules as well.

Error Output:

Error retrieving MTA: Error building MTA Archive: file path /Users/xxx/yyyy/Sources/zzz/mta/<module-path> not found

Your environment

  • MultiApps CF CLI Plugin version - 2.6.3
  • which CF vendor is used - SAP BTP CF Environment

"cf install-plugin multiapps -f" ends with error for Mac M2

Hello all,

I am trying to install multiapps plugin, however ending up with the below issue.

cf version: 8.5.0+73aa161.2022-09-12

As I run "cf install-plugin multiapps -f"

Searching CF-Community for plugin multiapps...
Plugin multiapps 3.0.1 found in: CF-Community
Attention: Plugins are binaries written by potentially untrusted authors.
Install and use plugins at your own risk.
Starting download of plugin binary from repository CF-Community...
14.81 MiB / 14.81 MiB [======================================================================================================================================================================] 100.00% 1s
fork/exec /Users/myuser/.cf/plugins/temp502599367/2641417804: bad CPU type in executable
File is not a valid cf CLI plugin binary.
FAILED

The only steps followed prior to that is logging into the cf environment.
The same steps applied on a Windows, and ended with success. But so far no luck for Mac M2.

I would so appreciate it if you could guide me through!

Best,
Merve

CF CLI Plugin -u option if no default multiapps-controller exists

Description

The -u option to specify a custom multiapps-controller url does not work if there is no multiapps-controller on any of the default routes expected by the CF CLI plugin. This is only an issue if the DEPLOY_SERVICE_URL env is not set.

Expected behavior

-u should work regardless of the existence of a default route multiapps-controller on the CF instance. To do so, the -u functionality should be triggered before the check for the default multiapps-controller URLs.

Internal Tracking Number:

LMCROSSITXSADEPLOY-1216

linux-arm64 support for multiapps plugin

Hello,

My team is working with CAP/CDS/MTA apps in an Ubuntu environment. Our development environment Mac Arm (M2). But to freeze on our component versions we are using a Ubuntu VM on Mac Arm 64. Thus we are using linux with Arm64.

This way we are able to maintain multiple VM instances for different state of applications. 2 of our applications are stuck with a prior version of CDS (5.x). Yes we understand we have to update those, but until then we have to support them.

So having this VM helps us maintain the state of VM Node/CDS/Component versions same as what is deployed in production landscape.

Now a simple challenge, we are unable to deploy the MTAR files from the same ubuntu. We are exporting the mtar's to host and deploying using CF there. And reason is CF CLI plugin for multiapps is not available for linux-arm64. Would it be possible to make that available, it will just make our life a little bit easier. Or how can we build it ?

Thank you

Partial deployment

Description

Currently deploy creates package from all resources and deploys all the content. But let's say I have many UI5 (or any other frontend) applications in one MTA package and I want to push only one of them (because the rest is unchanged). Is this possible/planned behaviour?

Currently I have one UI5 app per MTA but there is another problem with HTML5-Repository where I have to have separate ui deployer for each of this MTA packages, but this is another story.

Having all the applications within one MTA with all other resources would lead to quite a long term operation to push one simple change of the frontend code.

Regards
Michal

Recent release not available through cf-community

Description

I see the latest release here is 3.0.1 (Sep 30, 2022).
When I look for multiapps through cf-cli I can only find 2.7.0 (Nov 23, 2021).

d057156@M12VHYH70W ~ % cf repo-plugins | grep multiapps
multiapps                       2.7.0     MultiApps cli plugin performing multitarget application(MTA) operations in Cloud Foundry, such as deploying, removing, viewing etc.

Why have the releases not been published to cf-community for almost a year?

Your environment

  • Mac OS
  • CF-CLI version - 8.5.0
  • MultiApps CF CLI Plugin version - 2.7.0.
  • which CF vendor is used - SAP BTP

Parameter: health-check-timeout seems not to be set on deployment

Description

mtad like this:

- name: backend
  type: javascript.nodejs
  path: backend
  parameters:
    buildpack: https://github.com/cloudfoundry/nodejs-buildpack.git#v${nodejs-buildpack-version}
    disk-quota: 1G
    health-check-http-endpoint: /cfhealth
    health-check-timeout: 180 # seconds
    health-check-type: http
    instances: 1
    memory: 2G

Expected behaviour is the same as setting via CF CLI:

cf set-health-check backend http --invocation-timeout 180

Your environment

  • MultiApps CF CLI Plugin version - 2.6.2
  • which CF vendor is used - SAP BTP

Steps to reproduce

Try health-check parameters in mtad like from above

How to decrease deployment duration for complex MTA project

Description

We are using the plugin to deploy an MTA project containing a bunch of services and applications to Cloud Foundry. The deployment of our MTA project takes up to 30 minutes and we would like to know how we could decrease the deployment time. In the following an example mta.yaml which visualizes the complexity of our project.

_schema-version: "3.1"
ID: local.example
version: 0.0.6
description: An example MTA project

modules:
  - name: my-db
    type: nodejs
    path: db
    parameters:
      memory: 256M
      disk-quota: 256M
      routes:
      - route: db${url-delimiter}${app-url}.${domain}
    requires:
      - name: my-hdi-container
      - name: hdi-credentials
        properties:
          hdi_dynamic_deploy_user: ~{user}
          hdi_dynamic_deploy_password: ~{password}
    provides:
      - name: dynamic_db_deployment
        properties:
          url: ${protocol}://db${url-delimiter}${app-url}.${domain}
          user: ${generated-user}
          password: ${generated-password}

  - name: my-root
    type: java
    path: backend
    build-parameters:
      # disable adding this module into the mta archive for any target platform
      supported-platforms: []
      builder: maven
      maven-opts:
        command: ["clean", "install"]
      build-result: "**/target/*.war"
      timeout: 15m

  - name: my-frontend-api
    type: java
    path: backend/frontend-api
    parameters:
      memory: 1024M
      disk-quota: 256M
      routes:
        - route: frontend-api${url-delimiter}${app-url}.${domain}
    provides:
      - name: frontend-api
        properties:
          url: ${protocol}://frontend-api${url-delimiter}${app-url}.${domain}
    properties:
      TENANT_HOST_PATTERN: ${protocol}://%s${url-delimiter}${app-url}.${domain}

    build-parameters:
      builder: fetcher
      fetcher-opts:
        repo-type: maven
        repo-coordinates: "local.example:frontend-api:1.0-SNAPSHOT:war"
      requires:
        - name: my-root
    requires:
      - name: my-hdi-container
        properties:
          JBP_CONFIG_RESOURCE_CONFIGURATION: >-
            [tomcat/webapps/ROOT/META-INF/context.xml:
            {"service_name_for_DefaultDB" : "~{hdi-container-name}"}]
      - name: feature-flags
      - name: hdi-credentials
        properties:
          dynamic_db_deployment_user: ~{user}
          dynamic_db_deployment_password: ~{password}
      - name: dynamic_db_deployment
        properties:
          dynamic_db_deployment_url: ~{url}
          TENANT_DB_DEPLOY_URL: ~{url}
          TENANT_DB_DEPLOY_USER: ~{user}
          TENANT_DB_DEPLOY_PASSWORD: ~{password}

      - name: my-uaa
      - name: saas-registry
      - name: my-destination

  - name: my-partner-api
    type: java
    path: backend/partner-api
    parameters:
      memory: 1024M
      disk-quota: 256M
      routes:
      - route: partner-api${url-delimiter}${app-url}.${domain}
    provides:
      - name: partner-api
        properties:
          url: ${protocol}://partner-api${url-delimiter}${app-url}.${domain}
    build-parameters:
      builder: fetcher
      fetcher-opts:
        repo-type: maven
        repo-coordinates: "local.example:partner-api:1.0-SNAPSHOT:war"
      requires:
          - name: my-root
    requires:
      - name: my-hdi-container
        properties:
          JBP_CONFIG_RESOURCE_CONFIGURATION: >-
            [tomcat/webapps/ROOT/META-INF/context.xml:
            {"service_name_for_DefaultDB" : "~{hdi-container-name}"}]
      - name: feature-flags
      - name: hdi-credentials
        properties:
          dynamic_db_deployment_user: ~{user}
          dynamic_db_deployment_password: ~{password}
      - name: dynamic_db_deployment
        properties:
          dynamic_db_deployment_url: ~{url}
          TENANT_DB_DEPLOY_URL: ~{url}
          TENANT_DB_DEPLOY_USER: ~{user}
          TENANT_DB_DEPLOY_PASSWORD: ~{password}

      - name: my-broker-uaa

  - name: my-app-router
    type: nodejs
    path: appRouter
    parameters:
      memory: 128M
      app-name: my-app-router
    properties:
      TENANT_HOST_PATTERN: ^(.*)${url-delimiter}${app-url}.${domain}
    build-parameters:
      requires:
        - name: my-vue
          artifacts: ["target/frontend/*"]
          target-path: "resources/my"

    requires:
      - name: frontend-api
        group: destinations
        properties:
          name: my-frontend-api
          url: ~{url}
          forwardAuthToken: true
      - name: partner-api
        group: destinations
        properties:
          name: my-partner-api
          url: ~{url}
          forwardAuthToken: true
      - name: my-uaa
      - name: my-xsahaa
        group: destinations
        properties:
          name: my-xsahaa
          url: ~{url}
          forwardAuthToken: true

  - name: my-vue
    type: html5
    path: app
    build-parameters:
      builder: npm
      # disable adding this module into the mta archive for any target platform
      supported-platforms: []
      timeout: 15m

  - name: my-api-broker
    type: nodejs
    path: broker
    requires:
      - name: my-broker-uaa
      - name: partner-api
    parameters:
      memory: 128M
      disk-quota: 256M
      routes:
      - route: api-broker${url-delimiter}${app-url}.${domain}
    build-parameters:
      builder: npm
  
  - name: my-xsahaa
    type: java
    requires:
      - name: my-uaa
      - name: my-hdi-container

    properties:
      TARGET_RUNTIME: tomee
      USE_NAMED_USER: true
      SECONDARY_ROUTING_PERCENT: 0
    provides:
      - name: my-xsahaa
        properties:
          url: ${protocol}://xsahaa${url-delimiter}${app-url}.${domain}

    parameters:
      memory: 1024M
      routes:
      - route: xsahaa${url-delimiter}${app-url}.${domain}

    build-parameters:
      builder: fetcher
      fetcher-opts:
        repo-type: maven
        repo-coordinates: com.sap.xsahaa:java-xsahaa:1.5.6:war

resources:
  - name: my-hdi-container
    parameters:
      config:
        database_id: ${database-id}
    properties:
      hdi-container-name: "${service-name}"
    type: com.sap.xs.managed-hdi-container

  - name: my-uaa
    type: com.sap.xs.uaa-space
    parameters:
      path: security/xs-security.json
      service-plan: application

  - name: my-broker-uaa
    type: com.sap.xs.uaa-broker
    parameters:
      path: security/xs-broker-security.json
      service-plan: broker

  - name: my-destination
    type: destination

  - name: feature-flags
    type: org.cloudfoundry.managed-service
    parameters:
      service: feature-flags
      service-plan: standard
      path: feature-flags.json

  - name: hdi-credentials
    properties:
      user: ${generated-user}
      password: ${generated-password}

  - name: saas-registry
    type: org.cloudfoundry.managed-service
    parameters:
      service-plan: application
      service: saas-registry
      config:
        appId: ${xs-app-name}!t${provider-tenant-index}
        appName: ${xs-app-name}
        appUrls:
          onSubscription: https://frontend-api${url-delimiter}${app-url}.${default-domain}/callback/v1.0/tenants/{tenantId}
          getDependencies: https://frontend-api${url-delimiter}${app-url}.${default-domain}/callback/v1.0/dependencies
        displayName: ${saas-display-name}
        description: ${saas-description}

I hope this example mta.yaml gives enough context.

Your environment

  • MultiApps CF CLI Plugin version - 2.1.1
  • which CF vendor is used - SAP Cloud Platform
  • which backing services are used - SAP HANA

Steps to reproduce

Setup a project as described by the example mta.yaml and deploy it to the SAP Cloud Platform.

Provide an uninstall message

Running cf uninstall-plugin MtaPlugin

Results in an error:

Uninstalling plugin MtaPlugin...
Could not find command with name 'CLI-MESSAGE-UNINSTALL'
The plugin's uninstall method returned an unexpected error.
The plugin uninstall will proceed. Contact the plugin author if you need help.
exit status 1
FAILED

This also happens when you update the plugin, because it triggers an uninstall.

Error when uploading files

Description

When trying to run cf deploy on an mtar file 248 MB in size, the upload fails somewhere halfway with the following error:

Uploading 1 files...

<mtar file here>

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x4a1a92]
goroutine 164 [running]:
io.copyBuffer(0x0, 0x0, 0xa9faa0, 0xc0002ea330, 0xc000668000, 0x8000, 0x8000, 0xa9edc0, 0xc0000ac0a0, 0x0)
/usr/local/go/src/io/io.go:404 +0x1d2
io.Copy(...)
/usr/local/go/src/io/io.go:364
github.com/cloudfoundry-incubator/multiapps-cli-plugin/vendor/github.com/go-openapi/runtime/client.(*request).BuildHTTP.func1(0xc0002ae660, 0xc000716140, 0xc00013caf0)
/root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/vendor/github.com/go-openapi/runtime/client/request.go:140 +0x392
created by github.com/cloudfoundry-incubator/multiapps-cli-plugin/vendor/github.com/go-openapi/runtime/client.(*request).BuildHTTP
/root/go/src/github.com/cloudfoundry-incubator/multiapps-cli-plugin/vendor/github.com/go-openapi/runtime/client/request.go:113 +0x590

Your environment

  • MultiApps CF CLI Plugin version - 2.2.1 - the most recent, as of now
  • which CF vendor is used - SAP Cloud Platform

Latest release 2.6.1 not available in CF-Community Plugin Repo

Description

2.6.1 is not available for installation for darwin

Your environment

$ cf -v
cf Version 7.2.0+be4a5ce2b.2020-12-10
$ cf install-plugin multiapps
CF-Community nach Plug-in multiapps durchsuchen...
Plug-in multiapps 2.5.1 gefunden in: CF-Community
Plug-in multiapps 2.5.1 ist bereits installiert.
$ cf repo-plugins -r CF-Community |grep multiapps
multiapps                       2.5.1     MultiApps cli plugin performing multitarget application(MTA) operations in Cloud Foundry, such as deploying, removing, viewing etc.

Automatically download mta op logs after deployment

Description

After running a deployment, a message is displayed with information on how to download the mta op logs, i.e. mta dmol -i 12345. When I run a deployment on a CI server, I usually want to download the logs after deployment - especially if something goes wrong. However, parsing the logs of cf deploy to get the operation_id is hard.ΒΉ Manually downloading the logs with my personal user does not seem to work (the CI server uses a technical user for deployment).

Expected Behavior

When running cf deploy (or bg-deploy), I want to be able to pass a flag to automatically download the logs after the deployment is finished. The flag could look like this:

cf deploy my.mta --download-mta-op-logs ON_FAILURE
cf deploy my.mta --download-mta-op-logs ALWAYS

This way, manually fiddling around with the operation_id would not be necessary anymore in both CI and manual deployment scenarios.

The parameter -d of cf dmol to specify the directory to store the logs to is not used by cf deploy, so it could be used there as well.

Thank you for considering this enhancement!


ΒΉ Especially, if you use the excellent SAP jenkins-library, where getting the stdout would require quite some refactoring (source), as you can't use returnStdout and returnStatus at the same time.

minor - print target on cf undeploy

Description

Hi,

minor but long time wish, could you add the target org/space on the confirmation prompt?

cf undeploy <foo> --delete-services

Really undeploy multi-target app <foo> ? (y/n)> 

As this is a irrevocable action and often using bash in parallel session, I'd usually cancel and verify once again
with cf target that I'm currently in the correct space

Expected Result

cf undeploy <foo> --delete-services

Really undeploy multi-target app <foo> in org <org> / space <space> ? (y/n)> 

Thanks!
Andre

Unable to install multiapps plugin thanks to CLI on a windows machine

Description

Failed (i/o timeout error) during plugin "multiapps-plugin.win64" installation

Your environment

Steps to reproduce

  1. Try to download multiapps plugin from this URL :
    https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/releases/tag/v2.1.1/multiapps-plugin.win64

2)I ran the command below :
V:>cf install-plugin multiapps -f
Searching CF-Community for plugin multiapps...
Plugin multiapps 2.1.1 found in: CF-Community
Attention: Plugins are binaries written by potentially untrusted authors.
Install and use plugins at your own risk.
Starting download of plugin binary from repository CF-Community...
Get https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/releases/download/v2.1.1/multiapps-plugin.win64: dial tcp 140.82.118.3:443: i/o timeout
FAILED

Thanks in advance for your support.

Kind Regards

ERR error obtaining VCS status: exit status 128

Description

Currently, we are deploying our Golang application with GOVERSION 1.17 fixed in the mta.yaml, unfortunately, after updating our version of Golang in the service to 1.19, we started receiving errors in the staging phase of the deployment that some of our vendored dependencies are using "undefined any" which is due to new alias "any" for "interface{}" introduced in Go 1.18, which our dependencies have consumed. Changing the version in the mta.yaml to higher 1.19 or removing it (using default for the buildpack - 1.18.6) fixes this issue, but another one occurs:

   2022-11-10T14:22:21.97+0200 [STG/0] OUT -----> Running: go install -tags cloudfoundry -buildmode pie github.wdf.sap.corp/cs-v2/gbaas-service/cmd/admin-api
   2022-11-10T14:22:22.17+0200 [STG/0] ERR error obtaining VCS status: exit status 128
   2022-11-10T14:22:22.17+0200 [STG/0] ERR Use -buildvcs=false to disable VCS stamping.

We tried to provide the flag with the properties GOFLAGS: "-buildvcs=false" , but it did not make any change. So we tried to dig further into the issue and we created a manifest.yaml for the application and we were able to deploy it directly with the cf push command while building (mbt build) with the same config using mta.yaml and deploying the archive via cf deploy leads to the error above.
Configuration files:
manifest.yaml

applications:
  - name: gbaas-admin-api-go-tmp
    command: admin-api
    env:
      GOPACKAGENAME: github.wdf.sap.corp/cs-v2/gbaas-service
      GO_INSTALL_PACKAGE_SPEC: "github.wdf.sap.corp/cs-v2/gbaas-service/cmd/admin-api"

mta.yaml

name: gbaas-admin-api-go
    type: go
    path: gbaas-service
    parameters:
      instances: 1
      memory: 512M
      disk-quota: 1G
      buildpack: go_buildpack
    provides:
      - name: gbaas-admin-api-go-provides
        properties:
          url: "${default-url}"
    requires:
      - name: gbaas-xsuaa
      - name: gbaas-firebase
      - name: gbaas-logging
      - name: atc-hana
      - name: gbaas-ans
      - name: auditlog-write-mtls
        parameters:
          config:
            xsuaa:
              credential-type: x509
              x509:
                key-length: 2048
                validity: 6
                validity-type: MONTHS
    properties:
      GOPACKAGENAME: github.wdf.sap.corp/cs-v2/gbaas-service
      GO_INSTALL_PACKAGE_SPEC: github.wdf.sap.corp/cs-v2/gbaas-service/cmd/admin-api

Your environment

mbt --version Output: Cloud MTA Build Tool version 1.2.19
cf version Output: cf version 6.53.0+8e2b70a4a.2020-10-01
go version Output: go1.19 darwin/amd64

Additional information

LOGS:

   2022-11-10T14:22:14.49+0200 [API/34] OUT Creating build for app with guid 46354974-53c4-4c2b-8f42-463d2a89430c
   2022-11-10T14:22:15.09+0200 [STG/0] OUT Downloading go_buildpack...
   2022-11-10T14:22:15.12+0200 [STG/0] OUT Downloaded go_buildpack
   2022-11-10T14:22:15.12+0200 [STG/0] OUT Cell c669776d-25b4-4c82-a0ba-62fc1843b071 creating container for instance d91d4fea-b82b-4118-a2ed-7eb558265547
   2022-11-10T14:22:15.95+0200 [STG/0] OUT Cell c669776d-25b4-4c82-a0ba-62fc1843b071 successfully created container for instance d91d4fea-b82b-4118-a2ed-7eb558265547
   2022-11-10T14:22:16.33+0200 [STG/0] OUT Downloading app package...
   2022-11-10T14:22:16.92+0200 [STG/0] OUT Downloaded app package (8.8M)
   2022-11-10T14:22:17.00+0200 [STG/0] OUT -----> Go Buildpack version 1.9.50
   2022-11-10T14:22:17.00+0200 [STG/0] OUT -----> Installing godep 80
   2022-11-10T14:22:17.00+0200 [STG/0] OUT Copy [/tmp/buildpacks/22f3b852cb23fa62d8a9365162190e01/dependencies/650037567872002060584f44e88127be/godep_80_linux_x64_cflinuxfs3_08722ddc.tgz]
   2022-11-10T14:22:17.13+0200 [STG/0] OUT -----> Installing glide 0.13.3
   2022-11-10T14:22:17.13+0200 [STG/0] OUT Copy [/tmp/buildpacks/22f3b852cb23fa62d8a9365162190e01/dependencies/f5e4affa54f8cf8e22cf524de5165a6e/glide-v0.13.3-linux-x64-cflinuxfs3-ef07acb5.tgz]
   2022-11-10T14:22:17.27+0200 [STG/0] OUT -----> Installing dep 0.5.4
   2022-11-10T14:22:17.27+0200 [STG/0] OUT Copy [/tmp/buildpacks/22f3b852cb23fa62d8a9365162190e01/dependencies/f1900fcb2de60a12ea6743ecf05e14d2/dep-v0.5.4-linux-x64-cflinuxfs3-79b3ab9e.tgz]
   2022-11-10T14:22:17.43+0200 [STG/0] OUT -----> Installing go 1.18.6
   2022-11-10T14:22:17.43+0200 [STG/0] OUT Copy [/tmp/buildpacks/22f3b852cb23fa62d8a9365162190e01/dependencies/ee4bbc049516f78ddaf10b1fd3ae2b17/go_1.18.6_linux_x64_cflinuxfs3_99d9063d.tgz]
   2022-11-10T14:22:21.97+0200 [STG/0] OUT -----> Running: go install -tags cloudfoundry -buildmode pie github.wdf.sap.corp/cs-v2/gbaas-service/cmd/admin-api
   2022-11-10T14:22:22.17+0200 [STG/0] ERR error obtaining VCS status: exit status 128
   2022-11-10T14:22:22.17+0200 [STG/0] ERR Use -buildvcs=false to disable VCS stamping.
   2022-11-10T14:22:22.17+0200 [STG/0] OUT **ERROR** Unable to compile application: exit status 1
   2022-11-10T14:22:22.53+0200 [STG/0] ERR Failed to compile droplet: Failed to run finalize script: exit status 12
   2022-11-10T14:22:22.53+0200 [STG/0] OUT Exit status 223
   2022-11-10T14:22:23.11+0200 [STG/0] OUT Cell c669776d-25b4-4c82-a0ba-62fc1843b071 stopping instance d91d4fea-b82b-4118-a2ed-7eb558265547
   2022-11-10T14:22:23.11+0200 [STG/0] OUT Cell c669776d-25b4-4c82-a0ba-62fc1843b071 destroying container for instance d91d4fea-b82b-4118-a2ed-7eb558265547
   2022-11-10T14:22:23.30+0200 [API/106] ERR Failed to stage build: staging failed
   2022-11-10T14:22:24.12+0200 [STG/0] OUT Cell c669776d-25b4-4c82-a0ba-62fc1843b071 successfully destroyed container for instance d91d4fea-b82b-4118-a2ed-7eb558265547

BuildpackCompileFailed - App staging failed in the buildpack compile phase

Description

During deployment of mtar archive, the following message appears during the staging of the app:

BuildpackCompileFailed - App staging failed in the buildpack compile phase

Your environment

  • MultiApps CF CLI Plugin version - 2.7.0
  • which CF vendor is used - SAP
  • which backing services are used - destination, connectivity, HTML5-repo

Steps to reproduce

Tell us how to reproduce this issue.
Simply run cf deploy with our mtar file:)

Additional information

The logs are showing the following error:
#2.0#2022 08 24 12:38:36.291#Z#ERROR#com.sap.cloud.lm.sl.xs2.717288e0-23a9-11ed-9492-eeee0a8777a7.OPERATION.stageAppTask#
######org.cloudfoundry.multiapps.controller.persistence.services.ProcessLogger########flowable-async-job-executor-thread-1939###
Exception caught#

org.cloudfoundry.multiapps.common.SLException: A step of the process has failed. Retrying it may solve the issue.
at org.cloudfoundry.multiapps.controller.process.steps.SyncFlowableStep.executeInternal(SyncFlowableStep.java:77) ~[multiapps-controller-process-1.139.2.jar:?]
at org.cloudfoundry.multiapps.controller.process.steps.SyncFlowableStep.lambda$execute$0(SyncFlowableStep.java:65) ~[multiapps-controller-process-1.139.2.jar:?]
at org.cloudfoundry.multiapps.controller.core.util.LoggingUtil.logWithCorrelationId(LoggingUtil.java:14) ~[multiapps-controller-core-1.139.2.jar:?]
at org.cloudfoundry.multiapps.controller.process.steps.SyncFlowableStep.execute(SyncFlowableStep.java:65) ~[multiapps-controller-process-1.139.2.jar:?]
at org.flowable.engine.impl.delegate.invocation.JavaDelegateInvocation.invoke(JavaDelegateInvocation.java:35) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.delegate.invocation.DelegateInvocation.proceed(DelegateInvocation.java:32) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.delegate.invocation.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:26) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.bpmn.behavior.ServiceTaskDelegateExpressionActivityBehavior.execute(ServiceTaskDelegateExpressionActivityBehavior.java:157) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeActivityBehavior(ContinueProcessOperation.java:313) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.executeSynchronous(ContinueProcessOperation.java:170) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.continueThroughFlowNode(ContinueProcessOperation.java:125) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.agenda.ContinueProcessOperation.run(ContinueProcessOperation.java:88) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.common.engine.impl.AbstractEngineConfiguration.lambda$new$0(AbstractEngineConfiguration.java:173) ~[flowable-engine-common-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:97) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:81) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:64) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:26) ~[flowable-engine-6.6.0.jar:6.6.0]
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.6.0.jar:6.6.0]
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:83) ~[flowable-engine-common-6.6.0.jar:6.6.0]
at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:57) ~[flowable-spring-common-6.6.0.jar:6.6.0]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) [spring-tx-5.3.20.jar:5.3.20]
at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:57) [flowable-spring-common-6.6.0.jar:6.6.0]
at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) [flowable-engine-common-6.6.0.jar:6.6.0]
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) [flowable-engine-common-6.6.0.jar:6.6.0]
at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) [flowable-engine-common-6.6.0.jar:6.6.0]
at org.flowable.job.service.impl.asyncexecutor.ExecuteAsyncRunnable.executeJob(ExecuteAsyncRunnable.java:127) [flowable-job-service-6.6.0.jar:6.6.0]
at org.flowable.job.service.impl.asyncexecutor.ExecuteAsyncRunnable.run(ExecuteAsyncRunnable.java:115) [flowable-job-service-6.6.0.jar:6.6.0]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
at java.lang.Thread.run(Unknown Source) [?:?]

Here are the full downloaded logs:
OPERATION.log
roiable-idmux.log

Introduce β€œ--delete-all” option which deletes all MTA managed runtime artifacts

Description

Someone administrating an MTA might not always know what entities were created during the cf deploy. In particular, he might not know if there are service instances or service brokers created.

Thus, it's proposed to have a --delete-all option for cf undeploy to get rid of everything that was created during cf deploy. Thus, so he can be sure that no manual cleanup is necessary afterwards.

Expected behavior

The --delete-all option should act the same as providing --delete-services --delete-service-brokers to the undeploy command.

An example usage would be:
cf undeploy my.example.mta --delete-all

Internal Tracking Number:

LMCROSSITXSADEPLOY-546

how to: configure mtar so that after deployment specific operations done to start service

Description

I'be built an mtar using mbt and have tried to deploy it with cf deploy.
While it is a java application, is not a springboot and it has many dependencies. Therefore I've built a zip . For the deployment, that zip has to be unzipped and then a specific commandline has to be executed. I do not know where to specify this behavor.

Your environment

  • MBT version 0.2.10
  • MultiApps CF CLI Plugin version - 2.1.1
  • which CF vendor is used - cf version 6.39.1+efdd631d2.2018-09-18

Delete backend services in order of dependency.

Description

Hello everyone,

when you undeploy an application (and want to also eliminate its bound services) using cf undeploy --delete-services, the services seem to be deleted in arbitrary order and this leads to the process not working as expected, as some services have other dependencies on other services and the process is likely to fail because the deletion order is arbitrary. Is there a way to specify exactly in which order the services should be deleted? many thanks

Additional question:

Your environment

  • MultiApps Controller version - 2.1.3
  • MultiApps CF CLI Plugin version - cf version 6.45.0+5f9ff16f9.2019-06-03
  • which CF vendor is used - SAP
  • which backing services are used - destination, html5-apps-repo, managed-hana, application-logs, portal, html5-apps-repo, saas-registry, xsuaa

Steps to reproduce

Tell us how to reproduce this issue.
cf undeploy testapp --delete-services

dmol does not create .log files

Description

Most of the IDEs & Text Editors have a syntax highlighting for log files.
It is a little bit annoying to add always the .log file extension to the downloaded log files after
a cf dmol -i 123.

Your environment

  • MultiApps CF CLI Plugin version - 2.1.2
  • which CF vendor is used - SAP/SCP

Steps to reproduce

After deployment the stdout is

Process finished.
Use "cf dmol -i 123" to download the logs of the process.

When downloading the logs the MAIN_LOG and all other log files do not have the log file suffix.
It should be MAIN_LOG.log

Unable to install the plugin on a windows machine

Description

Failed to install mta_plugin_windows_amd64.exe

Your environment

  • MultiApps CF CLI Plugin version - v2.0.8
  • which CF vendor is used - SAP

Steps to reproduce

  1. Downloaded the plugin from https://github.com/cloudfoundry-incubator/multiapps-cli-plugin/releases/download/v2.0.8/mta_plugin_windows_amd64.exe
  2. ran the below command

D:\cf>cf install-plugin d:\mta_plugin_windows_amd64.exe -f
Attention: Plugins are binaries written by potentially untrusted authors.
Install and use plugins at your own risk.
dial tcp 127.0.0.1:53128: socket: An invalid argument was supplied.
exit status 1
File is not a valid cf CLI plugin binary.
FAILED

Progress information on upload of MTA archive and other files

Description

Currently the CF CLI plugin does not show the progress of the file uploads done to the multiapps-controller in any way when executing the cf deploy command. A good enhancement would be to provide such functionality as some MTA Archives are big in size and usually take a while to upload.

Expected behavior

Provide some sort of progress information in the CF CLI's output that tracks the file upload of the archive and extension descriptors (if any).

Internal Tracking Number:

LMCROSSITXSADEPLOY-178

File is not a valid cf CLI plugin binary (CF-CLI v8.6.1 / Docker)

Hey there,

I got the following issue with the docker image cloudfoundry/cli:8 (v8.6.1+b5a352a.2023-02-27). Am I missing something or isn't this supposed to run with this version?

Using Kubernetes executor with image cloudfoundry/cli:8 ...

$ cf --version
cf version 8.6.1+b5a352a.2023-02-27

$ cf install-plugin -r CF-Community "multiapps" -f
Searching CF-Community for plugin multiapps...
Plugin multiapps 3.0.2 found in: CF-Community
Attention: Plugins are binaries written by potentially untrusted authors.
Install and use plugins at your own risk.
Starting download of plugin binary from repository CF-Community...
 0 B / 15.44 MiB    0.00%
 15.44 MiB / 15.44 MiB  100.00% 0s
fork/exec /root/.cf/plugins/temp1[31] 5574591/1195806702: no such file or directory
File is not a valid cf CLI plugin binary.
FAILED

BR
Lexip

CLI parameter to overwrite MTA parameters

Description

Hi everyone,

In my project, I have a resource which needs to be passed a secret token during deployment. This is why I wouldn't want to put the token into the repository as part of mta or extension (even if putting credentials into the extension seems to be recommended), but inject it to the cf deploy command from the CD pipeline.

As a workaround, we've currently modeled the resource as existing-service and manually create the service instance. For dev-spaces, however, we'd like to use a development plan of the service, which doesn't need the secret token. However, we still have to manually create the service, as we can't change the resource type to managed-service from the mta extension.

In an ideal world, I would be able to, in my mta.yaml (or any extension), specify a parameter like this:

ID: test
_schema-version: 3.3.0
version: 0.0.0

parameters:
  secret: fillme

resources:
  ...

In the CLI, I would only now need to be able to overwrite the parameters via an additional CLI parameter, e.g.:

cf deploy my.mtar --parameter secret=thesecret

Would it be possible to add such a feature?
I've checked cf help deploy but didn't find any hint into this direction...

I don't know if server-side support is necessary here, but in the worst case the CLI could generate an transient mta extension with the parameters and just send it along.

Thank you very much for your support!
Kind regards
Lukas

Config files used in extensions are not uploaded

Description

We have created an mta extension which makes use of the feature include external configurations. E.g. like this:
_schema-version: '3.2.0'
extends: fdc-cf-service
ID: fdc-cf-service.mTLS
modules:

  • name: service
    requires:
    • name: ui5-flexibility-design-and-configuration-xsuaa
      parameters:
      config-path: x509Binding.json

We expect that the deployer detects the used json files and uploads them and they are merged into the final mta.
However this did not work. In the console we have seen that only the extension got uploaded but not the config.json.
Also the parameters have not been in place. I have seen in the deploy log, that it got ignored.
The deploy service seems to ignore the missing referenced file silently and did not fail. In case this is a not supported feature we would have expected an error message.

Your environment

  • MultiApps CF CLI Plugin version - 2.7.0
  • which CF vendor is used - SAP BTP on AWS (EU10 Canary)

Steps to reproduce

Tell us how to reproduce this issue.
Have an MTA + an extension which uses an external config
Build the MTA
Deploy the MTA with the extension
=> The external config is not used

Additional information

If an multi-target app operation fails, download logs of the operation and provide them as a GIST(s). For more details, see download-mta-op-logs / dmol command provided by CF MTA Plugin. The most important log file is MAIN_LOG.

https://gist.github.com/MatthiasSchmalz/e68e25c71df0177efb862fbaeeaae2b5

Exclude single apps from blue / green deployment

Description

Hi,
Working on a project with multiple apps and aiming for a zero downtime deployment, I stumbled across two questions:

  • Is it possible to exclude a single app from the blue / green mechanism provided by bg-deploy?
    We are using an approuter to maintain the active user sessions. While deploying a new version of the other apps we would like to keep it stable and avoid a restart to keep all session alive.
  • Is it possible to define a 'cool down' period for a single app?
    Currently the re-routing is bound to the deletion of the old version. As there could be long running, asynchronous task on the old instance it would be beneficial to keep it alive for some amount of time while the new version already handles the incoming requests.

The only workaround I identified was aborting the bd-deploy during the evaluation phase and handling the process afterwards manually. This leaves the problem, that the stable approuter does not fit the alternating naming convention (*_green <-> *_blue) and a second deployment does not work. Are there any features existing or planned to allow such behavior?

Your environment

  • MultiApps CF CLI Plugin version - 2.2.1

Issue with the new blue-green strategy

Description

When using the new blue-green strategy with deploy the process goes as follows:

  1. Rename any existing application and suffix "-live" to the app-name
  2. Create new application with of the newer version to be deployed with name "-idle"
  3. Bind services to the app
  4. Upload application/module "-idle"
  5. Stage and start the application
  6. If application starts successfully, then rename the application and remove the "-idle" suffix
  7. Stop and remove old "-live" suffixed app
  8. Cleanup

We are facing 2 issues with this approach:

  • When the application "-idle" is renamed and this prefix is removed, this new name does not flow down to Kibana (and probably many other bound services which depend on the application name). In kibana we still see the application name with the "-idle" prefix
  • If we use the "Cross-MTA Dependencies" feature we face the following error:
17:12:49 Could not update application "my-app-idle" from MTA "my-app-mta-id" for subscription "shared-subscription": 404 Not Found: Application my-app-idle not found.

Your environment

  • MultiApps CF CLI Plugin version - 2.7.0
  • which CF vendor is used - SAP CP CF

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.