Series – TMS:
With this integration, your fully qualified Multitarget Application (MTA) archive gets automatically handed over to the SAP BTP Transport Management service (TMS), along the following typical process flow:
Two separate subaccounts (for Pre-PROD Node and PROD Node)
Github repository for a MTA application
Entitlements:
Transport Management service (can be provisioned to any single one subaccount, called TMS Subaccount in this post):
Service | Plan | Category |
Cloud Transport Management | standard | Service |
Cloud Transport Management | standard (Application) | Application |
Cloud Foundry Runtime (both Pre-PROD subaccount and PROD subaccount)
Service | Plan | Category |
Cloud Foundry Runtime | memory | Service |
Continuous Integration & Delivery service (for SAP CI/CD)
Service | Plan | Category |
Continuous Integration & Delivery | default (Application) | Application |
Please follow this guide to set up your TMS environment: https://help.sap.com/viewer/7f7160ec0d8546c6b3eab72fb5ad6fd8/Cloud/en-US/8d9490792ed14f1bbf8a6ac08a6...
Transport destinations (for deployment) needs to be set for each node which is planned to deploy the application. In this scenario, we should configure transport destinations for both Pre-PROD Node and PROD Node.
In SAP BTP Cockpit of the subaccount with TMS provisioned, choose Connectivity -> Destinations -> New Destination .
Fill in with the following information:
Field | Value | Description |
Name | PrePROD_Node | For example. |
Type | HTTP | |
URL | https://deploy-service.cfapps.<default-domain>/slprot/<myorg>/<myspace>/slp. | As a result, the MTA is deployed into the space <myspace> of the organization <myorg>. The default domain can be found in the API Endpoint. For example (BTP@AliCloud): https://deploy-service.cfapps.cn40.platform.sapcloud.cn/slprot/beta-support_testagain-75bwmerz/tms/s... |
Authentication | BasicAuthentication | |
User | Specify the name of the technical user that is used for the deployment. The technical user used for the destination must be a valid user on Cloud Foundry environment, and it must have the role SpaceDeveloper in the target space. | |
Password |
For example:
Click Save.
Click Check Connection, it will return 200: OK
For more details, please read: Create Transport Destinations
The same as above.
For example:
In Cloud Transport Management, transport nodes represent source and target end points of a deployment process - for example, a Cloud Foundry subaccount. Transports take place between transport nodes.
Make sure you have one of the roles Administrator or LandscapeOperator assigned to your user.
You have the following options to create transport nodes:
Choose Landscape Visualization from the navigation pane, and then click button + (Create a Node).
Choose Landscape Wizard from the navigation pane, then select a template for your landscape, and create your transport nodes as part of the process.
Choose Transport Nodes from the navigation pane, and click button + (Create a new node).
In this post, we create node with option Transport Nodes.
Open the Transport Management home screen:
Navigate to Transport Nodes, click button + (Create a new node):
Fill in with the following information:
Since we need to manually upload MTA into the PrePROD_Node, select the Allow Upload to Node checkbox.
We need to set the Destination so as to deploy the application into corresponding space.
Click OK.
For more details, please read: Create Transport Nodes
Create a new one and fill in with the following information:
We need to set the Destination so as to deploy the application into corresponding space.
You can use the same transport node as a source node for multiple transport routes. However, you can use the same transport node only once as a target node for a transport route.
You have the following options to create transport nodes:
Choose Landscape Visualization from the navigation pane, and then choose Create a Route, or select a transport node and choose Create Route from the side menu.
Choose Landscape Wizard from the navigation pane, then select a template for your landscape, and create your transport routes as part of the process.
Choose Transport Routes from the navigation pane, and choose Create a route.
In this post, we create node with option Transport Routes.
On your SAP Cloud Transport Management home screen, click button + (Create a route):
Fill in with the following information:
Click OK.
For more details, please read: Create Transport Routes
Go to your subaccount in SAP BTP and navigate to the Service Marketplace. Find the Continuous Integration & Delivery Service.
Subscribe to the service.
Assign the Role Collections to your user.
Click Go to application to open the console.
Navigate to the Credentials tab, create credential for Github.
Hint: access tokens can be created in GitHub by going to Settings -> Developer Settings
Navigate to the Repositories tab, add your repository into the service.
In this step we will configure the Github Webhook by entering the CI/CD endpoint URL and credentials. This will allow Github to notify SAP CI/CD service that there are code changes in repository.
To create a webhook in GitHub, you need some data that has been automatically created during the previous step. You can find this data (Payload URL and Secret) when you open the detail view of an existing repository in the Repositories tab:
Copy the Payload URL and Secret:
In your Github repository, switch to the Settings tab. Find the Webhooks in the navigation bar, click Add webhook to do the configuration:
Paste the Payload URL and Secret into the webhook, select content type as application/json:
For the field Pipeline, choose SAP Cloud Application Programming Model.
In the Stages tab, choose Job Editor from the Configuration Mode dropdown list. Alternatively, you can choose the Source Repository, where you can configure the pipeline steps in source code and the configuration file can be found in .pipline/config.yml.
Click Create.
In the TMS Subaccount, create or find the service key for your TMS instance. Click button Copy JSON.
In the CI/CD service, create a new credential for TMS instance, paste the copied service key in it.
Open the Job you created previously, navigate to the Stages tab, find the button Upload to Cloud Transport Management, open it and fill in all fields. Where, Node Name is the name of the source node you configured in the TMS dashboard.
Trigger the pipeline by clicking the button as shown in the screenshot below or making changed in your repository:
You can monitor the execution status of your pipeline. Once it returns SUCCESS, which means the MTA archive has been uploaded into your TMS tenant, PrePROD_Node.
In Cloud Transport Management, the upload process will create a transport request and attach the content archive to it, so that it will be available in the import queue of the PrePROD_Node for import (deploy) into the Pre-PROD subaccount. After being imported in the Pre-PROD subaccount, it is available in the import queue of the PROD_Node for import (deploy).
Go into the PrePROD_Node, select the transport request and click Import Selected, the content archive will be imported (deployed) into Pre-PROD subaccount and immediately transported into the PROD_Node:
If this action is executed successfully, it means the application has been successfully deployed into the Pre-PROD subaccount. At the same time, the content archive has been transported to the import queue of the PROD_Node.
Check the deployed application in the space of the Pre-PROD subaccount:
Now you can see the transport request in the import queue of the PROD_Node. In the PROD_Node, select the transport request and click Import Selected, the content archive will be imported (deployed) into PROD Subaccount.
Check the deployed application in the space of the PROD Subaccount:
Now the whole CI/CD-triggered transportation process has been finished.
How to integrate SAP Cloud Transport Management into your CI/CD pipeline
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 | |
10 | |
7 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |