I recently came across a helpful
blog post by Veli, Beyhan regarding the deprecation of the Cloud Foundry cflinuxfs3 stack and the need to migrate to cflinuxfs4.
In my case , our fiori applications on BTP is using the
Postgres database instance . To deploy and create postgrace database artifacts , along with
nodejs buildpack , apt-buildpack (
https://github.com/cloudfoundry/apt-buildpack) is also neccessary .
Therefore to change the stack to
cflinuxfs4 for Postgres, it is not possible to change it directly
from the BTP Cockpit .
Why ?
Because In this case , we also need to check if the
apt-buildpack version that we use is compatible with the new stack
cflinuxfs4 or we need to upgrade.
Stack Change Option - BTP Cockpit
The steps we took for the change -
- Check for the compatible apt-buildpack version .We used v0.2.10 , but found this version was not compatible with stack cflinuxfs4.
- The version compatible with cflinuxfs4 is v0.3.0 .
- Changes in mta.yaml
- In the module section with name - <customname>-db-deployer . Adding parameters to db-deployer section also affects the service.
- parameters
- stack : cflinusfs4
- buildpacks :
- -nodejs_buildpack
- -https://github.com/cloudfoundry/apt-buildpack#v0.3.0
4. Before deploying this change , the postgres db instance needs to be deleted for the change to affect. Therefore if the change has to be deployed in the acceptance or the production environment ,
take a backup of the data as deletion of db instance means loss of data
.
BTP - Postgres db instance
5. Once the change is deployed , the service and deployer application in BTP reflects the change of
stack cflinusfs4.
Conclusion : To change stack for postgres db always check if
apt-buildpack compatible version and before deploying the changes to productive environment
take a backup of the data in the postgres db else there is a data loss as mentioned in Step 4.
References -
Deprecation of Cloud Foundry Stack cflinuxfs3 and Migration to cflinuxfs4
How to update stack to cflinuxfs4 in SAP BTP Cloud Foundry Applications [CAP , NodeJS ,Java]
Thanks in advance to everyone for reading the blog !!.