on 12-27-2019 10:24 AM
Hello,
Im new on Cloud Foundry and SAP so Im very lost.
I push a docker image with MongoDB to CF SAP. I can connect by cf ssh and access to the database.
Now, Im trying to connect from MongoDB Compass but I dont know if its possible or how.
I configure CFAR to add port 27017 and update route mapping but I dont know what else I should do.
https://docs.cloudfoundry.org/devguide/custom-ports.html
Im trying to connect from MongoDB compass with hostname (SAP cloud Application Route) and Port 27017 but without any sucess.
Could someone give me some guidance on how to do it?
Regards
Please be aware that CF apps don't come with persistence. If you are planning to run a docker image in CF, you will lose all your data once the app will be restarted/restaged.
If you want to run a mongo DB, I recommend using a backing service. These services provide persistence out of the box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You are right, SAP is currently not offering a MongoDB service to new customers/to trial users. There are, however, other options to connect the Cloud Foundry Application Runtime (CFAR) to a MongoDB:
1. You provision the MongoDB in a data center of our hyperscaler partners such as AWS, Azure, GCP. Here's a tutorial group that does the necessary setup for Azure (you only need to follow the first three tutorials).
2. You can provision the MongoDB from any Cloud vendor and inject it into Cloud Foundry as a user-provided service instance.
The advantage of the second approach is its simplicity but here you will have to manage the lifecycle of your MongoDB by yourself.
Have you checked this documentation? Which describes that you have to use the EXPOSE directive?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.