Skip to Content
Technical Articles

Deploying an App to Cloud Foundry on SAP Cloud Platform Cockpit

Pre-requisites:

Download the Cloud Foundry accordingly on different operating systems.

Once the installation is successful verify the Cloud Foundry command as shown below in the windows command prompt:

Access to the Cloud Platform Cockpit. Make sure the user is added to the Members list.

 

Make sure the members are added to the sub-accounts as well as shown in the screenshot below.

Pushing the Changes to Cloud Foundry:

  1. Clone the Repository where the changes are committed.

2. Example: Development team modified the changes in pbc-analytics-ui repository.

3. Open Git bash. Clone the repository into the folder USSC on the laptop using the following command.

4. Update the sub-module in the Git bash as shown below:

 

5. Open command prompt in Windows. Navigate to the Cloned Repository folder and set the Cloud Foundry endpoint and login to Cloud Foundry as mentioned below:

6. Select the Option 2 and also provide an option for the space either DEV/QA.

7. Execute the following command.

Pushing the Code to DEV
cf push -f manifest-dev.yml
Pushing the Code to QA
cf push -f manifest-qa.yml

8. To view the status of the different apps on QA Space environment.

Note:

If https is not working use the following commands:

  • git remote set-url origin Repository URL
  • git config –global http.sslverify false

Staging and Production : CF API URL

  • cf api  produdction cockpit
  • user is your email this time <email-id>

Fetching the Changes for a particular commit id:

  • git clone Repository URL
  • cd pbc-launchpad/
  • git checkout -b branch_name 4d4d65d8c6647d90d06fc75d264b08ef0eee26f5

Cloning the specific Branch from Github Repository

  • git clone -b <branch_name> Repository URL
  • git clone -b vik_vulas_changes Repository URL

Reset to branch to the previous commit id:

  •  git reset –hard 4d4d65d8c6647d90d06fc75d264b08ef0eee26f5
  • git push -f

Identifying the environment variables of the application:

  • cf env pbc-analytics-ui
  • cf env pbc-analytics-ui > logs.txt

Retrieving the GUIID details of the application:

  • cf app pbc-analytics-ui –guid -v
  • cf app pbc-analytics-ui –guid -v > logs.txt

Issues While pushing the code:

Remove package-lock.json

  • Increase the time out if required:                           
    •  cf push -f manifest-qa.yml -t 180
  • Make sure the package.json entries are right
  • Build pack should be maintained correctly

Downloading the Dependencies Locally for UI5 Libraries:

  1. Download the Git repository.
  2. Navigate to the location of the repository and open command line.
  3. Execute the following commands.

 OR when you encounter proxy issues :

Conclusion:

SAP Cloud platform provides an Amazon Web Services platform to push the applications using Cloud Foundry. This topic will give an insight and helps to resolve and overcome the issues during the deployment of the applications to SAP Cloud Platform.

1 Comment
You must be Logged on to comment or reply to a post.