1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/getting-started-web-console-connecting-a-database.adoc
2026-01-07 18:07:52 +00:00

53 lines
1.9 KiB
Plaintext

// Module included in the following assemblies:
//
// * tutorials/dev-app-web-console.adoc
:_mod-docs-content-type: PROCEDURE
[id="getting-started-web-console-connecting-database_{context}"]
= Deploying the database application
[role="_abstract"]
Deploy a MongoDB database application to contain the information that your application requires. For this tutorial, you will deploy a database application called `mongodb-nationalparks` that holds the national park location information.
.Prerequisites
* You have deployed the `parksmap` front-end application.
* You have deployed the `nationalparks` back-end application.
.Procedure
. From the *Quick create* (image:fa-plus-circle.png[title="Quick create menu"]) menu in the upper right corner, click *Container images*.
. Select *Image name from external registry* and enter `registry.redhat.io/rhmap47/mongodb`.
. In the *Runtime icon* field, search for and select `mongodb`.
. Scroll to the *General* section.
. In the *Application name* field, enter `national-parks-app`.
. In the *Name* field, enter `mongodb-nationalparks`.
. Scroll to the *Deploy* section.
. In the *Resource type* field, ensure that *Deployment* is selected.
. Click *Show advanced Deployment option*.
. Under *Environment variables (runtime only)*, add the following names and values:
+
.Environment variable names and values
[cols="1,1"]
|===
|Name |Value
|`MONGODB_USER`|`mongodb`
|`MONGODB_PASSWORD`|`mongodb`
|`MONGODB_DATABASE`|`mongodb`
|`MONGODB_ADMIN_PASSWORD`|`mongodb`
|===
+
[TIP]
====
Click *Add value* to add each additional environment variable.
====
. In the *Advanced options* section, clear *Create a route*.
+
The database application does not need to be accessed externally, so a route is not required.
. Click *Create*.
+
You are redirected to the *Topology* page where you can see the `mongodb-nationalparks` deployment in the `national-parks-app` application.