Download CTMS transport logs by using Cloud Foundry CL

Estimated read time 11 min read

1. Background

little by little, the manual export/import has been replaced by the SAP BTP Cloud Transport Management Service(CTMS) for transporting any SAP Integraiton Suite(IS) Contents, including any Cloud Integration(CI) content and API management content.

When bellow error occurrs, how should we do to find out the cause? 

 The most straightforward way is to view the ‘Transport Action Log’ as below

obviously the information is not enough for you to determine the cause. You may notice the highlighted statement for details inform. In the below content, I will guide you reach there and see what kind of information those deployment log will provide and whether they are helpful or not.

1.1 Include

CF8 InstallationMultiApps CLI Plugin InstallationCF8 CL operation

1.2 Exclude

SAP CI DevelopmentAPI Management ConfigurationSAP BTP CTMS Configuration

1.3 Prerequsite

Multiple Tier(at least two) SAP Integration Suite SubaccountCTMS has been configured between/among above subaccounts

1.4 Targer Reader

Integration DeveloperBasis

Here are the detail steps:

2. Install CF CLI

This is the official link provided in the CTMS Log:

https://docs.cloudfoundry.org/cf-cli/install-go-cli.html

however i cannot find the one for windows platform. So if you are using Windows, please go to here:

https://github.com/cloudfoundry/cli/wiki/V8-CLI-Installation-Guide

Please ignore the ‘Chocolatey‘ part. I have tried and find it tedious. You can download the installer file directly via here:

no need the admin access, you can install it and after installation, the folder looks like this:

3. Install MultiApps(MTA) CLI Plugin

This is the link provided in the CTMS Log for your reference:

https://github.com/cloudfoundry/multiapps-cli-plugin

My preference is this link:

https://help.sap.com/docs/btp/sap-business-technology-platform/install-multiapps-cli-plugin-in-cloud-foundry-environment

anyway the key part is here:

Please be aware that, in the example, the command cf has been used. whereas in our case, the CF8 is installed, therefore, cf8 is the relevant command for us. I won’t explain it later. 

Launch the windows powershell, and go to the folder where cf8 has been installed so that you can execute it.

install the MTA plugin by executing below command:

 

 

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

 

 

then

 

 

cf8 install-plugin multiapps -f

 

 

This is how it looks like on my machine. It might a little difference on yours. because the MTA addon has already installed on my computer.

4. Get into BTP Global Account via CF CLI

Find out the API Endpoint of the Cloud Foundry Space of the TARGET subaccount.

In my case, I have two BTP IS subaccounts. Say BTP IS Dev and BTP IS QA. Then go to the subaccount of BTP IS QA via web browser.

If you do not know how to find it, here is a reference of mine.

Now switch back to the windows powershell.

4.1 Specify the endpoint

This is the command format

 

 

cf8 api <your CF endpoint>

 

 

 This is an example of mine

The highlighted login command will be explained next.

4.2 Login Options

There are two ways to login, which has been highlighted in the above step.

by using cf8.exe login or simply cf8 login, you will login by using the default identity provider. 

If you have multiple identity provider, normally the Microsoft Active Directory, and you want to login by using any user under custom identity provider, please use cf8.exe login –sso or simply cf8 login –sso.

By this means, you will have the option to chose the identity provider and retrieve the login token.

For my case, I just login by using the default identity provider. So simply cf8 login

as you can see above, for me, there are four cloud foundry orgnizations under different subaccounts have been listed for me. For you, the list of orgs will be different.

please choose the ITEM NUMBER of the TARGET subaccount. 

So for my case, the target subaccount is ‘integration-qa’, so i should input ‘4’ here. Please be aware that, DO NOT input item number of CTMS.

This is the operation for me.

5. Download Logs

Once you get into the subaccount or org, you can simple replicate the command from the CTMS Log and execute it here. Let’s take the one in chapter 1 as an example

Now the relevant deployment log has been downloaded into your CF CLI folder as below. The folder name should be relevant to the deployment id used.

6. Analyse the log

The log folder created normally contains files like this

if the TR does contain multiple transported contents, there will be multiple log files with GUID format names in the folder.

This is an example of the content of the file whose name is with GUID format

This is an example of the content of the file, CTS_LOG

File OPERATION.log has most content. I just get part of them, which contains java exception captured.

