Did you know that you can transport SAP Cloud Platform Portal sites with CTS? With this blog, I’d like to show you how to transport Sites created in the SAP Cloud Platform Portal Service with CTS.
For this demo I’m using a simple two-level landscape in SAP Cloud Platform Neo, with a development account named CLD and the productive account represented by CLP. The same concept can obviously also be applied to larger and more complex landscapes.
Additionally I’m using a CTS System that is connected to the internet, so that it can reach the SAP Cloud Platform. Harald Stevens Blog Setting up a CTS+ enabled transport landscape in SAP Cloud Platform describes the necessary configuration to transport SAP Cloud Platform content.
Let’s create some Content
I’ve created two sites:
- Fiori Launchpad Site
- Freestyle Site using the marketing site template
Both sites are built to be simple but representative examples of their kind. Each has additional assets in the form of shell plugins, widgets a few applications as well as newly created roles, catalogs and groups.
When looking at the documentation under Site Services -> Transporting Content you might notice that the available options for transporting content differ for Freestyle and FLP sites. In the following description I will show you how to set up a transport a FLP site but the same approach will work for either site type. I’ll talk a bit more about the available options in the Some Things to be aware of section of this blog.
SAP Cloud Platform content is loosely coupled with CTS. In practical terms this means we need to follow 3 steps to create a transport
- Export Site as an MTAR
- Create a Transport Request in CTS
- Attach the exported MTAR to the Transport Request
Exporting the Site
For SCP Portal content, this is done from the Site Directory:
- Go to the Site Directory of the SCP Portal Service and select the options menu for the site and select Export
- Select Content Package as the export option. This will create a Multi Target Application Archive, short MTAR, which will contain all the artifacts used in a site, including HTML5 applications, SCP Roles, configuration, etc.
NOTE: You must have the Administrator Role in your SAP Cloud Platform Subaccount to perform a content package export.
As a result the mtar for your site will download.
Creating a Transport Request
Now we’re ready to create a transport request to which we can attach the exported site content.
- Go to the CTS system and open transaction STMS. Click on the Transport Organizer UI button ( a page with a little globe on top) and select the development system, in my case CLD, as the system. Then select Create Request in the Transport Organizer overview.
- Set the Productive System CLP as the target and give a description for the transport request
- To attach the site content, click on Display<>Change in the transport request details, select the Object List ride and click Attach.
- Upload the mtar file. Make sure that the Application is set to Multi-Target Archive. This option was created during the setup of CTS for SAP Cloud Platform, as described in the prerequisites section. Click Attach and make sure to save the transport request.
- Now the transport request is finished and we can release it to the productive system. Select the Release button, the small truck in the top menu, and confirm that you want to release the transport request.
Executing the Transport Request
In order to complete the transport, we need to open the import queue for the productive system and start the import.
- Go back to the SAP GUI and open transaction STMS. Open the Import Overview by clicking on the truck symbol in the upper left corner. From there, double click on your productive system to open the import queue. You should see the released transport request in the list of available transports.
- Select the transport request and then click on the Import Request icon, a small truck with a orange and white payload. This will import only the selected request.
- It is possible to set a specific time or conditions when to trigger the import. For this I set it to Immediate. Start the import by clicking the green checkmark.
After the import has started will take -30seconds to complete. You can refresh the import queue after that time. If the transport was successful the RC field will turn green. Should you get an error (red circle) or a warning (yellow triangle), you can have a look at the error details by right clicking on the transport and selecting Logs.
If the import was successful, the site and all related content, such as UI5 Apps, SCP Roles and configuration are now present in the the productive SCP account.
Some things to be aware of
The process above describes the basic workflow for using the SAP Cloud Platform Portal service with CTS and can be applied to both freestyle and fiori launchpad sites. If you look in the official documentation, you will find there are several other options when exporting from the portal service, e.g. Site Configuration only, Roles and Catalogs:
Currently these cannot be used with CTS. As a workaround, it is possible to transport change to the site using the Content Package functionality. This will completely overwrite the previous version in the target account. Rollback is also possible by re-importing a previous transport request containing the full site.
Further Reading & Useful Links: