After successfully installing CF CLI and creating our account in Pivotal Cloud Foundry, it is the time to push our first application in PCF. We are going to push a java spring boot application in PCF and a demo application developed for this purpose is available Hello world PCF application. Let’s start to push our first application in PCF step by step.
- Download the application from the above location and unzip it.
2. Go to the folder location and run the maven command mvn clean install. Please refer maven documentation, if maven is not installed in your system.
3. Above command will create a “pcf-1.0.0.jar” file in the “target” folder of the project.
4. Go to terminal and navigate to the folder location where you have the above “.jar” file.
5. Log in your account from CF CLI. Refer “let’s start” step 3 for details.
6. You will log in organisation “devworld” and space “development”. Please refer on screen instruction if you have more than one organisation and space. After successful login, you will get a screen like this:
7. Now type the command “cf push pcfwelcome -p pcf-1.0.0.jar”. The format is “cf push <application name of your choice> -p <jar file name with .jar extension>.
8. It will start pushing your application into PCF environment. It will take sometime and after successful push you will get a screen like:
9. Type “cf apps” in terminal. ( make sure you do not logout from CF CLI). You will get a screen with your application URL.
10. Go to your browser and type the url append with endpoint “/welcome” i.e <your url as shown in previous step>/welcome. You will get a response from browser as :
11. You can also check your application and find the url by log in Pivotal. Go to your organisation ( “devworld” here) and space (“development” here) , you will find the application “pcfwelcome” ( the application name that we have given during push time).
12. Click on the application name, you will get the details of the application, in a screen like below:
Congratulation. Application has been pushed successfully in Pivotal Cloud Foundry.
Code : Git location.