Deploying in Cloud Hub!

 Hello Mule'es,

        In this Blog, you are going to learn about "How to deploy in cloud Hub"!

Let's Begin👍!


    You guys are now aware of creation of RAML, if not please go through my blogs "How to Create

 RAML"!

After Successful Creation of Raml, let's deploy in the cloud Hub. To do so, we need to create an 

auto discovery Id for customer-e-api. 

Steps to add auto Discovery Id:

1. Go to API Manager in Anypoint Platform.


img-1


2. Click on Add API and select Add new API




img - 2

3. Select Mule- Gateway Run time



img- 3

4. Click on Next.

5.  API :  select API from Exchange.

6. Now choose the API to which you need to add auto discovery Id, then click on Next.

7. Ignore the rest of the fields for now and remain as it is.


img - 4


8. Now in Downstream tab, leave the fields as it is and click on Next.

9.  In Upstream tab, leave the fields as it is and click on Next.

10. click on save.

11. Now it will create an API Instance Id, refer the screen shot below.


img -5

12. Copy the API Instance Id.

13. As we have already imported the customer-e-api RAML in anypoint studio, it's time to add 

auto discovery Id.

img-6

14. Go to global elements and add auto discovery Id.



img - 7


15. paste the auto discovery Id and select the main component. 


img -8

16. Export the customer-e-api jar file.

17. Go to Run time Manager in Anypoint platform --> select sandbox environment --> click on 

Deploy application.

18. Provide the application Name, select cloud hub from dropdown, choose the exported jar file from

your local system, set the runtime version 4.5.2e ( depends on current version ).

19. Go to properties tab and provide the following data.

   anypoint.platform.config.analytics.agent.enabled=true

   anypoint.platform.analytics_base_uri= https://analytics-ingest.eu1.anypoint.mulesoft.com

   anypoint.platform.client_id=  xxxxxxxxxxxxxxxx

    anypoint.platform.client_secret= xxxxxxxxxxxxxx

    anypoint.platform.base_uri= https://eu1.anypoint.mulesoft.com

20. To know your client_Id and client_secret, Go to Access Management --> Bussiness Groups -->

select your Organization --> select Environments Tab --> select Sandbox.

21. Copy those client credentials and paste in the properties tab!



img -9


22. Deploy the application.

23. You can see that application has been deployed, refer the screen shot.

img-10

Now you can test your application through Postman.


img -11

Please refer the above screen shot, you can find the App url, Copy that.

Now go to your postman --> paste the app url/http.path/ endpoint

for instance:  http://customer-e-api.us-e2.cloudhub.io/api/getCustomer

img-12

Now you can see 200 Ok status code, which means the application is deployed successfully without any

errors.

I hope this blog is helpful!

If any queries, please reach out and drop an email to bodhini2002@gmail.com.


 Happy Learning!

Thanks & Regards,
Bodhini



















    














Comments

Post a Comment

Popular posts from this blog

How to Create Alert Notification!

How to Create a RAML!