openshift-labs / starter-guides

Getting Started with OpenShift for Developers workshop
https://openshift-labs.github.io/starter-guides-html/
Apache License 2.0
136 stars 147 forks source link

Python: Deploying the Database #191

Closed benemon closed 3 years ago

benemon commented 3 years ago

When deploying a database it says "Database Service Name : mongodb-nationalparks" However, the application is looking for a service called "mongodb".

So either the application needs a config change to look for mongodb-nationalparks or the DB instructions should leave the database at the name "mongodb"

blues-man commented 3 years ago

The service name is mongodb-nationalparks as you can see here injected with env var DATABASE_SERVICE_NAME when deploying the app: https://github.com/openshift-roadshow/nationalparks-py/blob/master/wsgi.py#L23

Maybe that is not clear from instructions?

benemon commented 3 years ago

Sorry if I wasn't clear - the delegate was saying that the Python app itself is looking for a Service called mongodb, not mongodb-nationalparks.

blues-man commented 3 years ago

Can you please point me to the source code when the delegate is saying that?

benemon commented 3 years ago

I'm running the workshop again today, so I'll double check if someone runs through the Python content.

blues-man commented 3 years ago

Fixed here https://github.com/openshift-roadshow/nationalparks-py/commit/7db30d82091a4042acf1aded40de2d342eb47c40