
You can create and deploy a Multitarget Application (MTA) in the Cloud Foundry (CF) environment as described below by following different approaches that can yield the same result:
Using the Business Application Studio (BAS).
Using the Cloud MTA Build Tool.
Manually.
In this post, we focus on the second method using the Cloud MTA Build Tool.
If you've had the deployment-ready MTA archive.mtar file, please ignore this section and jump to the next section Deploy MTA.
We use the Cloud MTA Build Tool to build MTA. It is a standalone command-line tool that builds a deployment-ready MTA archive .mtar file from the artifacts of an MTA project according to the project’s MTA development descriptor (mta.yaml file), or from the module build artifacts according to the MTA deployment descriptor (mtad.yaml file).
If you previously used the Multitarget Application Archive Builder for building your MTA projects, see the topic: differences between the tools.
Due to the deprecation of the shared domains, the URL of the SAP Cloud Platform Deployment service should be specified by each MTA developer. You can do this by exporting the environment variable MULTIAPPS_CONTROLLER_URL.
For example (Linux):
export MULTIAPPS_CONTROLLER_URL=deploy-service.cfapps.<landscape-domain>
Where, the <landscape-domain> can be found by executing CF command, which is the suffix part of api.cf:
cf api
% cf api
api endpoint: https://api.cf.cn40.platform.sapcloud.cn
api version: 3.88.0
For the landscape in the BTP China (live), the command is:
export MULTIAPPS_CONTROLLER_URL=deploy-service.cfapps.cn40.platform.sapcloud.cn
After the removal of shared domains, the Deployment service will not resolve the ${default-domain} placeholder on Alibaba Cloud. If the placeholder is being used, you should change it to ${domain} placeholder and additionally specify a domain for each module. Alternatively, the routes parameter could be used which requires the domain to be part of the route.
For example:
Before removal of shared domains on Alibaba Cloud:
ID: example-mta modules: - name: example1 type: javascript.nodejs properties: some-example-property: bar.${default-domain} another-property: baz.${default-domain}
After removal of shared domains on Alibaba Cloud:
ID: example-mta modules: - name: example1 type: javascript.nodejs parameters: domain: <your.domain.com> properties: some-example-property: bar.${domain} another-property: baz.${domain}
Usage of routes parameter after removal of shared domains on Alibaba Cloud:
ID: example-mta modules: - name: example1 type: javascript.nodejs parameters: routes: - route: <example-host.your.domain.com>
Besides, for blue-green deployment (bg-deploy command), you should specify the idle-domainparameter or theidle-domainsparameter.
Example withidle-domain parameter:
ID: example-mta modules: - name:... parameters: idle-domain: "<your.idle.domain>"
Example withidle-domains parameter:
ID: example-mta modules: - name:... parameters: idle-domains: ["<first.idle.domain>","<second.idle.domain>"]
cf deploy <MTA_ARCHIVE>|<DIRECTORY_PATH> [-e <EXT_DESCRIPTOR_1>[,<EXT_DESCRIPTOR_2>]] [-u <URL>] [-t <TIMEOUT>] [-v <VERSION_RULE>] [--no-start] [--namespace] [--delete-services] [--delete-service-keys] [--delete-service-brokers] [][--keep-files] [--no-restart-subscribed-apps] [--do-not-fail-on-missing-permissions]
For example:
cf deploy <xxx.mtar> -f
List the deployed mta:
cf mtas cf mta <MTA-ID>
List app status and attributes:
cf app <app-name>
For more details on MTA demos and references, please visit Github repository: cf-mta-examples
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
19 | |
19 | |
15 | |
9 | |
9 | |
8 | |
7 | |
6 | |
6 | |
6 |