Apparently these contents do not quite make sense to me as an Integration developer unfortunitely :-(. Not sure if they ring any bells to anyone who has basis background or to SAP.

7. My personal recommendation for BTP IS Transportation.

Here are few my experience when using CTMS v1.90.1 for transporting SAP BTP Integration Suite contents.

7.1 for Cloud Integration Content.

If the transport failed, you can manually delete the one in the target subaccount and import it again in CTMS.

7.2 For API Proxy of API Management

If the transprot failed, please try to manually export/import. If you encountered any error in the manul mode, it cannot be transported via CTMS. 

7.3 For product of API Management

My feeling is that, when a product has been transported in a TR, all of its API Proxy(s) will be transported at the same time. However when an API proxy is transported, the configuration in its product won’t be transported. Therefore any transportation failure of any belonged API proxy will impact the transportation of product. 

If the transport of product failed, please check if all its API proxies are working fine and can be transported or not. 

By the way, I would recommend manully configure the product rather than transport it. Think about one of the API proxy is still under constructure by someone else and you transport the product. The TR will import the un-tested API proxy to the target which is not what you want. so, 

Transport on the API proxy level and manually add it to the product in the subsequential system 🙂 This is my personal proposal based on the current version of CTMS.

Conclusion

The downloaded deployment log looks not quite helpful. Further analysis is required on it. However it is a way to provide detail evidence to SAP for solving the transportation issue in CTMS. 

 

​ 1. Backgroundlittle by little, the manual export/import has been replaced by the SAP BTP Cloud Transport Management Service(CTMS) for transporting any SAP Integraiton Suite(IS) Contents, including any Cloud Integration(CI) content and API management content.When bellow error occurrs, how should we do to find out the cause?  The most straightforward way is to view the ‘Transport Action Log’ as belowobviously the information is not enough for you to determine the cause. You may notice the highlighted statement for details inform. In the below content, I will guide you reach there and see what kind of information those deployment log will provide and whether they are helpful or not.1.1 IncludeCF8 InstallationMultiApps CLI Plugin InstallationCF8 CL operation1.2 ExcludeSAP CI DevelopmentAPI Management ConfigurationSAP BTP CTMS Configuration1.3 PrerequsiteMultiple Tier(at least two) SAP Integration Suite SubaccountCTMS has been configured between/among above subaccounts1.4 Targer ReaderIntegration DeveloperBasisHere are the detail steps:2. Install CF CLIThis is the official link provided in the CTMS Log:https://docs.cloudfoundry.org/cf-cli/install-go-cli.htmlhowever i cannot find the one for windows platform. So if you are using Windows, please go to here:https://github.com/cloudfoundry/cli/wiki/V8-CLI-Installation-GuidePlease ignore the ‘Chocolatey’ part. I have tried and find it tedious. You can download the installer file directly via here:no need the admin access, you can install it and after installation, the folder looks like this:3. Install MultiApps(MTA) CLI PluginThis is the link provided in the CTMS Log for your reference:https://github.com/cloudfoundry/multiapps-cli-pluginMy preference is this link:https://help.sap.com/docs/btp/sap-business-technology-platform/install-multiapps-cli-plugin-in-cloud-foundry-environmentanyway the key part is here:Please be aware that, in the example, the command cf has been used. whereas in our case, the CF8 is installed, therefore, cf8 is the relevant command for us. I won’t explain it later. Launch the windows powershell, and go to the folder where cf8 has been installed so that you can execute it.install the MTA plugin by executing below command:  cf8 add-plugin-repo CF-Community https://plugins.cloudfoundry.org  then  cf8 install-plugin multiapps -f  This is how it looks like on my machine. It might a little difference on yours. because the MTA addon has already installed on my computer.4. Get into BTP Global Account via CF CLIFind out the API Endpoint of the Cloud Foundry Space of the TARGET subaccount.In my case, I have two BTP IS subaccounts. Say BTP IS Dev and BTP IS QA. Then go to the subaccount of BTP IS QA via web browser.If you do not know how to find it, here is a reference of mine.Now switch back to the windows powershell.4.1 Specify the endpointThis is the command format  cf8 api <your CF endpoint>   This is an example of mineThe highlighted login command will be explained next.4.2 Login OptionsThere are two ways to login, which has been highlighted in the above step.by using cf8.exe login or simply cf8 login, you will login by using the default identity provider. If you have multiple identity provider, normally the Microsoft Active Directory, and you want to login by using any user under custom identity provider, please use cf8.exe login –sso or simply cf8 login –sso.By this means, you will have the option to chose the identity provider and retrieve the login token.For my case, I just login by using the default identity provider. So simply cf8 loginas you can see above, for me, there are four cloud foundry orgnizations under different subaccounts have been listed for me. For you, the list of orgs will be different.please choose the ITEM NUMBER of the TARGET subaccount. So for my case, the target subaccount is ‘integration-qa’, so i should input ‘4’ here. Please be aware that, DO NOT input item number of CTMS.This is the operation for me.5. Download LogsOnce you get into the subaccount or org, you can simple replicate the command from the CTMS Log and execute it here. Let’s take the one in chapter 1 as an exampleNow the relevant deployment log has been downloaded into your CF CLI folder as below. The folder name should be relevant to the deployment id used.6. Analyse the logThe log folder created normally contains files like thisif the TR does contain multiple transported contents, there will be multiple log files with GUID format names in the folder.This is an example of the content of the file whose name is with GUID formatThis is an example of the content of the file, CTS_LOGFile OPERATION.log has most content. I just get part of them, which contains java exception captured.Apparently these contents do not quite make sense to me as an Integration developer unfortunitely :-(. Not sure if they ring any bells to anyone who has basis background or to SAP.7. My personal recommendation for BTP IS Transportation.Here are few my experience when using CTMS v1.90.1 for transporting SAP BTP Integration Suite contents.7.1 for Cloud Integration Content.If the transport failed, you can manually delete the one in the target subaccount and import it again in CTMS.7.2 For API Proxy of API ManagementIf the transprot failed, please try to manually export/import. If you encountered any error in the manul mode, it cannot be transported via CTMS. 7.3 For product of API ManagementMy feeling is that, when a product has been transported in a TR, all of its API Proxy(s) will be transported at the same time. However when an API proxy is transported, the configuration in its product won’t be transported. Therefore any transportation failure of any belonged API proxy will impact the transportation of product. If the transport of product failed, please check if all its API proxies are working fine and can be transported or not. By the way, I would recommend manully configure the product rather than transport it. Think about one of the API proxy is still under constructure by someone else and you transport the product. The TR will import the un-tested API proxy to the target which is not what you want. so, Transport on the API proxy level and manually add it to the product in the subsequential system 🙂 This is my personal proposal based on the current version of CTMS. ConclusionThe downloaded deployment log looks not quite helpful. Further analysis is required on it. However it is a way to provide detail evidence to SAP for solving the transportation issue in CTMS.    Read More Technology Blogs by Members articles 

#SAP

#SAPTechnologyblog

You May Also Like

More From Author